Skip to content

Commit d169590

Browse files
authored
Exclude file permissions line from gosec linting
The [gosec linter](https://github.com/securego/gosec) warns [by default on file permissions above 0600](securego/gosec#107) We need the permissions to be 0644 for this line (because it has to be written to), so we exclude it from linting.
1 parent fd816d3 commit d169590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/github/action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (a *Action) pullRequestNumber() int {
127127
func (a *Action) outputResult(result string) {
128128
labelCheckOutput := fmt.Sprintf("label_check=%s", result)
129129
gitHubOutputFileName := filepath.Clean(os.Getenv("GITHUB_OUTPUT"))
130-
githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644)
130+
githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644) //nolint:gosec
131131
panic.IfError(err)
132132
_, err = githubOutputFile.WriteString(labelCheckOutput)
133133
if err != nil {

0 commit comments

Comments
 (0)