Skip to content

Commit 024f151

Browse files
Add additional nosec comments
1 parent c24e6ce commit 024f151

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func OrganizeImports(codeBuffer *bytes.Buffer, filePath string) error {
3939
func SaveBufferToFile(buffer *bytes.Buffer, filePath string) error {
4040
file, err := os.Create(filePath)
4141

42-
// #nosec G104 (audit errors not checked)
42+
// #nosec G104 G307 (audit errors not checked & deferring unsafe method)
4343
// This line is placed in the auxiliary generator code,
4444
// not in the core application. Also, the Close function returns only
4545
// the error. It doesn't return any other values which can be a security

tools/generators/ethereum/contract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func organizeImports(outFile string, buf *bytes.Buffer) error {
228228
func saveBufferToFile(buf *bytes.Buffer, filePath string) error {
229229
file, err := os.Create(filePath)
230230

231-
// #nosec G104 (audit errors not checked)
231+
// #nosec G104 G307 (audit errors not checked & deferring unsafe method)
232232
// This line is placed in the auxiliary generator code,
233233
// not in the core application. Also, the Close function returns only
234234
// the error. It doesn't return any other values which can be a security

0 commit comments

Comments
 (0)