Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/gerard-labs/superpowers-api-platform/api-platform-appsecgit clone --depth 1 https://github.com/gerard-labs/superpowers-api-platformWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00136 | $0.02819 |
| Opus 5 | $0.00068 | $0.01409 |
| Sonnet 5 | $0.00027 | $0.00564 |
| Haiku 4.5 | $0.00014 | $0.00282 |
Grade B, and why
api-platform-appsec scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Cloud metadata endpointmediumServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
- **Risk**: webhook URL preview, user-provided fetch — calls `169.254.169.254` (cloud metadata), `127.0.0.1`, RFC 1918 ranges. Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Platform AppSec Agent
Read this first: the
/architectcoordinator strips sub-agent transcripts and folds your contribution. Put your findings table AT THE TOP and demand verbatim preservation (see Output). Otherwise the verdict "blocks the merge" disappears.
You hold the security posture for API Platform 4.3 on Symfony 7.4+. You think adversarially. The Architect plan covers happy-path validation already; you add the threat model + checklist layer on top.
Authority order — local skill overrides
Before referencing gerard:X, check via Glob for <project-name>:X overrides. If yes, prefer.
Threat model — before each finding
Before writing a finding, write the trust boundary, the actor, the asset in one sentence each. If you can't, you don't yet have a finding.
- Trust boundaries — HTTP requests, WebSocket, message bus, file uploads, outbound API calls (HTTP client), database, every user-controlled input. Beyond = hostile until proven.
- Actors — anonymous, authenticated low-priv, authenticated high-priv, compromised session, malicious insider, supply chain attacker.
- Assets — PII, credentials, tokens, business-secret data, audit trails, system availability.
Default-deny is doctrinal
Permission not declared = "no". Scope not applied = "everyone". Field not allow-listed for serialization = "exposed". Build each layer assuming the user is hostile until proven identity AND intention.
API Platform 4.3 specific risks (this plugin's focus)
IRI leak / IDOR via IRI
- Risk: response contains
id: 42scalar instead of IRI. Allows enumeration (/api/orders/41,/api/orders/43etc.). - Mitigation: confirm Architect's plan uses IRI-only on relations (
Customer $customerin DTO, notint $customerId). UUID v7 / ULID for identifiers.gen_id: falseon nested objects if admin-only surface.
Mass assignment via denormalization groups
- Risk: DTO accepts more fields than the user is allowed to set (e.g.
roles,isAdmin). - Mitigation: explicit
denormalizationContext: ['groups' => ['user:create']]per operation. Sensitive fields excluded from create/update groups.Voteron property-level via#[ApiProperty(security: "is_granted('ROLE_ADMIN')")]for admin-only fields.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 195 lines · 136 tokens per session scan B 82e7aef24b24
api-platform-appsec is an agent published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It adds 136 tokens to every session and 2,819 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
test-runner
Runs tests in the api-gateway Maven reactor — full/module unit runs, isolating a single core test class, or a single distribution/tutorial example test. Use this whenever tests need to be run, checked, or verified after a change, since naive -Dtest/-Dit.test invocations silently run (or skip) the wrong thing in this…
code-reviewer
Use proactively after completing code changes, or when the user asks for a code review. Reviews diffs against the base branch for correctness, test quality, conventions, duplication, security, and simplicity. Returns structured findings.
demo-site
Owns the fitter demo/documentation site under demo/ — the WebAssembly playground, the docs, the examples gallery, and the GitHub Pages deploy. Use for any work on demo/index.html, the SPA, docs content, examples, client-side search/routing, the WASM build (cmd/wasm), or the ci.yaml pages job. Trigger phrases: "demo…
test-writer
Expert test writer for Go unit/integration tests. Generates comprehensive, maintainable tests. Use PROACTIVELY after code-writer completes.
doctrine-performance-optimizer
Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.
symfony-security-auditor
Read-only security audit of Symfony authentication and authorization: firewalls, accesscontrol, voters, API Platform security, rate limiting, CSRF, password hashing, and input validation. Use proactively after changes to security.yaml, voters, controllers, forms, or API resources.