claudesec
AGENTS.md16 starsChanged 6 months agoMITView on GitHub
ClaudeSec is a DevSecOps toolkit for AI-assisted secure development. It provides a zero-dependency bash security scanner (see README's Scanner Categories for the per-category counts and the total), an ISMS PDCA dashboard, asset management integrations, and reusable CI/CD templates — all designed to integrate with Claude Code workflows. npm: claudesec — version 0.7.2 Dashboard served at http://localhost:11777/.
- Reads credentials
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 31,542 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 repository14 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- scanner/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/claude-agents-and-practices.mdcCursor rule
- .cursor/rules/claudesec-project.mdcCursor rule
- .cursor/rules/markdown-quality.mdcCursor rule
- .cursor/rules/no-sensitive-paths.mdcCursor rule
- .cursor/rules/security-citations.mdcCursor rule
- ci-config-guard-claudesecSkill
- kcov-debugSkill
- lychee-redirect-triageSkill
- omc-referenceSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 1 is common, 1 is distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 75
Single owner per task: Verify every change before handoff.
- Common: line 77
No PII, secrets, or company-specific IDs in the repo: Use environment variables only.
- Very specific: line 113
All new scanner checks require a corresponding test in scanner/tests/.
- Very specific: line 114
All Markdown must pass markdownlint.
- Very specific: line 128
Use log_info, log_warn, log_fail from scanner/lib/output.sh — no raw echo in checks.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
AGENTS.md — ClaudeSec
<!-- Generated: 2026-04-08 -->Purpose
ClaudeSec is a DevSecOps toolkit for AI-assisted secure development. It provides a zero-dependency bash security scanner (see README's Scanner Categories for the per-category counts and the total), an ISMS PDCA dashboard, asset management integrations, and reusable CI/CD templates — all designed to integrate with Claude Code workflows.
npm: claudesec — version 0.7.2
Tech Stack
- Scanner: Bash (zero external dependencies), Python 3 (dashboard, compliance mapping)
- Dashboard: Python 3, HTML/JS (single-file output), nginx (Docker serve)
- CI/CD: GitHub Actions, Prowler, CodeQL, Semgrep, Trivy, Gitleaks, OSV-Scanner
- Integrations: Datadog, Google Sheets, Notion, Jamf Pro, AWS CLI, Zscaler ZIA
- Runtime: Docker, Node.js >=18 (npm package only)
Directory Structure
claudesec/
├── scanner/ # Security scanner CLI (bash entrypoint + check modules)
│ ├── claudesec # Main CLI entrypoint
│ ├── checks/ # 11 check categories (ai, cicd, cloud, code, infra, ...)
│ ├── lib/ # Shared bash/python helpers (output, dashboard, compliance)
│ └── tests/ # Unit and integration tests (bash + pytest)
├── scripts/ # Automation: scan runners, dashboard builders, asset sync
├── hooks/ # Claude Code pre-commit and pre-write security hooks
├── templates/ # GitHub Actions workflow templates, example configs
├── docs/ # DevSecOps guides, compliance docs, AI security, architecture
│ ├── devsecops/ # OWASP, supply chain, cloud/K8s, pipeline, threat modeling
│ ├── ai/ # LLM Top 10, MITRE ATLAS, prompt injection, code review
│ ├── compliance/ # NIST CSF 2.0, ISO 27001/42001, KISA ISMS-P
│ ├── github/ # GitHub security features, branch protection, Actions
│ └── guides/ # Getting started, hourly ops, compliance mapping, workflows
├── assets/ # Logo, mascot, dashboard architecture SVG
├── bin/ # npm bin entrypoint (claudesec-cli.sh)
├── nginx/ # nginx config for dashboard serving
├── Dockerfile # Scanner image
├── Dockerfile.nginx # Dashboard serving image
├── docker-compose.yml # Full stack
└── docker-compose.quickstart.ymlQuick Start
# No install
npx claudesec scan
npx claudesec dashboard
# From clone
./run # Full scan + dashboard + serve (localhost:11777)
./run --quick # Quick 3-category scan
./run --docker # Docker mode
npm test # pytest scanner/tests/
# Scanner direct
./scanner/claudesec scan
./scanner/claudesec scan --category network
./scanner/claudesec scan --format json --severity high
# Setup
./scripts/setup.sh # Install hooks + templates
./scripts/quick-start.sh # Docker-first quick startDashboard served at http://localhost:11777/.
For AI Agents
Working Instructions
- Single owner per task. Verify every change before handoff.
- Security claims must cite sources: OWASP, NIST, CIS, MITRE ATLAS.
- No PII, secrets, or company-specific IDs in the repo. Use environment variables only.
- Markdown files require YAML frontmatter with
title,description,tags. - File names: kebab-case. Code blocks must specify language.
- Timestamps: KST (UTC+9).
Agent Roles
| Agent | Model | Responsibility |
sec-orchestrator | opus | Coordination, security workflow management, final acceptance |
sec-researcher | sonnet | Security research, threat analysis, OWASP/NIST evidence |
sec-implementer | sonnet | Code/docs changes, scanner checks, CI templates |
sec-reviewer | sonnet | Correctness, security risk, regression review |
ci-pipeline | sonnet | GitHub Actions, security scan automation |
Multi-agent workflows:
- Security guide: researcher → implementer → writer → reviewer → test-engineer
- Scanner feature: architect → implementer → test-engineer → ci-pipeline
- Hotfix: researcher → implementer → reviewer
The sec-* and ci-pipeline roles are project agents in .claude/agents/. The
architect, writer, and test-engineer steps above are generic roles sourced
from the global oh-my-claudecode agent catalog (there is no project-scoped
.claude/agents/ file for them) — substitute your own equivalents if you are not
running OMC.
Testing
npm test # Full pytest suite
python3 -m pytest scanner/tests/ -v # Verbose
bash scanner/tests/test_output_functions.sh
bash scanner/tests/test_check_cicd_pipeline.sh- All new scanner checks require a corresponding test in
scanner/tests/. - All Markdown must pass
markdownlint. - Links validated with
lychee "**/*.md". - Dashboard tests run offline. Any test that calls
generate_html_dashboardmust run withCLAUDESEC_DASHBOARD_OFFLINE=1, otherwisedashboard-gen.pymakes live GitHub API calls and the test can hang for minutes (root cause of the kcov 27-min stalls; see PR #190/#191). The kcov job sets it at the job level and every such test self-exports it; set the same in any new one. Enumerate them withgrep -l generate_html_dashboard scanner/tests/*.shrather than from a list here — this sentence named three and there were five, the two newest (#360, #473) having arrived after it was written.
Conventions
- Match existing bash style in
scanner/lib/checks.shfor new checks. - Use
log_info,log_warn,log_failfromscanner/lib/output.sh— no rawechoin checks. - New compliance mappings go in
scanner/lib/compliance-map.py. - CI templates live in
templates/; reference composite actions in.github/actions/.
Dependencies
| Tool | Required | Purpose |
| bash | Yes | Scanner runtime |
| Python 3 | Yes | Dashboard, compliance mapping, asset sync |
| Docker | No | Dashboard serving, scan isolation |
| Node.js >=18 | No | npm package only |
| Prowler | No | Deep cloud/K8s posture scanning |
| AWS CLI | No | Infrastructure inventory |
| pytest | Dev | Test runner (requirements-ci.txt) |
| ShellCheck | Dev | Shell lint (scripts/lint-shell.sh) |
Key environment variables: DD_API_KEY, DD_APP_KEY, ASSET_SHEET_ID, NOTION_TOKEN, JAMF_URL, JAMF_TOKEN, OKTA_OAUTH_TOKEN, GH_TOKEN, ZSCALER_API_KEY.
See docs/guides/claude-lead-agents-and-best-practices.md for full agent best practices.
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.

