web-of-flaws
AGENTS.md8 starsChanged 3 months agoMITView on GitHub
Web of Flaws is a machine-readable catalog of vulnerable web patterns and safer replacements. Every rule must help a developer or coding agent understand the security boundary, exploitation conditions, and appropriate remediation. The goal of the project is to serve both humans and machines. It means, all guides should be written in a way that is understandable by humans, but also structured and formatted in a way that can be parsed and processed by machines. Technical correctness, clear security reasoning,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- catalog/AGENTS.mdAGENTS.md
- .github/actions/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/scripts/AGENTS.mdAGENTS.md
- guides/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
24 rules. About 1 is common, 21 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 6
Every rule must help a developer or coding agent understand the security boundary, exploitation conditions, and appropriate remediation.
- Distinctive: line 15
Read this file first, then read the closest nested AGENTS.md for every directory you modify before you start.
- Distinctive: line 18
Do not duplicate parent rules in nested AGENTS.md files.
- Distinctive: line 19
Keep root instructions limited to rules that apply repo-wide.
- Distinctive: line 20
If you add a new module consider to add a new AGENTS.md file in that module to define its own rules if it has any specific requirements …
- Distinctive: line 21
If you change repository structure, update the instruction hierarchy accordingly.
- Distinctive: line 22
Keep agent instructions in sync with the repository's actual structure and behavior when you make changes.
- Distinctive: line 29
Use repository-provided scripts and configuration as the source of truth for validation behavior.
- Distinctive: line 30
Do not assume tools are installed globally when the repository defines a reproducible way to invoke them.
- Distinctive: line 31
Use paths relative to the repository root unless a local instruction explicitly defines another convention.
- Very specific: line 48
Follow .editorconfig and preserve existing formatting and naming conventions.
- Distinctive: line 49
Do not edit generated files by hand.
- Distinctive: line 50
Run the validations required by every applicable nested instruction file.
- Distinctive: line 52
Keep validation errors actionable: write them to stderr and return a nonzero exit status.
- Distinctive: line 54
Prefer existing repository conventions over introducing new abstractions, dependencies, or tooling.
- Distinctive: line 56
Do not perform unrelated cleanup or refactoring.
- Distinctive: line 61
Treat security content as technical documentation, not opinionated advice.
- Distinctive: line 62
Do not overstate vulnerability impact, exploitability, detection confidence, or mitigation guarantees.
- Distinctive: line 64
Prefer primary or authoritative technical sources over secondary summaries when verifying security behavior.
- Distinctive: line 65
Do not introduce intentionally insecure behavior outside examples whose purpose is to demonstrate a vulnerability.
- Common: line 66
Never add real secrets, credentials, private keys, access tokens, or sensitive production data.
- Distinctive: line 67
Treat external inputs and repository-controlled data as untrusted when they cross an execution or trust boundary.
- Very specific: line 71
Before finishing, run the relevant focused checks and report the commands that could not run.
- Distinctive: line 76
Do not claim that a change is complete, fixed, valid, or passing without fresh verification from the checks relevant to that change.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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.
Files
Agent Instructions for Web of Flaws
Purpose
Web of Flaws is a machine-readable catalog of vulnerable web patterns and safer replacements. Every rule must help a developer or coding agent understand the security boundary, exploitation conditions, and appropriate remediation.
The goal of the project is to serve both humans and machines. It means, all guides should be written in a way that is understandable by humans, but also structured and formatted in a way that can be parsed and processed by machines.
Technical correctness, clear security reasoning, and machine-readable consistency take priority over brevity or stylistic preference.
Instruction Hierarchy
Read this file first, then read the closest nested AGENTS.md for every directory you modify before you start.
The closest instruction file takes precedence for its subtree and may override or extend the rules in this file.
- Do not duplicate parent rules in nested AGENTS.md files.
- Keep root instructions limited to rules that apply repo-wide.
- If you add a new module consider to add a new AGENTS.md file in that module to define its own rules if it has any specific requirements valuable for code generation.
- If you change repository structure, update the instruction hierarchy accordingly.
- Keep agent instructions in sync with the repository's actual structure and behavior when you make changes.
Stack and Environment
- This is a documentation-first repository with Python tooling for validation, generation, and repository maintenance.
- Python code targets the version declared in
pyproject.toml. - Repository dependency and tool versions are defined by their existing configuration and lockfiles; do not introduce alternative package-management or build systems without an explicit architectural reason.
- Use repository-provided scripts and configuration as the source of truth for validation behavior.
- Do not assume tools are installed globally when the repository defines a reproducible way to invoke them.
- Use paths relative to the repository root unless a local instruction explicitly defines another convention.
Repository Structure
The repository is organized into the following top-level directories:
catalog/: machine-readable rule catalog and reference allowlist.github/: GitHub automation, workflow-local scripts, and Copilot integration instructionsguides/: human-readable rule guides with YAML frontmatterscripts/: Python tooling for validation, generation, and repository maintenance
For more information about particular directories, read the closest nested AGENTS.md or README.md in that directory.
Repository-wide Rules
- This is a documentation-first repository; do not introduce an application runtime or build step without an explicit architectural decision.
- Follow
.editorconfigand preserve existing formatting and naming conventions. - Do not edit generated files by hand.
- Run the validations required by every applicable nested instruction file. If a required tool is unavailable, report the missing check rather than substituting another tool.
- Keep validation errors actionable: write them to stderr and return a nonzero exit status.
- The primary branch is
main; use this name when you need to reference the default repository branch in your code or documentation. - Prefer existing repository conventions over introducing new abstractions, dependencies, or tooling.
- Make the smallest change that fully solves the requested problem.
- Do not perform unrelated cleanup or refactoring.
- Preserve backward compatibility unless the task explicitly requires a breaking change.
Security and Correctness
- Treat security content as technical documentation, not opinionated advice.
- Do not overstate vulnerability impact, exploitability, detection confidence, or mitigation guarantees.
- Distinguish candidate detection from confirmed exploitability.
- Prefer primary or authoritative technical sources over secondary summaries when verifying security behavior.
- Do not introduce intentionally insecure behavior outside examples whose purpose is to demonstrate a vulnerability.
- Never add real secrets, credentials, private keys, access tokens, or sensitive production data.
- Treat external inputs and repository-controlled data as untrusted when they cross an execution or trust boundary.
Completion
Before finishing, run the relevant focused checks and report the commands that could not run.
For changes spanning repository data or guides, python3 scripts/check.py is the central integrity
entry point.
Any nested AGENTS.md may define additional required checks.
Do not claim that a change is complete, fixed, valid, or passing without fresh verification from the checks relevant to that change.
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
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.

