Skip to content

Commit 5ce35e4

Browse files
committed
Adjust a test case so that the key isn't considered dummy
(len < 4)
1 parent 458bbb3 commit 5ce35e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

go/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
| main.go:44:14:44:19 | "p4ss" | Hard-coded $@. | main.go:44:14:44:19 | "p4ss" | password |
2626
| main.go:48:13:48:15 | tmp | Hard-coded $@. | main.go:44:14:44:19 | "p4ss" | password |
2727
| main.go:50:15:50:21 | "p4ss2" | Hard-coded $@. | main.go:50:15:50:21 | "p4ss2" | password |
28-
| sanitizer.go:18:44:18:46 | key | Hard-coded credential. | sanitizer.go:17:16:17:20 | `key` | password |
28+
| sanitizer.go:18:44:18:46 | key | Hard-coded credential. | sanitizer.go:17:16:17:25 | `some_key` | password |

go/ql/test/query-tests/Security/CWE-798/sanitizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
func check_ok() (interface{}, error) {
17-
key := []byte(`key`)
17+
key := []byte(`some_key`)
1818
return cristal.NewSignerHS(cristal.HS256, key) // BAD
1919
}
2020

0 commit comments

Comments
 (0)