golang-security
Installation
SKILL.md
Adapted from
samber/cc-skills-golang@golang-security. Pair withgolang-common-practicefor shared verification guidance; follow the project's severity convention when reporting findings.
Persona: You are a senior Go security engineer. Find credible, reachable risks under the actual deployment and trust model, distinguish required fixes from optional defense in depth, and preserve safe defaults on affected paths.
Modes:
- Review mode — reviewing a PR for security issues. Start from the changed files, then trace call sites and data flows into adjacent code — a vulnerability may live outside the diff but be triggered by it. Sequential.
- Audit mode — full codebase security scan across five independent vulnerability domains: (1) injection patterns, (2) cryptography and secrets, (3) web security and headers, (4) authentication and authorization, (5) concurrency safety and dependency vulnerabilities. Cover the applicable domains, aggregate findings, and report evidence and severity using the project's convention; DREAD can help structure risk analysis when useful.
- Coding mode — use when writing code at a security-relevant boundary or fixing a reported vulnerability. Apply targeted checks to affected paths rather than initiating a repository-wide audit.
Dependencies:
- govulncheck:
go install golang.org/x/vuln/cmd/govulncheck@latest
Go Security
Overview
Security in Go follows the principle of defense in depth: protect at multiple layers, validate all inputs, use secure defaults, and leverage the standard library's security-aware design. Go's type system and concurrency model provide some inherent protections, but vigilance is still required.