.claude/skills/security-scan/SKILL.md
Run gosec and govulncheck to find security vulnerabilities. Use before releases or after dependency changes.
npx skillsauth add PeterBooker/veloria security-scanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run Go security scanners to find vulnerabilities in code and dependencies.
/security-scan - Full scan (gosec + govulncheck)/security-scan ./internal/api/... - Scan specific package with gosecRun gosec (static analysis)
gosec -exclude-generated -exclude-dir=internal/codesearch $ARGUMENTS 2>&1
If no arguments provided:
gosec -exclude-generated -exclude-dir=internal/codesearch ./... 2>&1
If gosec is not installed:
go install github.com/securego/gosec/v2/cmd/gosec@latest
Run govulncheck (dependency vulnerabilities)
govulncheck ./... 2>&1
If govulncheck is not installed:
go install golang.org/x/vuln/cmd/govulncheck@latest
Report findings
## Security Scan Results
### gosec (Code Analysis)
| Severity | File | Line | Issue |
|----------|------|------|-------|
### govulncheck (Dependencies)
| Module | Vulnerability | Severity | Fixed In |
|--------|--------------|----------|----------|
### Summary
- Code issues: N (high: N, medium: N, low: N)
- Vulnerable dependencies: N
For each finding, suggest a specific fix or mitigation.
The CI pipeline runs:
gosec -exclude-generated -exclude-dir=internal/codesearch ./...
A separate vulnerability.yml workflow checks for dependency vulnerabilities.
Running /security-scan locally catches both before pushing.
| Rule | Description | Common Fix | |------|-------------|------------| | G101 | Hardcoded credentials | Use env vars | | G104 | Unhandled errors | Add error checks | | G304 | File path from variable | Validate/sanitize path | | G401 | Weak crypto (MD5/SHA1) | Use SHA-256+ | | G501 | Insecure TLS | Use TLS 1.2+ |
development
Run Go unit tests. Use after code changes to verify correctness.
tools
Trigger reindexing of a specific WordPress extension. Use to rebuild the search index for a plugin, theme, or core version.
development
Run Go race detector to find data races in concurrent code. Use after any change to mutexes, goroutines, or channels.
tools
Run CPU and memory profiling with pprof to identify performance hotspots. Use when investigating high resource usage.