Skip to content

Commit b949aa1

Browse files
grokifyclaude
andcommitted
fix: use #nosec directive for gosec suppressions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 74707ba commit b949aa1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/ogen-fixerror/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func run(args []string) error {
4242

4343
filename := args[0]
4444

45-
content, err := os.ReadFile(filename) //nolint:gosec // G703: CLI tool, filename from trusted args
45+
content, err := os.ReadFile(filename) // #nosec G703 -- CLI tool, filename from trusted args
4646
if err != nil {
4747
return fmt.Errorf("read file: %w", err)
4848
}
@@ -54,7 +54,7 @@ func run(args []string) error {
5454
return nil
5555
}
5656

57-
if err := os.WriteFile(filename, fixed, 0600); err != nil { //nolint:gosec // G703: CLI tool, filename from trusted args
57+
if err := os.WriteFile(filename, fixed, 0600); err != nil { // #nosec G703 -- CLI tool, filename from trusted args
5858
return fmt.Errorf("write file: %w", err)
5959
}
6060

cmd/ogen-fixnull/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func run(args []string) error {
3939

4040
filename := args[0]
4141

42-
content, err := os.ReadFile(filename) //nolint:gosec // G703: CLI tool, filename from trusted args
42+
content, err := os.ReadFile(filename) // #nosec G703 -- CLI tool, filename from trusted args
4343
if err != nil {
4444
return fmt.Errorf("read file: %w", err)
4545
}
@@ -51,7 +51,7 @@ func run(args []string) error {
5151
return nil
5252
}
5353

54-
if err := os.WriteFile(filename, fixed, 0600); err != nil { //nolint:gosec // G703: CLI tool, filename from trusted args
54+
if err := os.WriteFile(filename, fixed, 0600); err != nil { // #nosec G703 -- CLI tool, filename from trusted args
5555
return fmt.Errorf("write file: %w", err)
5656
}
5757

0 commit comments

Comments
 (0)