/godmode:security-protocolfrom GodMode
Enforces security validation for all external data entering code: user input, files, auth, queries, shell commands, paths, HTTP responses, secrets, and dependencies. Use when crossing trust boundaries.
Ships in GodMode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every point where data enters your code from outside is a trust boundary: request bodies, headers, cookies, URLs, files, environment, message queues, third-party API responses, and model output. Data that crosses one is hostile until it has been validated for what it claims to be and encoded for where it is going. Validate on the way in, encode on the way out, authorise every action, and keep secrets out of code.
NO EXTERNAL DATA REACHES A SYSTEM CALL, QUERY OR OUTPUT WITHOUT VALIDATION
No exceptions. No workarounds. No shortcuts.
"System call" includes shell commands, file-system paths, outbound HTTP requests, deserialisers and eval-like functions. "Query" includes SQL, NoSQL, LDAP, XPath and search engines. "Output" includes HTML, JSON sent to browsers, logs, headers and prompts sent to a model.
Required:
Skip:
Map the boundaries. For the change in front of you, list every input source and every sink it reaches (database, shell, file system, network, browser, log). Write the list in the plan or PR description; it is the scope of the rest of this protocol.
Validate at the boundary, with an allowlist. Parse input into a typed shape with a schema at the point it enters: type, length, format, range, and an explicit set of allowed values where one exists. Reject what does not fit; do not try to repair it. Validation runs on the server even when the client also validates. Work through the checklist below.
Use the safe API for each sink.
Authorise every action on the server. For each endpoint or command, check that this user may perform this action on this specific resource. Deny by default. Never trust a role, user ID or price sent by the client.
Handle authentication and passwords with established libraries. Never write your own crypto, session or token scheme. Hash passwords with the algorithm the current OWASP guidance recommends (Argon2id first; parameters in the reference file). Session cookies are HttpOnly, Secure and SameSite; sessions rotate on login and expire.
Keep secrets out of code, logs and URLs. See Secrets Management below.
Fail closed. Errors in validation, authorisation or an external call must deny the action, release resources and return a generic message. Stack traces, SQL errors and internal paths never reach the user; they go to the server log without secrets.
Set the security headers for any HTTP response (table below).
Govern the supply chain. Before adding a dependency or CI action, check maintenance, known vulnerabilities and install scripts; commit lockfiles; pin CI actions to commit SHAs; run the ecosystem's audit (npm audit, pip-audit, cargo audit, govulncheck ./...) and a secret scanner (for example gitleaks git) in CI.
Test the abuse cases. Write failing tests first (godmode:test-first) for at least: another user's resource ID, an oversized and a malformed input, an injection payload for each sink, and an expired or missing token. Record the run as evidence.
Check against the current OWASP Top 10 in references/owasp-top-10.md before you call security work done. The list is revised every few years; confirm the edition is still current (godmode:grounding).
For every input field and parameter:
isAdmin by adding it (mass assignment).Never:
Always:
.env and its variants to .gitignore before the first commit, and commit only .env.example with placeholders.| Header | Starting value | Note |
|---|---|---|
Content-Security-Policy | default-src 'self'; frame-ancestors 'none'; object-src 'none' | Build up from restrictive; avoid unsafe-inline for scripts. frame-ancestors replaces X-Frame-Options in supporting browsers. |
Strict-Transport-Security | max-age=63072000; includeSubDomains; preload | HTTPS-only sites. Read the preload requirements before adding preload. |
X-Content-Type-Options | nosniff | Send correct Content-Type headers too. |
X-Frame-Options | DENY | For older browsers, alongside frame-ancestors. |
Referrer-Policy | strict-origin-when-cross-origin | Set explicitly rather than relying on browser defaults. |
Permissions-Policy | geolocation=(), camera=(), microphone=() | Disable every feature the site does not use. |
Cross-Origin-Opener-Policy | same-origin | Isolates the browsing context. |
X-XSS-Protection | 0, or omit | The old filter can create vulnerabilities; rely on CSP. |
Server, X-Powered-By | remove | They advertise the stack. |
CORS: allow specific origins only; never reflect the request origin or use * together with credentials.
| Rationalisation | Truth |
|---|---|
| "It's an internal tool." | Internal networks get breached and internal users make mistakes. The boundary is the code, not the firewall. |
| "The framework handles it." | Frameworks have escape hatches (raw queries, unescaped output, disabled CSRF). Know which ones this code uses. |
| "The front end validates it." | Anyone can call the API directly. Only server-side checks count. |
| "Nobody would send that." | Attackers send exactly that, automatically, at scale. |
| "We'll add security later." | Later means rewriting the data flow. It is cheapest while the code is being written. |
| "It's only a prototype." | Prototypes ship. A secret committed today stays in history. |
| "This dependency is popular, so it's safe." | Popular packages are the most attractive supply-chain targets. Check it and pin it. |
| "An error here is harmless." | Failing open on an exception skips the check that would have denied the request. |
Never:
eval.Always:
godmode:system-design: authentication strategy, data flow and trust zones are design decisions; settle them there first.godmode:test-first: abuse cases are written as failing tests before the fix or feature.godmode:quality-gates: dependency audit, secret scanning and static analysis run as machine-enforced gates.godmode:grounding: OWASP guidance, library APIs and header behaviour are verified against current sources.godmode:code-review: reviewers check the boundary map and the sinks list.godmode:completion-gate: security work is done only with the test and scan output in hand.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub noobygains/godmode --plugin godmode33 skills in this plugin
/agent-briefingUse when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff report between agents, or sending a message to another agent mid-task./codebase-conventionsUse when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration, error path or dependency, especially in a project the agent did not write or has not yet surveyed in this session./code-reviewUse when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the user asks for a review of a change, a branch or a pull request./completion-gateUse when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull request, closing a task, moving to the next task, or reporting a subagent's result as finished./cross-model-reviewUse when a reviewed change is about to land on a shared branch, be released or be deployed, and when the user asks for a second opinion on a change from a different model or a different AI vendor./delegated-executionUse when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each one can go to a fresh implementer subagent with its own review.Other plugins' skills for the same job