Skip to content

Commit 35606f3

Browse files
committed
chore: gosec
1 parent 1790f46 commit 35606f3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: .golangci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ linters-settings:
7272
excludes:
7373
- G101
7474
- G112
75+
- G115
76+
- G204
7577
- G402
7678
- G404
7779
- G501

Diff for: internal/cli/action_generate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (a *action) generateChangelog(commits []convention.Commit, finalOutput, ver
163163
func (a *action) generateMarkdownChangelog(output, version string, commits []convention.Commit) error {
164164
// If changelog file already exist, parse markdown from exist file
165165
var oldNodes []markdown.Node
166-
bytes, err := os.ReadFile(output)
166+
bytes, err := os.ReadFile(filepath.Clean(output))
167167
if err == nil {
168168
oldNodes = changelog.ParseMarkdown(string(bytes))
169169
}
@@ -195,7 +195,7 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
195195
func (a *action) generateRSTChangelog(output, version string, commits []convention.Commit) error {
196196
// If changelog file already exist, parse markdown from exist file
197197
var oldNodes []rst.Node
198-
bytes, err := os.ReadFile(output)
198+
bytes, err := os.ReadFile(filepath.Clean(output))
199199
if err == nil {
200200
oldNodes = changelog.ParseRST(string(bytes))
201201
}

0 commit comments

Comments
 (0)