navikt/copilot/security-owasp
Claude Code and agent skill by navikt/copilot
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
OWASP Top 10:2025 kodenivå-mønstre for Kotlin, Go, Java og Node.js — tilgangskontroll, forsyningskjede, injeksjon og feilhåndtering
Install
npx vskill@latest install navikt/copilot/security-owaspSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as navikt/copilot/security-owasp.
OWASP Top 10:2025 — Code-Level Security
Tactical security patterns for Kotlin, Go, Java, and Node.js on NAIS, aligned with the 2025 OWASP Top 10.
Complements @security-champion-agent (architecture-level threat modeling) and the security-review skill (scanning tools).
Full code examples for each category: seeexamples.mdin this skill directory.
A01: Broken Access Control (incl. SSRF)
- Deny by default — require explicit grants, not explicit denials
- Resource-level checks — not just "is authenticated" but "owns this resource"
- M2M tokens — validate
azpclaim againstAZURE_APP_PRE_AUTHORIZED_APPS - SSRF — validate outbound URLs; use Nais
accessPolicy.outboundas defense-in-depth
A02: Security Misconfiguration
- CORS restricted to known origins — never
*oranyHost() - Debug/admin endpoints not on public ingress
- Error responses sanitized — no stack traces, SQL errors, or file paths to client
- Default-deny Nais
accessPolicy— explicit inbound/outbound only
A03: Software Supply Chain Failures (NEW in 2025)
- Pin all dependencies to exact versions; use lockfiles
- Scan dependencies:
govulncheck ./...,trivy repo .,./gradlew dependencyCheckAnalyze - GitHub Actions pinned to full commit SHA (not tags)
- Generate SBOM for production artifacts when possible
- Prefer well-maintained, first-party packages
A04: Cryptographic Failures
- Passwords: bcrypt (cost ≥ 12) or argon2id — never MD5/SHA-1/SHA-256
- Secrets: always from Nais environment variables or Secret resources — never hardcoded
- TLS 1.2+: never set
InsecureSkipVerify: true - Encryption: AES-256-GCM; rotate keys periodically
A05: Injection
- All SQL queries parameterized (
?/$1) — never string concatenation - No shell execution with user-controlled input
- Validate/sanitize all external input at service boundary
A09: Security Logging and Alerting Failures
- No PII in logs (fnr, name, address, tokens)
- Audit trail for sensitive operations (vedtak, utbetaling, tilgang)
- Correlation IDs propagated across services (OpenTelemetry trace context)
- Alerting on anomalous patterns (auth failures, rate spikes)
A10: Mishandling of Exceptional Conditions (NEW in 2025)
- Always handle errors — never ignore returned errors in Go
- Recover from panics at HTTP handler boundaries (middleware)
- Fail securely: deny access by default when state is uncertain
- Sanitize error messages: internal details stay in logs, not in responses
- Centralized error handling via middleware/exception mappers
Quick Reference Checklist
- [ ] A01 — Resource-level access checks on every endpoint (not just auth)
- [ ] A01 — M2M tokens validate
azpagainst pre-authorized apps - [ ] A01 — Outbound URLs validated; Nais egress policy configured
- [ ] A02 — CORS restricted to known origins
- [ ] A02 — Debug endpoints not on public ingress
- [ ] A02 — Error responses sanitized (no stack traces to client)
- [ ] A03 — Dependencies pinned to exact versions with lockfiles
- [ ] A03 —
govulncheck/trivy repo .pass without HIGH/CRITICAL - [ ] A03 — GitHub Actions pinned to full SHA
- [ ] A04 — bcrypt/argon2id for passwords, never MD5/SHA-1
- [ ] A04 — TLS 1.2+ enforced, no
InsecureSkipVerify - [ ] A04 — Secrets from environment/Nais, never hardcoded
- [ ] A05 — All SQL queries parameterized (
?/$1) - [ ] A05 — No shell execution with user input
- [ ] A07 — JWT validates
exp,iss,aud, and algorithm - [ ] A08 — Deserialization into concrete types only
- [ ] A09 — No PII in logs (fnr, name, address)
- [ ] A09 — Audit trail for sensitive operations
- [ ] A10 — All errors handled (no ignored returns in Go)
- [ ] A10 — Panic recovery in HTTP handlers
- [ ] A10 — Error messages sanitized before client responses
Related
| Resource | Use For | |
|---|---|---|
security-review skill | Pre-commit scanning (trivy, zizmor, govulncheck) | |
@security-champion-agent | Threat modeling, compliance, Nav security architecture | |
$nav-auth | JWT validation, TokenX, ID-porten implementation | |
threat-model skill | STRIDE-A analysis for new services | |
| OWASP Top 10:2025 | Official category descriptions | |
| OWASP Go SCP | Go-specific secure coding guide | |
| OWASP CI/CD Top 10 | Pipeline security risks | |
| sikkerhet.nav.no | Nav Golden Path |
Boundaries
✅ Always
- Parameterized queries for all SQL
- Resource-level access checks on every data-returning endpoint
- Structured logging without PII
- SHA-pinned GitHub Actions
- Explicit error handling (no ignored errors)
- Dependencies scanned before release
⚠️ Ask First
- Custom cryptographic implementations
- Disabling security features for testing
- Changing authentication or authorization logic
- Adding new outbound external hosts
🚫 Never
- String-concatenated SQL queries
InsecureSkipVerify: truein production- PII in log statements (fnr, name, address)
- Wildcard CORS (
*/anyHost()) - Hardcoded secrets or encryption keys
- Floating tags (
@main,@v3) for GitHub Actions - Silently swallowing errors without logging
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/security-owasp/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 13
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/navikt/copilot/security-owasp)