Agent SkillsOpenAEV-Platform/openaev › review-security

review-security

GitHub

提供OpenAEV代码的安全审查清单,涵盖RBAC、租户隔离、数据暴露、认证授权及密钥管理。用于PR审查和功能安全审计,确保符合安全规范。

.github/skills/review-security/SKILL.md OpenAEV-Platform/openaev

Trigger Scenarios

审查代码提交或PR时 对功能模块进行安全审计时

Install

npx skills add OpenAEV-Platform/openaev --skill review-security -g -y
More Options

Non-standard path

npx skills add https://github.com/OpenAEV-Platform/openaev/tree/main/.github/skills/review-security -g -y

Use without installing

npx skills use OpenAEV-Platform/openaev@review-security

指定 Agent (Claude Code)

npx skills add OpenAEV-Platform/openaev --skill review-security -a claude-code -g -y

安装 repo 全部 skill

npx skills add OpenAEV-Platform/openaev --all -g -y

预览 repo 内 skill

npx skills add OpenAEV-Platform/openaev --list

SKILL.md

Frontmatter
{
    "name": "review-security",
    "description": "Security review checklist for OpenAEV code: RBAC, tenant isolation, data exposure, authentication. Use when reviewing PRs or auditing security of a feature."
}

Security Review

Procedure

Step 1 — Check @AccessControl coverage

  • Every REST endpoint MUST have @AccessControl
  • Verify resourceType matches the entity being accessed
  • Verify actionPerformed matches the HTTP method semantics
  • If skipRBAC = true is used, verify there's a comment explaining why

Step 2 — Check tenant isolation

  • All TenantBase entities 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 = :tenantId or 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_id in 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.UNKNOWN or explicit admin check
  • Grant-managed resources: verify they're in RESOURCES_MANAGED_BY_GRANTS
  • isUserHasAccess() returns meaningful logic, not just return 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.properties use environment variables
  • No .env files committed

Step 6 — Report

Document findings using conventional comments format:

  • issue (blocking): for security vulnerabilities
  • suggestion (non-blocking): for improvements
  • note: for informational items

Version History

  • 3.260818.1 Current 2026-08-20 12:00

Same Skill Collection

.github/skills/add-contract-output-type/SKILL.md
.github/skills/add-migration/SKILL.md
.github/skills/add-test/SKILL.md
.github/skills/create-feature-module/SKILL.md
.github/skills/reduce-tx-baseline/SKILL.md
.github/skills/review-code/SKILL.md
.github/skills/review-docs/SKILL.md
.github/skills/review-frontend/SKILL.md
.github/skills/review-migration/SKILL.md
.github/skills/review-multi-tenancy/SKILL.md
.github/skills/review-performance/SKILL.md
.github/skills/activate-tenant-table/SKILL.md

Metadata

Files
0
Version
3.260818.1
Hash
e9ebe7e5
Indexed
2026-08-20 12:00

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 07:37
浙ICP备14020137号-1 $방문자$