agentleFS
kenhuanguskenhuangus/defense-factory-skills/skills/define-security-policy/SKILL.md

define-security-policy

Skill2 starsChanged 47 days agoMITView on GitHub

Creates or updates SECURITY.md and authorization scope for a repo in the Defense Factory prepare phase. Use when starting a defensive assessment, before inventory or scans, or when SLA/ownership rules are missing.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before build-inventory or any scan/validation skill

    line 15
  2. Distinctive:

    Write access to the target repository (or a docs location they specify).

    line 20
  3. Very specific:

    Prefer running python scripts/init_workspace.py --root <repo> first so .defense-factory/ exists.

    line 21
  4. Very specific:

    Write or update SECURITY.md at repo root with sections:

    line 32
  5. Distinctive:

    Do not invent legal authorization.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

define-security-policy

Phase: Prepare / shared context
Style: Blue (defensive)

When to use

  • Project has no usable SECURITY.md
  • Scope, authorization, or severity SLAs are unclear
  • Before build-inventory or any scan/validation skill

Preconditions

  1. User intends authorized defensive work on an owned or authorized system.
  2. Write access to the target repository (or a docs location they specify).
  3. Prefer running python scripts/init_workspace.py --root <repo> first so .defense-factory/ exists.

Procedure

  1. Locate existing policy: repo-root SECURITY.md, then .defense-factory/SECURITY.md.
  2. Interview or infer from repo docs:
    • Owner / security contact
    • In-scope assets and environments
    • Explicit out-of-scope items
    • Written authorization boundaries for any dynamic testing
    • Severity → SLA mapping
  3. Write or update SECURITY.md at repo root with sections:
    • Authorization
    • Scope (in / out)
    • Severity and SLA
    • Ownership defaults and escalation
    • Validation rules (dynamic evidence required)
    • Remediation rules (merge ≠ verified)
    • Reporting contact
  4. Mirror a pointer or copy under .defense-factory/SECURITY.md via init_workspace.py if the workspace is new.
  5. Record a short changelog note in .defense-factory/inventory/_policy_init.md with date and author.

Required outputs

PathContent
SECURITY.mdAuthoritative policy
.defense-factory/SECURITY.mdStub or pointer
.defense-factory/inventory/_policy_init.mdInit note

Stop / refuse

  • Refuse to encode authorization for attacking third-party systems the user does not own or lack written permission to test.
  • Do not invent legal authorization; require the user to state ownership or provide an authorization reference.

Next phase

Proceed to threat-model, then build-inventory.

Download now (ZIP)

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. openai/codex-security★ 11ksame name
    2. openai/plugins★ 7.4ksame name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.