The official agent library for agentgg — AI-powered SAST agents for code security review.
Every template is one kind of thing: an agent. A .md file with YAML frontmatter (a precondition and a where) and a markdown body that is the prompt. There are no execution modes — every agent is a tool-enabled investigation (Read/Glob/Grep) that runs over the files its where selects.
agentgg downloads this catalog automatically on first scan and refreshes it with agentgg agents update. No manual setup needed.
Documentation · agentgg CLI · agentgg.dev
agentgg-agents/
├── agents/ # The agent library, organized by category
│ ├── injection/ # SQL, NoSQL, command, XSS, path traversal, mass assignment
│ ├── auth/ # Authentication, authorization, JWT, OAuth, session, IDOR
│ ├── misconfiguration/ # CORS, caching, cookies, feature-flag security
│ ├── logic/ # Race conditions, async bugs, event handler mismatches
│ ├── infrastructure/ # Docker, Kubernetes, Terraform, GitHub Actions
│ ├── cloud/ # AWS Lambda, GCP, Azure, IAM
│ ├── cryptography/ # Insecure algorithms, unsafe deserialization
│ ├── mobile/ # Android, iOS
│ ├── smartcontract/ # Solidity access control, reentrancy
│ ├── ai/ # Agent loops, tool definitions, MCP handlers
│ └── deep/ # Broad-net variants — opt-in only, never run by default
└── semgrep-rules/ # Shared semgrep rules agents reference by name
Every category except deep/ runs when no -t flag is given. deep/ agents cast a much wider net per run, so they are opt-in via -t.
agentgg scan ./src # every category except deep/
agentgg scan ./src -t agents/injection/ # one category
agentgg scan ./src -t agents/injection/ -t agents/auth/ # multiple
agentgg scan ./src -t agents/deep/ # the broad-net variants
agentgg scan ./src -t sql-injection # a single agent by slug
agentgg agents update # refresh the catalogSee Choose agents for the full selection rules.
An agent declares a precondition (should this run on this repo?), a where (which files?), and the instructions (the prompt body):
---
slug: sql-injection
name: SQL Injection
description: SQL built from untrusted input instead of parameterized queries.
version: 0.1.0
author: your-github-handle
noiseTier: normal
precondition:
regex:
patterns:
- regex: "\\.(query|execute)\\s*\\("
in: ["**/*.{ts,js,py,go,php}"]
where:
extensions: [ts, js, py, go, php]
excludePatterns: ["**/*.{test,spec}.*"]
preFilter:
- { regex: "\\.(query|execute)\\s*\\(", label: "raw SQL call" }
references:
- CWE-89
- OWASP-A03:2021
---
You are reviewing source code for SQL injection...Every frontmatter field is documented at:
- Agent anatomy — the file format and every frontmatter field
- Targeting —
preconditionandwherein full - Create from reports — turn a past incident into an agent
- Manage agents — list, lint, and update the catalog
See CONTRIBUTING.md for the full guide. In short:
- Fork this repo
- Add a new
.mdagent in the appropriate category folder (slug must match the filename) - Test it locally:
agentgg scan ./test-fixture -t ./your-agent.md - Lint the whole tree:
agentgg agents lint . - Open a pull request
New agents should have:
- A focused, single-responsibility prompt with clear true-positive and false-positive criteria
- A
wherescoped to the relevant files (extensionsplus apreFilterfor the suspicious construct) - A
preconditionso the agent skips repos it can't apply to (cheapregex, and/or apromptgate) - A CWE / CVE / OWASP reference when one fits (optional)
To report a vulnerability privately, see SECURITY.md.
The agent library is licensed under the MIT License. See LICENSE for the full text.
