Skip to content

Commit 6b484e7

Browse files
committed
Run gofmt
1 parent 105edba commit 6b484e7

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

rules/rulelist.go

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

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

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

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

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

9595
ruleMap := make(map[string]RuleDefinition)

0 commit comments

Comments
 (0)