Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

step-04a-subagent-security.md 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ---
  2. name: 'step-04a-subagent-security'
  3. description: 'Subagent: Security NFR evidence audit'
  4. subagent: true
  5. outputFile: '/tmp/tea-nfr-security-{{timestamp}}.json'
  6. ---
  7. # Subagent 4A: Security NFR Evidence Audit
  8. ## SUBAGENT CONTEXT
  9. This is an **isolated subagent** running in parallel with other NFR domain evidence audits.
  10. **Your task:** Assess SECURITY NFR domain only.
  11. ---
  12. ## MANDATORY EXECUTION RULES
  13. - ✅ Assess SECURITY only (not performance, reliability, scalability)
  14. - ✅ Output structured JSON to temp file
  15. - ❌ Do NOT assess other NFR domains
  16. ---
  17. ## SUBAGENT TASK
  18. ### 1. Security Evidence Audit Categories
  19. **Assess the following security dimensions:**
  20. **A) Authentication & Authorization:**
  21. - OAuth2/JWT implementation
  22. - Session management
  23. - Multi-factor authentication
  24. - Role-based access control (RBAC)
  25. **B) Data Protection:**
  26. - Encryption at rest
  27. - Encryption in transit (HTTPS/TLS)
  28. - Sensitive data handling (PII, passwords)
  29. - Database encryption
  30. **C) Input Validation:**
  31. - SQL injection prevention
  32. - XSS prevention
  33. - CSRF protection
  34. - Input sanitization
  35. **D) API Security:**
  36. - Rate limiting
  37. - API authentication
  38. - CORS configuration
  39. - Security headers
  40. **E) Secrets Management:**
  41. - Environment variables for secrets
  42. - No hardcoded credentials
  43. - Secret rotation policies
  44. - Key management systems
  45. ### 2. Risk Assessment
  46. For each category, determine status:
  47. - **PASS**: Properly implemented
  48. - **CONCERN**: Partially implemented or weak
  49. - **FAIL**: Not implemented or critical vulnerability
  50. - **N/A**: Not applicable to this system
  51. ### 3. Compliance Check
  52. **Common compliance standards:**
  53. - SOC2
  54. - GDPR
  55. - HIPAA
  56. - PCI-DSS
  57. - ISO 27001
  58. ---
  59. ## OUTPUT FORMAT
  60. ```json
  61. {
  62. "domain": "security",
  63. "risk_level": "MEDIUM",
  64. "findings": [
  65. {
  66. "category": "Authentication",
  67. "status": "PASS",
  68. "description": "OAuth2 with JWT tokens implemented",
  69. "evidence": ["src/auth/oauth.ts", "JWT refresh token rotation"],
  70. "recommendations": []
  71. },
  72. {
  73. "category": "Data Encryption",
  74. "status": "CONCERN",
  75. "description": "Database encryption at rest not enabled",
  76. "evidence": ["Database config shows no encryption"],
  77. "recommendations": ["Enable database encryption at rest", "Use AWS RDS encryption or equivalent", "Implement key rotation policy"]
  78. },
  79. {
  80. "category": "Input Validation",
  81. "status": "FAIL",
  82. "description": "SQL injection vulnerability in search endpoint",
  83. "evidence": ["src/api/search.ts:42 - direct SQL concatenation"],
  84. "recommendations": ["URGENT: Use parameterized queries", "Add input sanitization library", "Implement WAF rules"]
  85. }
  86. ],
  87. "compliance": {
  88. "SOC2": "PARTIAL",
  89. "GDPR": "PASS",
  90. "HIPAA": "N/A",
  91. "PCI-DSS": "FAIL"
  92. },
  93. "priority_actions": [
  94. "Fix SQL injection vulnerability (URGENT)",
  95. "Enable database encryption within 30 days",
  96. "Implement rate limiting for all APIs"
  97. ],
  98. "summary": "Security posture is MEDIUM risk with 1 critical vulnerability requiring immediate attention"
  99. }
  100. ```
  101. ---
  102. ## EXIT CONDITION
  103. Subagent completes when JSON output written to temp file.
  104. **Subagent terminates here.**