agentic-sdlc 1.0.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
- package/.agent/ide-integration/KIRO-IDE.md +381 -0
- package/.agent/ide-integration/README.md +256 -209
- package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
- package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
- package/.agent/knowledge-base/INDEX.md +43 -0
- package/.agent/knowledge-base/README.md +47 -7
- package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
- package/.agent/knowledge-base/architecture/README.md +98 -0
- package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
- package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
- package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
- package/.agent/knowledge-base/features/README.md +83 -0
- package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
- package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
- package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
- package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
- package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
- package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
- package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
- package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
- package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
- package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
- package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
- package/.agent/rules/AUTO-LEARNING.md +418 -0
- package/.agent/rules/ai-enforcement.md +11 -0
- package/.agent/rules/artifacts.md +77 -58
- package/.agent/rules/git-workflow.md +25 -65
- package/.agent/rules/global.md +18 -13
- package/.agent/skills/role-ba.md +76 -0
- package/.agent/skills/role-brain.md +470 -0
- package/.agent/skills/role-dev.md +338 -0
- package/.agent/skills/role-devops.md +122 -0
- package/.agent/skills/role-orchestrator.md +223 -0
- package/.agent/skills/role-pm.md +258 -0
- package/.agent/skills/role-po.md +237 -0
- package/.agent/skills/role-qa.md +81 -0
- package/.agent/skills/role-reporter.md +117 -0
- package/.agent/skills/role-sa.md +277 -0
- package/.agent/skills/role-seca.md +294 -0
- package/.agent/skills/role-stakeholder.md +105 -0
- package/.agent/skills/role-tester.md +294 -0
- package/.agent/skills/role-uiux.md +264 -0
- package/.agent/templates/CHANGELOG-Template.md +83 -0
- package/.agent/templates/Knowledge-Entry-Template.md +3 -0
- package/.agent/workflows/brain.md +84 -53
- package/.agent/workflows/compound.md +51 -0
- package/.agent/workflows/cycle.md +61 -0
- package/.agent/workflows/emergency.md +114 -0
- package/.agent/workflows/explore.md +147 -0
- package/.agent/workflows/housekeeping.md +105 -0
- package/.agent/workflows/metrics.md +179 -0
- package/.agent/workflows/orchestrator.md +68 -0
- package/.agent/workflows/preflight.md +35 -0
- package/.agent/workflows/release.md +153 -0
- package/.agent/workflows/route.md +160 -0
- package/.agent/workflows/sprint.md +125 -0
- package/.agent/workflows/validate.md +146 -0
- package/CHANGELOG.md +349 -6
- package/README.md +171 -86
- package/bin/CROSS-PLATFORM-CLI.md +526 -0
- package/bin/README.md +525 -0
- package/bin/cli.js +65 -90
- package/bin/kb +34 -0
- package/bin/kb.bat +28 -0
- package/bin/kb_cli.py +226 -0
- package/bin/lib/README.md +411 -0
- package/bin/lib/__init__.py +7 -0
- package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
- package/bin/lib/kb_add.py +203 -0
- package/bin/lib/kb_common.py +224 -0
- package/bin/lib/kb_compound.py +250 -0
- package/bin/lib/kb_index.py +193 -0
- package/bin/lib/kb_list.py +144 -0
- package/bin/lib/kb_search.py +121 -0
- package/bin/lib/kb_stats.py +153 -0
- package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
- package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
- package/docs/BRAIN-ARCHITECTURE.md +396 -0
- package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
- package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
- package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
- package/docs/MONOREPO-ARCHITECTURE.md +492 -0
- package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
- package/docs/SDLC-Diagram.md +235 -0
- package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
- package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
- package/docs/architecture/{brain.md → BRAIN.md} +1 -1
- package/docs/global/Master-Documentation.md +307 -0
- package/docs/global/reports/Final-Approval-Report.md +257 -0
- package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
- package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
- package/docs/guides/LEARNING-FLOW.md +0 -0
- package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
- package/docs/guides/MCP-SETUP.md +139 -0
- package/docs/guides/QUICK-START.md +4 -0
- package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
- package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
- package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
- package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
- package/docs/reports/Validation-Report-2026-01-04.md +23 -0
- package/docs/research-reports/research-20260103-101315.json +95 -0
- package/docs/research-reports/research-20260103-101315.md +78 -0
- package/docs/research-reports/research-20260103-183837.json +95 -0
- package/docs/research-reports/research-20260103-183837.md +78 -0
- package/docs/research-reports/research-20260103-190346.json +100 -0
- package/docs/research-reports/research-20260103-190346.md +83 -0
- package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
- package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
- package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
- package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
- package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
- package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
- package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
- package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
- package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
- package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
- package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
- package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
- package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
- package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
- package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
- package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
- package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
- package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
- package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
- package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
- package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
- package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
- package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
- package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
- package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
- package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
- package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
- package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
- package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
- package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
- package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
- package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
- package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
- package/docs/sprints/sprint-6/.brain-state.json +29 -0
- package/package.json +92 -16
- package/.agent/ide-integration/aider-commands.md +0 -40
- package/.agent/ide-integration/cline-config.json +0 -108
- package/.agent/ide-integration/cursor-rules.md +0 -63
- package/.agent/ide-integration/github-copilot-instructions.md +0 -75
- package/.agent/ide-integration/vscode-commands.json +0 -190
- package/.agent/ide-integration/windsurf-cascade.md +0 -125
- package/.agent/knowledge-base/index.md +0 -202
- package/.agent/legacy/roles/designer.md +0 -311
- package/.agent/legacy/roles/dev.md +0 -177
- package/.agent/legacy/roles/devops.md +0 -146
- package/.agent/legacy/roles/orchestrator.md +0 -339
- package/.agent/legacy/roles/pm.md +0 -120
- package/.agent/legacy/roles/po.md +0 -89
- package/.agent/legacy/roles/qa.md +0 -108
- package/.agent/legacy/roles/reporter.md +0 -70
- package/.agent/legacy/roles/sa.md +0 -118
- package/.agent/legacy/roles/seca.md +0 -112
- package/.agent/legacy/roles/stakeholder.md +0 -111
- package/.agent/legacy/roles/tester.md +0 -129
- package/.agent/rules/global.md.bak +0 -154
- package/.agent/usage.md +0 -653
- package/.agent/workflows/auto.md +0 -35
- package/.agent/workflows/dev.md +0 -30
- package/.agent/workflows/devops.md +0 -28
- package/.agent/workflows/kb-search.md +0 -22
- package/.agent/workflows/pm.md +0 -42
- package/.agent/workflows/po.md +0 -21
- package/.agent/workflows/qa.md +0 -31
- package/.agent/workflows/reporter.md +0 -21
- package/.agent/workflows/sa.md +0 -51
- package/.agent/workflows/seca.md +0 -21
- package/.agent/workflows/stakeholder.md +0 -26
- package/.agent/workflows/tester.md +0 -21
- package/.agent/workflows/uiux.md +0 -38
- package/.cursorrules +0 -49
- package/.env.template +0 -10
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
- package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
- package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
- package/.github/copilot-instructions.md +0 -60
- package/bin/commands/create.js +0 -96
- package/bin/commands/help.js +0 -69
- package/bin/commands/ide.js +0 -116
- package/bin/commands/init-kb.js +0 -74
- package/bin/commands/install.js +0 -68
- package/bin/commands/list.js +0 -35
- package/bin/graph_brain.py +0 -86
- package/bin/sync_github.py +0 -75
- package/bin/utils/args-parser.js +0 -33
- package/bin/utils/colors.js +0 -21
- package/bin/verify_neo4j.py +0 -25
- /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
- /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
- /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
- /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
# 🔒 Security Analyst - Knowledge Base Guide
|
|
2
|
+
|
|
3
|
+
## Role: @SECA (Security Analyst)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 Your Auto-Learning Responsibilities
|
|
8
|
+
|
|
9
|
+
As SECA, you capture knowledge about:
|
|
10
|
+
- Security vulnerabilities and fixes
|
|
11
|
+
- Attack patterns and prevention
|
|
12
|
+
- Security best practices
|
|
13
|
+
- Compliance issues
|
|
14
|
+
- Authentication/authorization patterns
|
|
15
|
+
- Data protection strategies
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🔄 Auto-Learning Triggers for SECA
|
|
20
|
+
|
|
21
|
+
### Mandatory KB Entry Creation
|
|
22
|
+
|
|
23
|
+
| Trigger | When | Category | Example |
|
|
24
|
+
|---------|------|----------|---------|
|
|
25
|
+
| **Vulnerability Found** | Any security vulnerability | Security | KB-[date]-###-vulnerability |
|
|
26
|
+
| **Security Incident** | Security breach or attempt | Security | KB-[date]-###-security-incident |
|
|
27
|
+
| **Auth Issue** | Authentication/authorization bug | Security | KB-[date]-###-auth-issue |
|
|
28
|
+
| **Data Leak** | Data exposure vulnerability | Security | KB-[date]-###-data-leak |
|
|
29
|
+
| **Injection Attack** | SQL/XSS/CSRF vulnerability | Security | KB-[date]-###-injection-vuln |
|
|
30
|
+
| **Compliance Issue** | GDPR/HIPAA/PCI violation | Security | KB-[date]-###-compliance-issue |
|
|
31
|
+
| **Crypto Issue** | Encryption/hashing problem | Security | KB-[date]-###-crypto-issue |
|
|
32
|
+
| **Access Control** | Privilege escalation bug | Security | KB-[date]-###-access-control |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📝 KB Entry Template for SECA
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
# KB-[YYYY-MM-DD]-[###] - [Security Issue Title]
|
|
40
|
+
|
|
41
|
+
## Document Info
|
|
42
|
+
| Field | Value |
|
|
43
|
+
|-------|-------|
|
|
44
|
+
| ID | KB-[YYYY-MM-DD]-[###] |
|
|
45
|
+
| Date | [YYYY-MM-DD] |
|
|
46
|
+
| Author | @SECA |
|
|
47
|
+
| Category | Security |
|
|
48
|
+
| Severity | [Critical/High/Medium/Low] |
|
|
49
|
+
| Auto-Generated | Yes |
|
|
50
|
+
| Source Task | [Task ID] |
|
|
51
|
+
| Sprint | [N] |
|
|
52
|
+
| Tags | #security #vulnerability #auto-learned |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Security Issue Description
|
|
57
|
+
|
|
58
|
+
### Vulnerability Type
|
|
59
|
+
- **Type:** [SQL Injection/XSS/CSRF/Auth Bypass/etc.]
|
|
60
|
+
- **CWE ID:** [CWE-###]
|
|
61
|
+
- **CVSS Score:** [Score] ([Severity])
|
|
62
|
+
|
|
63
|
+
### Issue
|
|
64
|
+
[Clear description of the security vulnerability]
|
|
65
|
+
|
|
66
|
+
### Attack Vector
|
|
67
|
+
[How the vulnerability can be exploited]
|
|
68
|
+
|
|
69
|
+
### Proof of Concept
|
|
70
|
+
```bash
|
|
71
|
+
# Example attack
|
|
72
|
+
[PoC code or commands]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Impact Assessment
|
|
78
|
+
|
|
79
|
+
### Severity Analysis
|
|
80
|
+
- **Confidentiality:** [None/Low/High]
|
|
81
|
+
- **Integrity:** [None/Low/High]
|
|
82
|
+
- **Availability:** [None/Low/High]
|
|
83
|
+
|
|
84
|
+
### Business Impact
|
|
85
|
+
- **Data at Risk:** [Type and amount]
|
|
86
|
+
- **Users Affected:** [Number/Percentage]
|
|
87
|
+
- **Compliance Impact:** [GDPR/HIPAA/PCI/etc.]
|
|
88
|
+
- **Reputation Risk:** [Low/Medium/High]
|
|
89
|
+
|
|
90
|
+
### Technical Impact
|
|
91
|
+
- **Systems Affected:** [List]
|
|
92
|
+
- **Data Exposed:** [Type]
|
|
93
|
+
- **Privilege Level:** [User/Admin/System]
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Context
|
|
98
|
+
|
|
99
|
+
### Affected Components
|
|
100
|
+
- **Component:** [Component name]
|
|
101
|
+
- **File Path:** [Path]
|
|
102
|
+
- **Technology:** [Framework/Library]
|
|
103
|
+
- **Version:** [Version number]
|
|
104
|
+
|
|
105
|
+
### Vulnerable Code
|
|
106
|
+
```javascript
|
|
107
|
+
// Vulnerable code
|
|
108
|
+
[code snippet showing vulnerability]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Discovery Method
|
|
112
|
+
- **Method:** [Security scan/Code review/Penetration test/Bug report]
|
|
113
|
+
- **Tool Used:** [If applicable]
|
|
114
|
+
- **Discovered By:** [Person/Team]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Root Cause Analysis
|
|
119
|
+
|
|
120
|
+
### Why Vulnerability Exists
|
|
121
|
+
[Detailed explanation of root cause]
|
|
122
|
+
|
|
123
|
+
### Contributing Factors
|
|
124
|
+
- [Factor 1]
|
|
125
|
+
- [Factor 2]
|
|
126
|
+
- [Factor 3]
|
|
127
|
+
|
|
128
|
+
### Security Principles Violated
|
|
129
|
+
- [Principle 1: e.g., Least Privilege]
|
|
130
|
+
- [Principle 2: e.g., Defense in Depth]
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Solution Applied
|
|
135
|
+
|
|
136
|
+
### Fix Strategy
|
|
137
|
+
[Explanation of security fix approach]
|
|
138
|
+
|
|
139
|
+
### Secure Implementation
|
|
140
|
+
```javascript
|
|
141
|
+
// Fixed code
|
|
142
|
+
[code snippet showing secure implementation]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Security Controls Added
|
|
146
|
+
- [Control 1: e.g., Input validation]
|
|
147
|
+
- [Control 2: e.g., Output encoding]
|
|
148
|
+
- [Control 3: e.g., Access control]
|
|
149
|
+
|
|
150
|
+
### Verification
|
|
151
|
+
```bash
|
|
152
|
+
# Security test to verify fix
|
|
153
|
+
[test commands or code]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Prevention Measures
|
|
159
|
+
|
|
160
|
+
### Secure Coding Guidelines
|
|
161
|
+
```markdown
|
|
162
|
+
## [Vulnerability Type] Prevention
|
|
163
|
+
|
|
164
|
+
### Do's
|
|
165
|
+
- ✅ [Best practice 1]
|
|
166
|
+
- ✅ [Best practice 2]
|
|
167
|
+
|
|
168
|
+
### Don'ts
|
|
169
|
+
- ❌ [Anti-pattern 1]
|
|
170
|
+
- ❌ [Anti-pattern 2]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Security Checklist Updates
|
|
174
|
+
- [ ] [New security check 1]
|
|
175
|
+
- [ ] [New security check 2]
|
|
176
|
+
- [ ] [New security check 3]
|
|
177
|
+
|
|
178
|
+
### Automated Security Tests
|
|
179
|
+
```javascript
|
|
180
|
+
// Security test
|
|
181
|
+
describe('Security: [Vulnerability Type]', () => {
|
|
182
|
+
it('should prevent [attack]', () => {
|
|
183
|
+
// Test implementation
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Security Tools Configuration
|
|
189
|
+
```yaml
|
|
190
|
+
# Security scanner config
|
|
191
|
+
rules:
|
|
192
|
+
- id: [rule-id]
|
|
193
|
+
pattern: [pattern to detect]
|
|
194
|
+
severity: [severity]
|
|
195
|
+
message: [message]
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Detection Strategy
|
|
201
|
+
|
|
202
|
+
### How to Detect
|
|
203
|
+
- [Detection method 1]
|
|
204
|
+
- [Detection method 2]
|
|
205
|
+
|
|
206
|
+
### Monitoring & Alerts
|
|
207
|
+
```yaml
|
|
208
|
+
# Security alert configuration
|
|
209
|
+
alerts:
|
|
210
|
+
- name: [Alert name]
|
|
211
|
+
condition: [Condition]
|
|
212
|
+
severity: [Severity]
|
|
213
|
+
action: [Action]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Security Scanning
|
|
217
|
+
```bash
|
|
218
|
+
# Scan commands
|
|
219
|
+
[security scanning commands]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Compliance Impact
|
|
225
|
+
|
|
226
|
+
### Regulations Affected
|
|
227
|
+
- **GDPR:** [Impact]
|
|
228
|
+
- **HIPAA:** [Impact]
|
|
229
|
+
- **PCI DSS:** [Impact]
|
|
230
|
+
- **SOC 2:** [Impact]
|
|
231
|
+
|
|
232
|
+
### Compliance Actions Required
|
|
233
|
+
1. [Action 1]
|
|
234
|
+
2. [Action 2]
|
|
235
|
+
3. [Action 3]
|
|
236
|
+
|
|
237
|
+
### Audit Trail
|
|
238
|
+
- [What needs to be logged]
|
|
239
|
+
- [Retention period]
|
|
240
|
+
- [Access controls]
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Incident Response
|
|
245
|
+
|
|
246
|
+
### If Exploited
|
|
247
|
+
1. **Immediate Actions**
|
|
248
|
+
- [Action 1]
|
|
249
|
+
- [Action 2]
|
|
250
|
+
|
|
251
|
+
2. **Investigation**
|
|
252
|
+
- [What to check]
|
|
253
|
+
- [Logs to review]
|
|
254
|
+
|
|
255
|
+
3. **Containment**
|
|
256
|
+
- [How to contain]
|
|
257
|
+
- [Systems to isolate]
|
|
258
|
+
|
|
259
|
+
4. **Recovery**
|
|
260
|
+
- [Recovery steps]
|
|
261
|
+
- [Verification]
|
|
262
|
+
|
|
263
|
+
5. **Post-Incident**
|
|
264
|
+
- [Lessons learned]
|
|
265
|
+
- [Process improvements]
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Security Testing
|
|
270
|
+
|
|
271
|
+
### Test Cases
|
|
272
|
+
```javascript
|
|
273
|
+
// Security test cases
|
|
274
|
+
describe('Security Tests', () => {
|
|
275
|
+
it('should prevent SQL injection', () => {
|
|
276
|
+
// Test
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
it('should sanitize XSS input', () => {
|
|
280
|
+
// Test
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
it('should validate CSRF token', () => {
|
|
284
|
+
// Test
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Penetration Test Results
|
|
290
|
+
- **Test Date:** [Date]
|
|
291
|
+
- **Tester:** [Name]
|
|
292
|
+
- **Results:** [Pass/Fail]
|
|
293
|
+
- **Findings:** [List]
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Lessons Learned
|
|
298
|
+
|
|
299
|
+
### What Worked Well
|
|
300
|
+
- [Success 1]
|
|
301
|
+
- [Success 2]
|
|
302
|
+
|
|
303
|
+
### What Didn't Work
|
|
304
|
+
- [Failed approach 1]
|
|
305
|
+
- [Failed approach 2]
|
|
306
|
+
|
|
307
|
+
### Key Takeaways
|
|
308
|
+
1. [Takeaway 1]
|
|
309
|
+
2. [Takeaway 2]
|
|
310
|
+
|
|
311
|
+
### Security Insights
|
|
312
|
+
- [Insight 1]
|
|
313
|
+
- [Insight 2]
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Related Entries
|
|
318
|
+
- KB-[ID]: [Related security issue]
|
|
319
|
+
- KB-[ID]: [Related vulnerability]
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## References
|
|
324
|
+
- **CWE:** https://cwe.mitre.org/data/definitions/[###].html
|
|
325
|
+
- **OWASP:** [Link to OWASP guide]
|
|
326
|
+
- **CVE:** [CVE ID if applicable]
|
|
327
|
+
- **Security Advisory:** [Link]
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
#knowledge-base #security #vulnerability #auto-learned
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## 🔍 Pre-Review KB Search
|
|
337
|
+
|
|
338
|
+
Before security review, search KB for:
|
|
339
|
+
|
|
340
|
+
```markdown
|
|
341
|
+
### SECA KB Search Checklist
|
|
342
|
+
- [ ] Similar vulnerabilities in this component
|
|
343
|
+
- [ ] Known attack patterns for this technology
|
|
344
|
+
- [ ] Previous security issues in this area
|
|
345
|
+
- [ ] Compliance requirements
|
|
346
|
+
- [ ] Security best practices
|
|
347
|
+
- [ ] Common misconfigurations
|
|
348
|
+
|
|
349
|
+
**Search Keywords:**
|
|
350
|
+
- Component name
|
|
351
|
+
- Technology/framework
|
|
352
|
+
- Vulnerability type
|
|
353
|
+
- Attack vector
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## 📊 SECA-Specific Metrics
|
|
359
|
+
|
|
360
|
+
Track in your Security Review Report:
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
## Security Knowledge Metrics
|
|
364
|
+
|
|
365
|
+
### Vulnerabilities
|
|
366
|
+
- **Total Found:** [X]
|
|
367
|
+
- **Critical:** [Y]
|
|
368
|
+
- **High:** [Z]
|
|
369
|
+
- **KB Entries Created:** [Number]
|
|
370
|
+
|
|
371
|
+
### Security Improvements
|
|
372
|
+
- **Issues Fixed:** [X]
|
|
373
|
+
- **Controls Added:** [Y]
|
|
374
|
+
- **KB Entries Referenced:** [Z]
|
|
375
|
+
|
|
376
|
+
### Compliance
|
|
377
|
+
- **Compliance Issues:** [X]
|
|
378
|
+
- **Resolved:** [Y]
|
|
379
|
+
- **KB Entries:** [List KB-IDs]
|
|
380
|
+
|
|
381
|
+
### Knowledge Reuse
|
|
382
|
+
- **Similar Issues Prevented:** [Number]
|
|
383
|
+
- **Time Saved:** [Estimate]
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## 🎯 Integration with Security Review Report
|
|
389
|
+
|
|
390
|
+
Add this section to every Security Review Report:
|
|
391
|
+
|
|
392
|
+
```markdown
|
|
393
|
+
## Knowledge Base Integration
|
|
394
|
+
|
|
395
|
+
### KB Entries Referenced
|
|
396
|
+
| KB-ID | Title | How It Helped |
|
|
397
|
+
|-------|-------|---------------|
|
|
398
|
+
| KB-[ID] | [Title] | [Description] |
|
|
399
|
+
|
|
400
|
+
### Security Patterns Applied from KB
|
|
401
|
+
1. [Pattern 1 from KB-ID]
|
|
402
|
+
2. [Pattern 2 from KB-ID]
|
|
403
|
+
|
|
404
|
+
### New KB Entries Created
|
|
405
|
+
| KB-ID | Title | Vulnerability Type | Severity |
|
|
406
|
+
|-------|-------|-------------------|----------|
|
|
407
|
+
| KB-[ID] | [Title] | [Type] | [Severity] |
|
|
408
|
+
|
|
409
|
+
### Vulnerabilities Prevented
|
|
410
|
+
| Vulnerability | Source KB | Prevention Method |
|
|
411
|
+
|---------------|-----------|-------------------|
|
|
412
|
+
| [Vuln] | KB-[ID] | [Method] |
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## 🚀 Quick Actions
|
|
418
|
+
|
|
419
|
+
### After Finding Vulnerability
|
|
420
|
+
```markdown
|
|
421
|
+
1. Assess severity (CVSS score)
|
|
422
|
+
2. Document immediately
|
|
423
|
+
3. Create KB entry (mandatory)
|
|
424
|
+
4. Notify @DEV for fix
|
|
425
|
+
5. Add security test
|
|
426
|
+
6. Update security checklist
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### After Security Incident
|
|
430
|
+
```markdown
|
|
431
|
+
1. Contain the incident
|
|
432
|
+
2. Document timeline
|
|
433
|
+
3. Create KB entry (critical priority)
|
|
434
|
+
4. Conduct root cause analysis
|
|
435
|
+
5. Implement fixes
|
|
436
|
+
6. Update incident response plan
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### After Compliance Issue
|
|
440
|
+
```markdown
|
|
441
|
+
1. Document compliance violation
|
|
442
|
+
2. Assess impact
|
|
443
|
+
3. Create KB entry
|
|
444
|
+
4. Implement corrective actions
|
|
445
|
+
5. Update compliance checklist
|
|
446
|
+
6. Notify stakeholders
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## 📚 Example KB Entries for SECA
|
|
452
|
+
|
|
453
|
+
### Example 1: SQL Injection
|
|
454
|
+
**KB-2026-01-01-050-sql-injection-user-input.md**
|
|
455
|
+
- Pattern: Unsanitized user input in SQL query
|
|
456
|
+
- Solution: Use parameterized queries
|
|
457
|
+
- Prevention: Input validation, ORM usage
|
|
458
|
+
|
|
459
|
+
### Example 2: XSS Vulnerability
|
|
460
|
+
**KB-2026-01-01-051-xss-reflected-search.md**
|
|
461
|
+
- Pattern: Reflected XSS in search functionality
|
|
462
|
+
- Solution: Output encoding, CSP headers
|
|
463
|
+
- Prevention: Sanitize all user input
|
|
464
|
+
|
|
465
|
+
### Example 3: Auth Bypass
|
|
466
|
+
**KB-2026-01-01-052-jwt-signature-bypass.md**
|
|
467
|
+
- Pattern: JWT signature not verified
|
|
468
|
+
- Solution: Proper JWT validation
|
|
469
|
+
- Prevention: Use secure JWT libraries
|
|
470
|
+
|
|
471
|
+
### Example 4: Data Exposure
|
|
472
|
+
**KB-2026-01-01-053-api-data-leak.md**
|
|
473
|
+
- Pattern: API returns sensitive data
|
|
474
|
+
- Solution: Implement field filtering
|
|
475
|
+
- Prevention: Principle of least privilege
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## 🎓 SECA Best Practices
|
|
480
|
+
|
|
481
|
+
1. **Search KB Before Review**
|
|
482
|
+
- Check for known vulnerabilities
|
|
483
|
+
- Review security patterns
|
|
484
|
+
- Find similar issues
|
|
485
|
+
|
|
486
|
+
2. **Document All Vulnerabilities**
|
|
487
|
+
- Create KB entry immediately
|
|
488
|
+
- Include PoC if safe
|
|
489
|
+
- Document fix and prevention
|
|
490
|
+
|
|
491
|
+
3. **Build Security Knowledge**
|
|
492
|
+
- Track attack patterns
|
|
493
|
+
- Document secure patterns
|
|
494
|
+
- Share with team
|
|
495
|
+
|
|
496
|
+
4. **Automate Detection**
|
|
497
|
+
- Add security tests
|
|
498
|
+
- Configure scanners
|
|
499
|
+
- Update CI/CD checks
|
|
500
|
+
|
|
501
|
+
5. **Maintain Compliance**
|
|
502
|
+
- Track compliance issues
|
|
503
|
+
- Document requirements
|
|
504
|
+
- Update checklists
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## 🔄 Security Review Workflow with KB
|
|
509
|
+
|
|
510
|
+
```markdown
|
|
511
|
+
### KB-Integrated Security Review
|
|
512
|
+
|
|
513
|
+
1. **Pre-Review**
|
|
514
|
+
- Search KB for similar components
|
|
515
|
+
- Review security patterns
|
|
516
|
+
- Check compliance requirements
|
|
517
|
+
|
|
518
|
+
2. **During Review**
|
|
519
|
+
- Document vulnerabilities
|
|
520
|
+
- Check against KB patterns
|
|
521
|
+
- Note new attack vectors
|
|
522
|
+
|
|
523
|
+
3. **Post-Review**
|
|
524
|
+
- Create KB entries
|
|
525
|
+
- Update security checklist
|
|
526
|
+
- Add automated tests
|
|
527
|
+
|
|
528
|
+
4. **Continuous Monitoring**
|
|
529
|
+
- Track security metrics
|
|
530
|
+
- Update KB with new threats
|
|
531
|
+
- Share security insights
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## 🎯 Success Criteria
|
|
537
|
+
|
|
538
|
+
### Individual Success
|
|
539
|
+
- [ ] Searches KB before reviews
|
|
540
|
+
- [ ] Creates KB entries for vulnerabilities
|
|
541
|
+
- [ ] Documents security patterns
|
|
542
|
+
- [ ] Adds security tests
|
|
543
|
+
- [ ] Shares security knowledge
|
|
544
|
+
|
|
545
|
+
### Team Success
|
|
546
|
+
- [ ] Reduced vulnerability recurrence
|
|
547
|
+
- [ ] Improved security posture
|
|
548
|
+
- [ ] Better compliance
|
|
549
|
+
- [ ] Faster security reviews
|
|
550
|
+
- [ ] Shared security awareness
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
#seca #security #vulnerability #knowledge-base
|
|
555
|
+
|