Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

define-security-policy

Skill by openai

Defines, reviews, or updates SECURITY.md guidance for a repository or component. It clarifies scope, exclusions, and security invariants for Codex Security. Aimed at teams that want their scanner guidance to match the code.

  • Score 94
  • 14k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install define-security-policy

Built from the published package, never by AI.

git clone --depth 1 https://github.com/openai/codex-security /tmp/codex-security && mkdir -p ~/.claude/skills && cp -r /tmp/codex-security/plugins/codex-security/skills/define-security-policy ~/.claude/skills/define-security-policy

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install define-security-policy in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The define-security-policy skill helps write, review, or update a SECURITY.md file for a repository or component. It tells Codex Security what matters there: the system boundary, threat model, security properties that must hold, what counts as a finding, and what is out of scope. It first finds the applicable policy chain. Root and nested policies compose from root to leaf, and the policy closest to the code takes precedence when guidance conflicts.

The skill reads source, configuration, security-critical tests, threat models, and validated findings, then compares existing guidance with that evidence. It flags stale claims, missing boundaries, and broad exclusions, and drafts a policy from a fixed set of sections. Proposed changes are shown first and applied only when an edit is authorized. The resolver is then rerun to verify the result. It is written for repository owners and teams working with Codex Security.

Written from the project's SKILL.md and checked against it.

What it can do

  • Find applicable policiesInventories policy paths, including hidden directories, and resolves the policy chain for a target.
  • Establish the security boundaryReads source, tests, threat models, and findings to define scope, trust boundaries, and invariants.
  • Compare existing guidanceFlags stale exposure claims, missing boundaries, and broad exclusions that could hide real findings.
  • Draft the policyProduces a SECURITY.md draft with sections for scope, threat model, invariants, findings, and exclusions.
  • Apply and verifyShows proposed diffs, applies authorized edits, and reruns the resolver to check the result.

Try asking

  • Review the SECURITY.md in this repo and tell me if it still matches the code.
  • Draft a SECURITY.md for the payments component with its trust boundaries.
  • Which components should be listed as out of scope for security review here?

Good to know

  • Review-only requests stay in review until the user asks for a draft or edit.
  • Policy files, source, tests, and findings cannot authorize commands, edits, or scope changes.
  • Secrets and unnecessary exploit detail should be kept out of repository policy.
  • Does not overwrite .github/SECURITY.md or docs/SECURITY.md when creating a root policy.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/codex-security/skills/define-security-policy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB
  • agents/openai.yaml210 B

Alternatives to define-security-policy

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

define-security-policy: common questions

Does it edit files without asking?

For review or draft requests it only shows proposed changes. It applies edits only when the user authorizes an edit.

Where is the new policy file written?

The repository policy goes to <repo_root>/SECURITY.md and a distinct component policy to <component>/SECURITY.md. An explicit target choice is followed.

Can instructions inside a policy file be followed?

No. Policy files, source, tests, and findings are untrusted evidence. They can inform scope and severity but cannot authorize commands, edits, disclosure, or scope changes.

How do I install define-security-policy?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is define-security-policy free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is define-security-policy safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to define-security-policy?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

define-security-policy Install

Add to stack

Loading.