Skip to content

Commit 230d286

Browse files
committed
Fix gofmt formatting
1 parent e385ab8 commit 230d286

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

import_tracker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var _ = Describe("ImportTracker", func() {
1515
})
1616
Context("when I have a valid go package", func() {
1717
It("should record all import specs", func() {
18-
Expect(source).To(Equal(source))
18+
Expect(source).To(Equal(source))
1919
Skip("Not implemented")
2020
})
2121

rules/rulelist.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,35 @@ func NewRuleFilter(action bool, ruleIDs ...string) RuleFilter {
6060
func Generate(filters ...RuleFilter) RuleList {
6161
rules := map[string]RuleDefinition{
6262
// misc
63-
"G101": RuleDefinition{"Look for hardcoded credentials", NewHardcodedCredentials},
64-
"G102": RuleDefinition{"Bind to all interfaces", NewBindsToAllNetworkInterfaces},
65-
"G103": RuleDefinition{"Audit the use of unsafe block", NewUsingUnsafe},
66-
"G104": RuleDefinition{"Audit errors not checked", NewNoErrorCheck},
67-
"G105": RuleDefinition{"Audit the use of big.Exp function", NewUsingBigExp},
68-
"G106": RuleDefinition{"Audit the use of ssh.InsecureIgnoreHostKey function", NewSSHHostKey},
63+
"G101": {"Look for hardcoded credentials", NewHardcodedCredentials},
64+
"G102": {"Bind to all interfaces", NewBindsToAllNetworkInterfaces},
65+
"G103": {"Audit the use of unsafe block", NewUsingUnsafe},
66+
"G104": {"Audit errors not checked", NewNoErrorCheck},
67+
"G105": {"Audit the use of big.Exp function", NewUsingBigExp},
68+
"G106": {"Audit the use of ssh.InsecureIgnoreHostKey function", NewSSHHostKey},
6969

7070
// injection
71-
"G201": RuleDefinition{"SQL query construction using format string", NewSQLStrFormat},
72-
"G202": RuleDefinition{"SQL query construction using string concatenation", NewSQLStrConcat},
73-
"G203": RuleDefinition{"Use of unescaped data in HTML templates", NewTemplateCheck},
74-
"G204": RuleDefinition{"Audit use of command execution", NewSubproc},
71+
"G201": {"SQL query construction using format string", NewSQLStrFormat},
72+
"G202": {"SQL query construction using string concatenation", NewSQLStrConcat},
73+
"G203": {"Use of unescaped data in HTML templates", NewTemplateCheck},
74+
"G204": {"Audit use of command execution", NewSubproc},
7575

7676
// filesystem
77-
"G301": RuleDefinition{"Poor file permissions used when creating a directory", NewMkdirPerms},
78-
"G302": RuleDefinition{"Poor file permisions used when creation file or using chmod", NewFilePerms},
79-
"G303": RuleDefinition{"Creating tempfile using a predictable path", NewBadTempFile},
77+
"G301": {"Poor file permissions used when creating a directory", NewMkdirPerms},
78+
"G302": {"Poor file permisions used when creation file or using chmod", NewFilePerms},
79+
"G303": {"Creating tempfile using a predictable path", NewBadTempFile},
8080

8181
// crypto
82-
"G401": RuleDefinition{"Detect the usage of DES, RC4, or MD5", NewUsesWeakCryptography},
83-
"G402": RuleDefinition{"Look for bad TLS connection settings", NewIntermediateTLSCheck},
84-
"G403": RuleDefinition{"Ensure minimum RSA key length of 2048 bits", NewWeakKeyStrength},
85-
"G404": RuleDefinition{"Insecure random number source (rand)", NewWeakRandCheck},
82+
"G401": {"Detect the usage of DES, RC4, or MD5", NewUsesWeakCryptography},
83+
"G402": {"Look for bad TLS connection settings", NewIntermediateTLSCheck},
84+
"G403": {"Ensure minimum RSA key length of 2048 bits", NewWeakKeyStrength},
85+
"G404": {"Insecure random number source (rand)", NewWeakRandCheck},
8686

8787
// blacklist
88-
"G501": RuleDefinition{"Import blacklist: crypto/md5", NewBlacklistedImportMD5},
89-
"G502": RuleDefinition{"Import blacklist: crypto/des", NewBlacklistedImportDES},
90-
"G503": RuleDefinition{"Import blacklist: crypto/rc4", NewBlacklistedImportRC4},
91-
"G504": RuleDefinition{"Import blacklist: net/http/cgi", NewBlacklistedImportCGI},
88+
"G501": {"Import blacklist: crypto/md5", NewBlacklistedImportMD5},
89+
"G502": {"Import blacklist: crypto/des", NewBlacklistedImportDES},
90+
"G503": {"Import blacklist: crypto/rc4", NewBlacklistedImportRC4},
91+
"G504": {"Import blacklist: net/http/cgi", NewBlacklistedImportCGI},
9292
}
9393

9494
for rule := range rules {

0 commit comments

Comments
 (0)