Security best practices and vulnerability prevention for Golang — injection (SQL, command, XSS), cryptography, path traversal, SSRF and HTTP security headers, cookies, secrets management, memory safety, PII in logs, STRIDE/DREAD threat modeling, plus `gosec` SAST, race detection, and fuzz testing. Apply when writing, reviewing, or auditing Go code for security, or when touching crypto, file or network I/O, secrets, user input, or authentication. Not for non-exploitable defensive bugs such as nil panics or slice aliasing (→ See `samber/cc-skills-golang@golang-safety` skill), dependency vulnerability scanning with govulncheck (→ See `samber/cc-skills-golang@golang-dependency-management` skill), or wiring security scanners into CI pipelines (→ See `samber/cc-skills-golang@golang-continuous-integration` skill).
90
89%
Does it follow best practices?
Impact
91%
1.13xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Gzip decompression with sentinel-error size limiting and secure temp file handling
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/lock
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/lock
Custom limited reader type
0%
100%
Sentinel error variable
0%
100%
Sentinel returned on limit exceeded
0%
100%
Max decompressed size constant
0%
100%
io.Copy through limited reader
0%
100%
os.CreateTemp for temp file
100%
33%
Temp file cleanup
100%
62%
Temp file restrictive permissions
100%
100%
Output file restrictive permissions
100%
100%
Directory restrictive permissions
0%
100%
Safe dynamic SQL with ORDER BY allowlist and parameterized filters
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/download/github.com/!d!a!t!a-!d!o!g/go-sqlmock/@v/list
/home/agent/go/pkg/mod/cache/download/github.com/!d!a!t!a-!d!o!g/go-sqlmock/@v/v1.5.2.info
/home/agent/go/pkg/mod/cache/download/github.com/!d!a!t!a-!d!o!g/go-sqlmock/@v/v1.5.2.lock
/home/agent/go/pkg/mod/cache/download/github.com/!d!a!t!a-!d!o!g/go-sqlmock/@v/v1.5.2.mod
/home/agent/go/pkg/mod/cache/download/github.com/!d!a!t!a-!d!o!g/go-sqlmock/@v/v1.5.2.zip
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/download/cloud.google.com/go/@v/list
/home/agent/go/pkg/mod/cache/download/cloud.google.com/go/@v/v0.123.0.info
/home/agent/go/pkg/mod/cache/download/cloud.google.com/go/@v/v0.123.0.lock
/home/agent/go/pkg/mod/cache/download/cloud.google.com/go/@v/v0.123.0.mod
/home/agent/go/pkg/mod/cache/download/cloud.google.com/go/@v/v0.123.0.zip
Sort column allowlist
100%
100%
Sort direction allowlist
100%
100%
Default sort column fallback
100%
100%
Category placeholder
100%
70%
Min price placeholder
100%
70%
No user-value SQL concatenation
100%
100%
Incremental WHERE building
100%
100%
Placeholder index tracking
100%
30%
Conditional filter application
100%
100%
Args slice usage
100%
100%
Go 1.24 stdlib KDF preference for password-based file encryption
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/lock
These are not visible to scoring or included in the download.
/home/agent/go/pkg/mod/cache/download/golang.org/x/crypto/@v/list
/home/agent/go/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.37.0.info
/home/agent/go/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.37.0.lock
/home/agent/go/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.37.0.mod
/home/agent/go/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.37.0.zip
Stdlib KDF import
100%
100%
AES-GCM mode
100%
100%
AES-256 key size
100%
100%
Random nonce per encryption
100%
100%
GCM nonce size
100%
100%
Strong password KDF
100%
100%
PBKDF2 iteration count
100%
100%
No weak KDF
100%
100%
Random salt
100%
100%
Go 1.24 module
100%
100%
19a0626
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.