dev-toolings/superpowers-symfony118 installs
api-platform-security
Secure API Platform resources with security expressions, voters, securityPostValidation, and operation-level access control
How do I install this agent skill?
npx skills add https://github.com/dev-toolings/superpowers-symfony --skill api-platform-securityIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides technical documentation and code examples for implementing security best practices in Symfony and API Platform applications. No malicious patterns, data exfiltration, or unauthorized commands were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Api Platform Security (Symfony)
Use when
- Restricting who may call each operation of an API Platform resource.
- Authorization depends on the object (owner) or on the submitted data.
- Users must see only a subset of a collection.
- Fields must be hidden depending on role or ownership.
Default workflow
- Set
securityper operation withis_granted(),object, anduser, plus asecurityMessage. - Move complex rules into voters:
is_granted('POST_EDIT', object). - When the rule depends on input, use
securityPostDenormalize, orsecurityPostValidationto run after the Validator. - Scope rows with a
QueryCollectionExtensionInterface(andQueryItemExtensionInterface) or a state provider. - Hide fields with serializer groups and a decorated context builder, and guard the firewall with
access_control. - Test both the grant and the deny case for every protected operation.
Guardrails
- Never filter rows with a
securityexpression on a collection: it gates the whole collection, it does not scope it. - Order of checks:
security, denormalization,securityPostDenormalize, validation,securityPostValidation. previous_objectexists only insecurityPostDenormalize, andrequestonly at resource level.- Deny by default and mark secrets such as
passwordwith#[Ignore]. getAccessDecision()and the Twigaccess_decision()helper need Symfony 8.1 or later: verify before using them.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- The security expression and message per operation, and the voters involved.
- How collections and fields are scoped per user.
- Tests covering allowed, forbidden, and anonymous access.
References
reference.md
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/dev-toolings/superpowers-symfony/api-platform-security">View api-platform-security on skillZs</a>