Security Audit Loop by ATeam
Audit. Fix. Verify. Repeat until the gate passes.
Security Audit Loop is a plugin for AI coding agents. It runs a full security audit of a software project and keeps the team on it until every blocking issue is fixed and confirmed. It's built for Claude Code, the Claude app, Cursor and OpenAI Codex.
Most security checks give developers one long list and stop. This plugin keeps going. Every finding goes into a tracked register with a permanent ID and owner. Developers fix and explain each issue. A rescan confirms the fix before it's closed, and a gate decides when the project is ready for sign-off.
New in 1.2.0: scan just a branch or pull request before merging, import results from Anthropic's Claude Security plugin or any SARIF file, a second independent check on every serious finding and fix, tested patch drafts, guard rules that keep fixed issues fixed, and review-only audits in a Claude chat with no project folder. See What's new in 1.2.0.
It was built by ATeam Soft Solutions, is used by ATeam's delivery teams, and is shared as a contribution to the community.
Install
Claude Code and the Claude app
Search for "Security Audit Loop by ATeam" in Claude's plugin directory, or in Claude Code run:
/plugin install ateam-security-audit --marketplace ateamsoftsolutio/ateam-security-audit
On older versions of Claude Code, add the marketplace first:
/plugin marketplace add ateamsoftsolutio/ateam-security-audit
/plugin install ateam-security-audit@ateam-security
Cursor
-
Open a terminal in Cursor's local plugin folder,
.cursor/plugins/localinside your home folder. Create the folder if it doesn't exist. -
Run:
git clone https://github.com/ateamsoftsolutio/ateam-security-audit -
In Cursor, run Developer: Reload Window.
To update later, run git pull in the ateam-security-audit folder and reload again. On Cursor Enterprise, local plugin imports are off by default, so ask your Cursor admin.
OpenAI Codex
codex plugin marketplace add ateamsoftsolutio/ateam-security-audit
codex plugin add ateam-security-audit@ateam-security
Start a new Codex session after installing. To update later, run codex plugin marketplace upgrade ateam-security.
Updating
- Installed from Claude's plugin directory (the Claude app, Cowork, or Claude Code signed in with the same account): updates arrive on their own once a new version is published in the directory.
- Installed in Claude Code with the
--marketplacecommand above: this marketplace doesn't auto-update by default. Turn it on once in/plugin→ Marketplaces →ateam-security→ Enable auto-update, or update now withclaude plugin marketplace update ateam-securityfollowed byclaude plugin update ateam-security-audit@ateam-security. Then run/reload-plugins. - Cursor:
git pullin the plugin folder, then reload the window. Codex:codex plugin marketplace upgrade ateam-security.
For a whole team (Claude Code)
Commit this to the project's .claude/settings.json, so the plugin is turned on for everyone who works in the repository and the marketplace keeps itself up to date:
{
"extraKnownMarketplaces": {
"ateam-security": {
"source": { "source": "github", "repo": "ateamsoftsolutio/ateam-security-audit" },
"autoUpdate": true
}
},
"enabledPlugins": {
"ateam-security-audit@ateam-security": true
}
}
Each teammate still runs the install command once on their own machine. Administrators can set the same keys in managed settings for the whole organisation.
Other agents
The repository also has a root plugin.json in the open Agent Plugins format, so other agents that support that format may load it. We support Claude, Cursor and Codex.
The three skills
| Skill | Say | What it does |
|---|---|---|
security-audit | "Run Security Audit" · "Scan my branch" · "Audit this PR" · "Import Claude Security results" · "Write guard rules" | Scopes the project, maps the attack surface and threat model, runs open-source scanners, adds the agent's own code review with an independent check of serious findings, and writes the findings register. Also scans a single change, imports other tools' results and writes guard rules. |
security-fix | "Help me fix SEC-004" · "Draft patches for the Highs" | Explains the risk, gets the developer's root cause, guides or drafts the fix, writes tested patch files on request, looks for the same flaw elsewhere, and handles secret rotation, false positives and accepted risks |
security-verify | "Verify" | Rescans, confirms each fix (with an independent check for Critical and High), reopens anything that came back, finds new issues, applies the gate, refreshes guard rules, and produces the sign-off report and optional CI scan |
Asking in plain words works in every tool. You can also call a skill directly: type /security-audit in Cursor's Agent chat, or type $ in Codex and choose the skill.
What's new in 1.2.0
- Change scans. "Scan my branch", "audit this PR" or "check commit abc1234" reviews only that change, before it's merged, and records what it introduced in the same register. A change check passes or fails on what the change added. Only a full verify signs a project off.
- Works with Anthropic's security plugins. "Import Claude Security results" brings the findings from Anthropic's Claude Security plugin into the register, merged with anything already there, so its deep scan feeds this plugin's fix, verify and sign-off loop. Any SARIF file (CodeQL, Semgrep Pro, Snyk, SonarQube) can be imported the same way.
- Guard rules. After an audit or verify, the plugin offers to write the register's lessons as rules for the coding agent: in
.claude/claude-security-guidance.mdand.claude/security-patterns.jsonfor Anthropic's security-guidance plugin, which checks every edit against them, and inCLAUDE.md, Cursor rules orAGENTS.md. Fixed issues stay fixed between audits, without the plugin running any code itself. - Independent check. Every Critical and High finding, every dismissed scanner hit and every Critical or High fix is checked by a second reviewer with a fresh context (a subagent where the tool supports one) that tries to prove it wrong.
- Patch drafts. "Draft patches for the Highs" writes each fix as a patch file, made in a scratch copy of the repository, tested, and checked by a second reviewer. Nothing is applied for you.
- Chat mode. In a Claude chat without a project folder, the plugin runs a review-only audit of an uploaded zip or a GitHub repository, clearly labelled "Reduced coverage", and gives you the register to save into the project.
- Deeper checks: a threat model in every scope, malicious packages reported as Critical findings, an explicit log-injection check, optional CodeQL for data flow across files, and Oman added to the compliance flags.
What it checks
- Secrets: committed
.envfiles, keys in code and in git history,.envfiles in public build folders, secrets in front-end bundles (NEXT_PUBLIC_,VITE_,REACT_APP_) - Code: injection (SQL, NoSQL, command, code), XSS, SSRF, path traversal, unsafe deserialisation, weak cryptography
- Access control and authentication: missing ownership checks (IDOR), unprotected admin functions, session and JWT flaws, brute-force protection. Scanners rarely find these; the agent's own review does most of the work here.
- Dependencies: known vulnerabilities, grouped by package, with the version that fixes them
- Infrastructure and CI: Dockerfiles, compose, Kubernetes and Terraform files, and GitHub Actions workflows (unpinned actions, excessive permissions, unsafe triggers)
- Business logic: skipped steps, client-side prices, race conditions, unverified webhooks
- AI features: the OWASP Top 10 for LLM Applications, including prompt injection, excessive agency, improper output handling and unbounded consumption
- Compliance flags for health, payment and personal data. These are prompts to check with the right person, not legal advice.
Findings are mapped to the OWASP Top 10:2025 and CWE.
How the loop works
security-audit → register (.security-audit/) → security-fix → security-verify
↑ │
└── gate failed ───┘
gate passed → sign-off report + CI scan
- One register:
findings.jsonwith a readableFINDINGS.md, a run summary for every scan and an append-onlyhistory.jsonl. Optional SARIF export for GitHub's Security tab. - Fingerprints match the same issue across scans even when the code moves, so rescans say exactly what was fixed, what is still open, what came back and what is new.
- Only a rescan closes a finding. Developers can mark a finding Fixed; only
security-verifycan mark it Verified, after reading the fix. - People decide. False positives need a second person to agree. Accepted risks need the approver, a reason and an expiry date. Critical findings can't be accepted by default.
- The default gate: no open Critical or High findings, and every Medium fixed or formally accepted.
- One register format in every tool. Each run records which agent and model did the review, where the tool states them.
Scanners
The plugin uses free, open-source scanners where they're installed, and offers to install missing ones with your approval:
| Purpose | Tool |
|---|---|
| Secrets | Gitleaks |
| Code | Semgrep Community Edition |
| Dependencies | OSV-Scanner (npm audit and pip-audit optional) |
| Infrastructure as code | Checkov |
| CI workflows | zizmor |
| Language-specific, optional | Bandit, Trivy and others |
| Data flow across files, optional | CodeQL (free for open-source code; private code needs a GitHub licence that covers it) |
Without scanners, the agent reviews the code alone and labels the audit "Reduced coverage".
Connectors (optional)
Nothing is required. If your tool has them connected (Claude connectors, or MCP servers in Cursor and Codex), and you approve each one when the audit asks:
- GitHub: reads existing code-scanning, secret-scanning and Dependabot alerts, creates issues for findings, and keeps them in step with the register
- Jira, Linear or Asana: findings as tickets
- SonarQube or Snyk: existing results merged into the register instead of scanning twice
- Claude Security and SARIF files: imported from the project folder, no connector needed
The skills always ask before creating or changing anything in another system. Tickets never contain secrets or exploit steps.
Make it yours
Copy security-house-rules.md into your project and edit it to set:
- approver
- blocking severities
- acceptance period
- report format
- compliance regions
- allowed connectors
- your own rules
What this plugin does and does not do
- Instructions only. It contains only instructions for the agent (skills) and reference notes. It has no MCP servers, hooks or scripts of its own.
- The review is only as good as the model running it. The skills run on whichever model your tool uses. Each run records the agent and model in the register, where the tool states them.
- Scanners run on your machine, with your approval. Before running any scanner that contacts the internet, the agent says what it sends. For example, OSV-Scanner sends package names and versions, not code.
- It doesn't attack running systems. The audit is static by default. Live testing is only for local or staging environments, with your written confirmation that you're authorised.
- The skills tell the agent never to print or store full secret values, and to check the register for leaked secrets before showing it.
- A passed gate isn't a guarantee. It means no blocking findings remained against the stated scope and checks at a given commit. It doesn't mean the application is free of vulnerabilities. For high-risk applications, also commission a penetration test of the running system.
- It works alongside Anthropic's security plugins. The security-guidance plugin checks code as it's written, and can enforce this plugin's guard rules on every edit. The Claude Security plugin runs a deep multi-agent scan, whose results this plugin can import. This plugin keeps the register, makes sure every finding is fixed and verified, and decides when the project is ready for sign-off.
Benchmark
Version 1.0.0 of the plugin, running with Claude, found 28 of 29 known issues in a deliberately vulnerable Node.js test application. Through the fix loop, it verified real fixes, rejected a fake fix and caught a new flaw introduced during fixing. Results with other models will differ. See BENCHMARK.md for the method and the caveats.
Use only on code you are authorised to audit
The plugin asks you to confirm authorisation before it starts.
Privacy
See the Privacy policy. In short: ATeam collects nothing, and the plugin has no servers of its own. Your code is processed by the AI tool you run it in, under that tool's terms.
Files in this repository
| File | Used by |
|---|---|
.claude-plugin/plugin.json, .claude-plugin/marketplace.json | Claude Code and Claude's plugin directory. Codex also reads the marketplace file. |
.cursor-plugin/plugin.json | Cursor |
plugin.json | Codex and other agents that support the Agent Plugins format |
skills/ | All of them |
Licence
MIT. See LICENSE.
Feedback and support
Please raise issues and suggestions in the repository's Issues.