oioio-space/unpixel / .claude/skills/vuln-guard
vuln-guard
VerifiedUse when reviewing changes or committing ANY Go code in this project — catches security vulnerabilities that scanners miss (auth/crypto logic, unsafe API use, injection). Pairs with the gosec + govulncheck pre-commit gates and the CI SBOM/grype scan.
Vuln Guard
Goal: no exploitable vulnerability reaches the repo. Layers:
- Deterministic, pre-commit —
gosec(Go SAST, 30+ rules) andgovulncheck(reachable dependency/stdlib CVEs) run in the gitpre-commithook (mise run scan:code:staged) and block the commit on a finding. - Deterministic, CI —
syftbuilds a CycloneDX SBOM andgrypescans it for CVEs (mise run sbom+mise run scan:sbom), as a dependency safety net. - AI review (this skill) — before you (Claude)
git commit, the PreToolUse hook injects this checklist so you reason about logic-level security the scanners can't.
Review the staged diff for:
- Crypto:
math/randfor anything security-relevant (usecrypto/rand), weak hashes (MD5/SHA1) for security, hardcoded keys/IVs,tls.Config{InsecureSkipVerify:true}, outdated TLS versions, ECB/static-IV modes. - Injection & untrusted input: building SQL/commands/paths from user input,
os/execwith a shell or interpolated args,text/template(nothtml/template) for HTML, path traversal (..), unvalidated deserialization. - AuthN/AuthZ logic: missing permission checks,
==for secret comparison (usesubtle.ConstantTimeCompare), JWT alg/signature not verified, predictable tokens/IDs, auth bypass on error paths. - Memory/DoS: unbounded reads/allocations from input, missing size limits on
request bodies, integer overflow in size math,
ReadAllon untrusted streams. - Resource handling: missing
defer Close(), leaking file descriptors, TOCTOU on files, world-writable file perms (0666/0777). - Errors that leak: returning internal errors/stack traces to clients, logging secrets or PII.
How to act
- Run
git diff --cachedand check the categories above. - On a finding: fix it, or if it is a deliberate false positive, annotate narrowly
(
//nolint:gosec // reason) — never silence whole files. - For a flagged dependency CVE (govulncheck/grype): bump the module, or if no fix exists, confirm the vulnerable symbol is unreachable and document why.
Notes
- gosec/govulncheck are the hard gates; this skill is the logic-level safety net.
- SBOM/grype run in CI (heavier, network) — see
mise run ci.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |