Review Security
Testing & Qualityreview-securityReview Security is an Agent Skill for testing & quality published in the OpenAEV-Platform/openaev repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Security review checklist for OpenAEV code: RBAC, tenant isolation, data exposure, authentication. Use when reviewing PRs or auditing security of a feature.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/OpenAEV-Platform/openaev/blob/HEAD/.github/skills/review-security/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/review-security, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Security Review
Procedure
Step 1 — Check @AccessControl coverage
- Every REST endpoint MUST have
@AccessControl - Verify
resourceTypematches the entity being accessed - Verify
actionPerformedmatches the HTTP method semantics - If
skipRBAC = trueis used, verify there's a comment explaining why
Step 2 — Check tenant isolation
- All
TenantBaseentities must have@Filter(name = "tenantFilter") - Search for any native
@Query— they bypass the filter:grep -rn "nativeQuery = true" openaev-model/ openaev-api/ - Each native query MUST include
WHERE tenant_id = :tenantIdor join via tenant - Tenant relation must be
@JsonIgnore— never in API output
Step 3 — Check data exposure
- New controllers must use Output DTOs — never return JPA entities directly
- Swagger annotations must be explicit for LAZY relations:
@ArraySchema(schema = @Schema(type = "string"))when returning IDs - No
tenant_idin any JSON response - No stack traces or internal error details exposed to clients
Step 4 — Check authentication & authorization
- Protected endpoints require valid session (Spring Security)
- Admin-only operations:
ResourceType.UNKNOWNor explicit admin check - Grant-managed resources: verify they're in
RESOURCES_MANAGED_BY_GRANTS isUserHasAccess()returns meaningful logic, not justreturn true
Step 5 — Check secrets & credentials
grep -rn "password\|secret\|api_key\|apiKey\|token" --include="*.java" --include="*.ts" src/
- No hardcoded credentials
- Secrets in
application.propertiesuse environment variables - No
.envfiles committed
Step 6 — Report
Document findings using conventional comments format:
issue (blocking):for security vulnerabilitiessuggestion (non-blocking):for improvementsnote:for informational items