@@ -1320,6 +1320,9 @@ linters:
13201320 # Assert no unused link in godocs.
13211321 # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#no-unused-link
13221322 - no-unused-link
1323+ # Require proper doc links to standard library declarations where applicable.
1324+ # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-stdlib-doclink
1325+ - require-stdlib-doclink
13231326
13241327 # List of rules to disable.
13251328 # Default: empty
@@ -1332,12 +1335,13 @@ linters:
13321335 - deprecated
13331336 - max-len
13341337 - no-unused-link
1338+ - require-stdlib-doclink
13351339
13361340 # A map for fine-tuning individual rules.
13371341 # All subkeys are optional.
13381342 options :
13391343 max-len :
1340- # Maximum line length for godocs, not including the `// `, or `/*` or `*/` tokens.
1344+ # Maximum line length for godocs, not including the `//`, `/*` or `*/` tokens.
13411345 # Default: 77
13421346 length : 127
13431347
@@ -1453,6 +1457,9 @@ linters:
14531457 # Defines a pattern to validate `go` minimum version directive.
14541458 # Default: '' (no match)
14551459 go-version-pattern : ' \d\.\d+(\.0)?'
1460+ # Check the validity of the module path.
1461+ # Default: false
1462+ check-module-path : true
14561463
14571464 gomodguard :
14581465 allowed :
@@ -1493,89 +1500,91 @@ linters:
14931500 # Available rules: https://github.com/securego/gosec#available-rules
14941501 # Default: [] - means include all rules
14951502 includes :
1496- - G101 # Look for hard coded credentials
1503+ - G101 # Look for hardcoded credentials
14971504 - G102 # Bind to all interfaces
14981505 - G103 # Audit the use of unsafe block
14991506 - G104 # Audit errors not checked
1500- - G106 # Audit the use of ssh.InsecureIgnoreHostKey
1507+ - G106 # Audit the use of ssh.InsecureIgnoreHostKey function
15011508 - G107 # Url provided to HTTP request as taint input
1502- - G108 # Profiling endpoint automatically exposed on /debug/pprof
1503- - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
1504- - G110 # Potential DoS vulnerability via decompression bomb
1505- - G111 # Potential directory traversal
1506- - G112 # Potential slowloris attack
1509+ - G108 # Profiling endpoint is automatically exposed
1510+ - G109 # Converting strconv.Atoi result to int32/int16
1511+ - G110 # Detect io.Copy instead of io.CopyN when decompression
1512+ - G111 # Detect http.Dir('/') as a potential risk
1513+ - G112 # Detect ReadHeaderTimeout not configured as a potential risk
15071514 - G114 # Use of net/http serve function that has no support for setting timeouts
1508- - G115 # Potential integer overflow when converting between integer types
1515+ - G115 # Type conversion which leads to integer overflow
1516+ - G116 # Detect Trojan Source attacks using bidirectional Unicode characters
15091517 - G201 # SQL query construction using format string
15101518 - G202 # SQL query construction using string concatenation
15111519 - G203 # Use of unescaped data in HTML templates
15121520 - G204 # Audit use of command execution
15131521 - G301 # Poor file permissions used when creating a directory
1514- - G302 # Poor file permissions used with chmod
1522+ - G302 # Poor file permissions used when creation file or using chmod
15151523 - G303 # Creating tempfile using a predictable path
15161524 - G304 # File path provided as taint input
1517- - G305 # File traversal when extracting zip/tar archive
1518- - G306 # Poor file permissions used when writing to a new file
1525+ - G305 # File path traversal when extracting zip archive
1526+ - G306 # Poor file permissions used when writing to a file
15191527 - G307 # Poor file permissions used when creating a file with os.Create
15201528 - G401 # Detect the usage of MD5 or SHA1
15211529 - G402 # Look for bad TLS connection settings
15221530 - G403 # Ensure minimum RSA key length of 2048 bits
15231531 - G404 # Insecure random number source (rand)
15241532 - G405 # Detect the usage of DES or RC4
1525- - G406 # Detect the usage of MD4 or RIPEMD160
1533+ - G406 # Detect the usage of deprecated MD4 or RIPEMD160
15261534 - G501 # Import blocklist: crypto/md5
15271535 - G502 # Import blocklist: crypto/des
15281536 - G503 # Import blocklist: crypto/rc4
15291537 - G504 # Import blocklist: net/http/cgi
15301538 - G505 # Import blocklist: crypto/sha1
15311539 - G506 # Import blocklist: golang.org/x/crypto/md4
15321540 - G507 # Import blocklist: golang.org/x/crypto/ripemd160
1533- - G601 # Implicit memory aliasing of items from a range statement
1534- - G602 # Slice access out of bounds
1541+ - G601 # Implicit memory aliasing in RangeStmt
1542+ - G602 # Possible slice bounds out of range
15351543
15361544 # To specify a set of rules to explicitly exclude.
15371545 # Available rules: https://github.com/securego/gosec#available-rules
15381546 # Default: []
15391547 excludes :
1540- - G101 # Look for hard coded credentials
1548+ - G101 # Look for hardcoded credentials
15411549 - G102 # Bind to all interfaces
15421550 - G103 # Audit the use of unsafe block
15431551 - G104 # Audit errors not checked
1544- - G106 # Audit the use of ssh.InsecureIgnoreHostKey
1552+ - G106 # Audit the use of ssh.InsecureIgnoreHostKey function
15451553 - G107 # Url provided to HTTP request as taint input
1546- - G108 # Profiling endpoint automatically exposed on /debug/pprof
1547- - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
1548- - G110 # Potential DoS vulnerability via decompression bomb
1549- - G111 # Potential directory traversal
1550- - G112 # Potential slowloris attack
1554+ - G108 # Profiling endpoint is automatically exposed
1555+ - G109 # Converting strconv.Atoi result to int32/int16
1556+ - G110 # Detect io.Copy instead of io.CopyN when decompression
1557+ - G111 # Detect http.Dir('/') as a potential risk
1558+ - G112 # Detect ReadHeaderTimeout not configured as a potential risk
15511559 - G114 # Use of net/http serve function that has no support for setting timeouts
1552- - G115 # Potential integer overflow when converting between integer types
1560+ - G115 # Type conversion which leads to integer overflow
1561+ - G116 # Detect Trojan Source attacks using bidirectional Unicode characters
15531562 - G201 # SQL query construction using format string
15541563 - G202 # SQL query construction using string concatenation
15551564 - G203 # Use of unescaped data in HTML templates
15561565 - G204 # Audit use of command execution
15571566 - G301 # Poor file permissions used when creating a directory
1558- - G302 # Poor file permissions used with chmod
1567+ - G302 # Poor file permissions used when creation file or using chmod
15591568 - G303 # Creating tempfile using a predictable path
15601569 - G304 # File path provided as taint input
1561- - G305 # File traversal when extracting zip/tar archive
1562- - G306 # Poor file permissions used when writing to a new file
1570+ - G305 # File path traversal when extracting zip archive
1571+ - G306 # Poor file permissions used when writing to a file
15631572 - G307 # Poor file permissions used when creating a file with os.Create
15641573 - G401 # Detect the usage of MD5 or SHA1
15651574 - G402 # Look for bad TLS connection settings
15661575 - G403 # Ensure minimum RSA key length of 2048 bits
15671576 - G404 # Insecure random number source (rand)
15681577 - G405 # Detect the usage of DES or RC4
1569- - G406 # Detect the usage of MD4 or RIPEMD160
1578+ - G406 # Detect the usage of deprecated MD4 or RIPEMD160
15701579 - G501 # Import blocklist: crypto/md5
15711580 - G502 # Import blocklist: crypto/des
15721581 - G503 # Import blocklist: crypto/rc4
15731582 - G504 # Import blocklist: net/http/cgi
15741583 - G505 # Import blocklist: crypto/sha1
15751584 - G506 # Import blocklist: golang.org/x/crypto/md4
15761585 - G507 # Import blocklist: golang.org/x/crypto/ripemd160
1577- - G601 # Implicit memory aliasing of items from a range statement
1578- - G602 # Slice access out of bounds
1586+ - G601 # Implicit memory aliasing in RangeStmt
1587+ - G602 # Possible slice bounds out of range
15791588
15801589 # Filter out the issues with a lower severity than the given value.
15811590 # Valid options are: low, medium, high.
@@ -2149,6 +2158,8 @@ linters:
21492158 - slicessort
21502159 # Use iterators instead of Len/At-style APIs.
21512160 - stditerators
2161+ # Replace strings.Index etc. with strings.Cut.
2162+ - stringscut
21522163 # Replace HasPrefix/TrimPrefix with CutPrefix.
21532164 - stringscutprefix
21542165 # Replace ranging over Split/Fields with SplitSeq/FieldsSeq.
@@ -2157,6 +2168,8 @@ linters:
21572168 - stringsbuilder
21582169 # Replace context.WithCancel with t.Context in tests.
21592170 - testingcontext
2171+ # Replace unsafe pointer arithmetic with function calls.
2172+ - unsafefuncs
21602173 # Replace wg.Add(1)/go/wg.Done() with wg.Go.
21612174 - waitgroup
21622175
@@ -3980,7 +3993,22 @@ linters:
39803993 # Enable SQL builder checking.
39813994 # Default: true
39823995 check-sql-builders : false
3983- # Regex patterns for acceptable SELECT * usage.
3996+ # Enable aliased wildcard detection like `SELECT t.*`.
3997+ # Default: true
3998+ check-aliased-wildcard : false
3999+ # Enable string concatenation analysis.
4000+ # Default: true
4001+ check-string-concat : false
4002+ # Enable format string analysis like `fmt.Sprintf`.
4003+ # Default: true
4004+ check-format-strings : false
4005+ # Enable strings.Builder analysis.
4006+ # Default: true
4007+ check-string-builder : false
4008+ # Enable subquery analysis.
4009+ # Default: true
4010+ check-subqueries : false
4011+ # Regex patterns for acceptable `SELECT *` usage.
39844012 # Default:
39854013 # - "SELECT \\* FROM information_schema\\..*"
39864014 # - "SELECT \\* FROM pg_catalog\\..*"
@@ -3990,6 +4018,22 @@ linters:
39904018 allowed-patterns :
39914019 - " SELECT \\ * FROM temp_.*"
39924020 - " SELECT \\ * FROM.*-- migration"
4021+ # Functions to ignore (regex patterns)
4022+ # Default: []
4023+ ignored-functions :
4024+ - " debug\\ ..*"
4025+ - " test.*"
4026+ # SQL builder libraries to check.
4027+ # Default: all true.
4028+ sql-builders :
4029+ squirrel : false
4030+ gorm : false
4031+ sqlx : false
4032+ ent : false
4033+ pgx : false
4034+ bun : false
4035+ sqlboiler : false
4036+ jet : false
39934037
39944038 unused :
39954039 # Mark all struct fields that have been written to as used.
0 commit comments