-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(go): snapshots to annotations for gosec
- Loading branch information
Showing
99 changed files
with
843 additions
and
3,808 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
const { createInvoker, getEnvironment } = require("../../../../helper.js") | ||
const { | ||
createNewInvoker, | ||
getEnvironment, | ||
} = require("../../../../../helper.js") | ||
const { ruleId, ruleFile, testBase } = getEnvironment(__dirname) | ||
|
||
describe(ruleId, () => { | ||
const invoke = createInvoker(ruleId, ruleFile, testBase) | ||
|
||
test("test", () => { | ||
const testCase = "main.go" | ||
expect(invoke(testCase)).toMatchSnapshot() | ||
}) | ||
|
||
test("test 2", () => { | ||
const testCase = "main2.go" | ||
expect(invoke(testCase)).toMatchSnapshot() | ||
}) | ||
}) | ||
const invoke = createNewInvoker(ruleId, ruleFile, testBase) | ||
|
||
|
||
test("main", () => { | ||
const testCase = "main.go" | ||
|
||
const results = invoke(testCase) | ||
|
||
expect(results.Missing).toEqual([]) | ||
expect(results.Extra).toEqual([]) | ||
}) | ||
|
||
|
||
test("main2", () => { | ||
const testCase = "main2.go" | ||
|
||
const results = invoke(testCase) | ||
|
||
expect(results.Missing).toEqual([]) | ||
expect(results.Extra).toEqual([]) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package main | ||
|
||
// bearer:expected go_gosec_blocklist_cgi | ||
import "net/http/cgi" | ||
|
||
func maincgi() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
// bearer:expected go_gosec_blocklist_cgi | ||
cgi2 "net/http/cgi" | ||
) | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
const { createInvoker, getEnvironment } = require("../../../../helper.js") | ||
const { | ||
createNewInvoker, | ||
getEnvironment, | ||
} = require("../../../../../helper.js") | ||
const { ruleId, ruleFile, testBase } = getEnvironment(__dirname) | ||
|
||
describe(ruleId, () => { | ||
const invoke = createInvoker(ruleId, ruleFile, testBase) | ||
const invoke = createNewInvoker(ruleId, ruleFile, testBase) | ||
|
||
test("test", () => { | ||
const testCase = "main.go" | ||
expect(invoke(testCase)).toMatchSnapshot() | ||
}) | ||
}) | ||
|
||
test("main", () => { | ||
const testCase = "main.go" | ||
|
||
const results = invoke(testCase) | ||
|
||
expect(results.Missing).toEqual([]) | ||
expect(results.Extra).toEqual([]) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
// bearer:expected go_gosec_blocklist_des | ||
"crypto/des" | ||
"fmt" | ||
) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
const { createInvoker, getEnvironment } = require("../../../../helper.js") | ||
const { | ||
createNewInvoker, | ||
getEnvironment, | ||
} = require("../../../../../helper.js") | ||
const { ruleId, ruleFile, testBase } = getEnvironment(__dirname) | ||
|
||
describe(ruleId, () => { | ||
const invoke = createInvoker(ruleId, ruleFile, testBase) | ||
const invoke = createNewInvoker(ruleId, ruleFile, testBase) | ||
|
||
test("test", () => { | ||
const testCase = "main.go" | ||
expect(invoke(testCase)).toMatchSnapshot() | ||
}) | ||
}) | ||
|
||
test("main", () => { | ||
const testCase = "main.go" | ||
|
||
const results = invoke(testCase) | ||
|
||
expect(results.Missing).toEqual([]) | ||
expect(results.Extra).toEqual([]) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
// bearer:expected go_gosec_blocklist_md5 | ||
"crypto/md5" | ||
"fmt" | ||
) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
const { createInvoker, getEnvironment } = require("../../../../helper.js") | ||
const { | ||
createNewInvoker, | ||
getEnvironment, | ||
} = require("../../../../../helper.js") | ||
const { ruleId, ruleFile, testBase } = getEnvironment(__dirname) | ||
|
||
describe(ruleId, () => { | ||
const invoke = createInvoker(ruleId, ruleFile, testBase) | ||
const invoke = createNewInvoker(ruleId, ruleFile, testBase) | ||
|
||
test("test", () => { | ||
const testCase = "main.go" | ||
expect(invoke(testCase)).toMatchSnapshot() | ||
}) | ||
}) | ||
|
||
test("main", () => { | ||
const testCase = "main.go" | ||
|
||
const results = invoke(testCase) | ||
|
||
expect(results.Missing).toEqual([]) | ||
expect(results.Extra).toEqual([]) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
// bearer:expected go_gosec_blocklist_rc4 | ||
"crypto/rc4" | ||
"fmt" | ||
) | ||
|
Oops, something went wrong.