@kaademos/secure-sdlc 1.0.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/.claude/agents/ai-security-engineer.md +209 -0
- package/.claude/agents/appsec-engineer.md +131 -0
- package/.claude/agents/cloud-platform-engineer.md +119 -0
- package/.claude/agents/dev-lead.md +138 -0
- package/.claude/agents/grc-analyst.md +143 -0
- package/.claude/agents/product-manager.md +100 -0
- package/.claude/agents/release-manager.md +126 -0
- package/.claude/agents/security-champion.md +148 -0
- package/.cursor/rules/secure-sdlc.mdc +98 -0
- package/.github/workflows/secure-sdlc-gate.yml +325 -0
- package/CHANGELOG.md +49 -0
- package/CLAUDE.md +195 -0
- package/LICENSE +21 -0
- package/README.md +394 -0
- package/cli/bin/secure-sdlc.js +95 -0
- package/cli/src/commands/gate.js +129 -0
- package/cli/src/commands/init.js +219 -0
- package/cli/src/commands/install-mcp.js +121 -0
- package/cli/src/commands/kickoff.js +261 -0
- package/cli/src/commands/paths.js +33 -0
- package/cli/src/commands/review.js +53 -0
- package/cli/src/commands/status.js +122 -0
- package/cli/src/utils/banner.js +43 -0
- package/cli/src/utils/package-root.js +23 -0
- package/cli/src/utils/phase-detect.js +107 -0
- package/cli/src/utils/stack-detect.js +138 -0
- package/docs/templates/compliance-attestation.md +159 -0
- package/docs/templates/infra-security-review.md +133 -0
- package/docs/templates/release-sign-off.md +119 -0
- package/docs/templates/risk-register.md +72 -0
- package/docs/templates/sast-findings.md +110 -0
- package/docs/templates/security-requirements.md +98 -0
- package/docs/templates/test-security-report.md +143 -0
- package/docs/templates/threat-model.md +129 -0
- package/hooks/install.sh +37 -0
- package/hooks/pre-commit +208 -0
- package/hooks/pre-push +127 -0
- package/mcp/README.md +116 -0
- package/mcp/package.json +23 -0
- package/mcp/src/server.js +638 -0
- package/package.json +67 -0
- package/stacks/django.md +216 -0
- package/stacks/express.md +229 -0
- package/stacks/fastapi.md +247 -0
- package/stacks/nextjs.md +198 -0
- package/stacks/nodejs.md +28 -0
- package/stacks/rails.md +247 -0
- package/warp-workflows/README.md +25 -0
- package/warp-workflows/feature-kickoff.yaml +49 -0
- package/warp-workflows/pr-security-review.yaml +47 -0
- package/warp-workflows/release-gate.yaml +44 -0
- package/warp-workflows/sdlc-status.yaml +48 -0
- package/warp-workflows/threat-model.yaml +56 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Infrastructure Security Review — [Feature / Release Name]
|
|
2
|
+
|
|
3
|
+
**Feature / Release:** [Description]
|
|
4
|
+
**Date:** [YYYY-MM-DD]
|
|
5
|
+
**Author:** Cloud/Platform Engineer Agent + [Human reviewer]
|
|
6
|
+
**Scope:** [IaC changes, new services, pipeline changes — list what was reviewed]
|
|
7
|
+
**Status:** Draft / Review / Approved
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Scope of Review
|
|
12
|
+
|
|
13
|
+
### Changes reviewed
|
|
14
|
+
|
|
15
|
+
| Change | Type | Files / Resources | Notes |
|
|
16
|
+
|--------|------|-------------------|-------|
|
|
17
|
+
| [e.g. New RDS instance] | Terraform | `infra/modules/db/main.tf` | |
|
|
18
|
+
| [e.g. New S3 bucket for uploads] | Terraform | `infra/storage/uploads.tf` | |
|
|
19
|
+
| [e.g. Updated ECS task definition] | Terraform | `infra/ecs/api.tf` | |
|
|
20
|
+
|
|
21
|
+
### Out of scope
|
|
22
|
+
|
|
23
|
+
[What was not reviewed and why — e.g. existing unchanged infrastructure, third-party managed services]
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Identity and Access Management
|
|
28
|
+
|
|
29
|
+
| Check | Status | Finding | Severity | Notes |
|
|
30
|
+
|-------|--------|---------|----------|-------|
|
|
31
|
+
| IAM roles follow least-privilege | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
32
|
+
| No wildcard (`*`) permissions without justification | | | | |
|
|
33
|
+
| Service accounts / managed identities used (no long-lived keys) | | | | |
|
|
34
|
+
| MFA enforced on all human accounts with console access | | | | |
|
|
35
|
+
| Cross-account roles reviewed | | | | |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Network Security
|
|
40
|
+
|
|
41
|
+
| Check | Status | Finding | Severity | Notes |
|
|
42
|
+
|-------|--------|---------|----------|-------|
|
|
43
|
+
| Security groups follow deny-by-default | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
44
|
+
| No 0.0.0.0/0 ingress except LB ports 80/443 | | | | |
|
|
45
|
+
| Databases and internal services in private subnets | | | | |
|
|
46
|
+
| VPC flow logs enabled | | | | |
|
|
47
|
+
| WAF configured for public-facing endpoints | | | | |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Data Security
|
|
52
|
+
|
|
53
|
+
| Check | Status | Finding | Severity | Notes |
|
|
54
|
+
|-------|--------|---------|----------|-------|
|
|
55
|
+
| Storage buckets / blobs private by default | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
56
|
+
| Encryption at rest enabled | | | | |
|
|
57
|
+
| Encryption in transit enforced (TLS 1.2 minimum) | | | | |
|
|
58
|
+
| Database backup encryption and access controls in place | | | | |
|
|
59
|
+
| Data retention policy applied to new stores | | | | |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Compute and Containers
|
|
64
|
+
|
|
65
|
+
| Check | Status | Finding | Severity | Notes |
|
|
66
|
+
|-------|--------|---------|----------|-------|
|
|
67
|
+
| Container images built from minimal, pinned base images | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
68
|
+
| Images scanned for CVEs before deployment | | | | |
|
|
69
|
+
| Containers run as non-root | | | | |
|
|
70
|
+
| Read-only root filesystems where possible | | | | |
|
|
71
|
+
| Pod Security Standards enforced (Kubernetes) | | | | |
|
|
72
|
+
| Network policies applied (Kubernetes) | | | | |
|
|
73
|
+
| No privileged containers | | | | |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Secrets Management
|
|
78
|
+
|
|
79
|
+
| Check | Status | Finding | Severity | Notes |
|
|
80
|
+
|-------|--------|---------|----------|-------|
|
|
81
|
+
| No secrets in environment variables, config files, or code | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
82
|
+
| Secrets stored in approved secrets manager | | | | |
|
|
83
|
+
| Secret rotation policy defined and automated where possible | | | | |
|
|
84
|
+
| CI/CD uses short-lived credentials (OIDC where available) | | | | |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Logging and Monitoring
|
|
89
|
+
|
|
90
|
+
| Check | Status | Finding | Severity | Notes |
|
|
91
|
+
|-------|--------|---------|----------|-------|
|
|
92
|
+
| Audit logs enabled and retained ≥ 90 days | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
93
|
+
| Alerts configured for key security events | | | | |
|
|
94
|
+
| SIEM integration or log aggregation in place | | | | |
|
|
95
|
+
| Runtime threat detection enabled | | | | |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## CI/CD Pipeline Integrity
|
|
100
|
+
|
|
101
|
+
| Check | Status | Finding | Severity | Notes |
|
|
102
|
+
|-------|--------|---------|----------|-------|
|
|
103
|
+
| Build artefacts signed (SLSA / Sigstore / cosign) | ✅ Pass / ⚠️ Finding / 🚫 Fail | | | |
|
|
104
|
+
| SBOM generated | | | | |
|
|
105
|
+
| Third-party pipeline actions pinned to commit SHAs | | | | |
|
|
106
|
+
| Dependency versions pinned (no `latest` tags) | | | | |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Findings Summary
|
|
111
|
+
|
|
112
|
+
| ID | Severity | Description | Resource | Recommendation | Status | Owner |
|
|
113
|
+
|----|----------|-------------|----------|----------------|--------|-------|
|
|
114
|
+
| IF-001 | CRITICAL / HIGH / MEDIUM / LOW | [Finding description] | [Terraform resource or ARN] | [What to fix] | Open / Mitigated | |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Decisions and Accepted Deviations
|
|
119
|
+
|
|
120
|
+
Document any approved deviations from the standard checklist:
|
|
121
|
+
|
|
122
|
+
| Check | Deviation | Justification | Approver | Review date |
|
|
123
|
+
|-------|-----------|---------------|----------|-------------|
|
|
124
|
+
| | | | | |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Sign-off
|
|
129
|
+
|
|
130
|
+
| Role | Name | Date | Status |
|
|
131
|
+
|------|------|------|--------|
|
|
132
|
+
| Cloud/Platform Engineer | | | Approved / Pending |
|
|
133
|
+
| Engineering Lead | | | Approved / Pending |
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Release Security Sign-Off — v[X.Y.Z]
|
|
2
|
+
|
|
3
|
+
**Release version:** v[X.Y.Z]
|
|
4
|
+
**Release date:** [YYYY-MM-DD]
|
|
5
|
+
**Release Manager:** Release Manager Agent + [Human approver]
|
|
6
|
+
**Decision:** PENDING / ✅ GO / 🚫 NO-GO
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Pre-Release Checklist
|
|
11
|
+
|
|
12
|
+
### Phase artefacts
|
|
13
|
+
|
|
14
|
+
| Artefact | Location | Status | Notes |
|
|
15
|
+
|----------|----------|--------|-------|
|
|
16
|
+
| Security requirements | `docs/security-requirements.md` | ✅ Complete / ⚠️ Incomplete / 🚫 Missing | |
|
|
17
|
+
| Risk register | `docs/risk-register.md` | | |
|
|
18
|
+
| Threat model | `docs/threat-model.md` | | |
|
|
19
|
+
| Infrastructure security review | `docs/infra-security-review.md` | | |
|
|
20
|
+
| SAST findings | `docs/sast-findings.md` | | |
|
|
21
|
+
| Test security report | `docs/test-security-report.md` | | |
|
|
22
|
+
| Compliance attestation | `docs/audit-evidence/compliance-attestation-vX.Y.Z.md` | | |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### Application security gate
|
|
27
|
+
|
|
28
|
+
| Check | Status | Evidence | Notes |
|
|
29
|
+
|-------|--------|----------|-------|
|
|
30
|
+
| No unmitigated CRITICAL vulnerabilities | ✅ Pass / 🚫 Fail | | |
|
|
31
|
+
| No unmitigated HIGH vulnerabilities (or formal accepted risk) | | | |
|
|
32
|
+
| All ASVS requirements satisfied or formally deferred | | | |
|
|
33
|
+
| Dependency scan clean (no CRITICAL CVEs in direct deps) | | | |
|
|
34
|
+
| Security regression tests pass | | | |
|
|
35
|
+
| DAST / pentest completed and findings triaged | | | |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### Infrastructure and platform gate
|
|
40
|
+
|
|
41
|
+
| Check | Status | Evidence | Notes |
|
|
42
|
+
|-------|--------|----------|-------|
|
|
43
|
+
| No CRITICAL or HIGH CSPM findings outstanding | ✅ Pass / 🚫 Fail | | |
|
|
44
|
+
| Secret scan clean — no hardcoded secrets in release branch | | | |
|
|
45
|
+
| TLS configuration verified on all public endpoints | | | |
|
|
46
|
+
| WAF rules reviewed and updated for new attack surface | | | |
|
|
47
|
+
| Production access controls reviewed | | | |
|
|
48
|
+
| Secrets rotation completed where applicable | | | |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### Compliance gate
|
|
53
|
+
|
|
54
|
+
| Check | Status | Evidence | Notes |
|
|
55
|
+
|-------|--------|----------|-------|
|
|
56
|
+
| GRC compliance attestation produced | ✅ Pass / 🚫 Fail | | |
|
|
57
|
+
| No blocking compliance gaps | | | |
|
|
58
|
+
| Audit evidence collected for all changed controls | | | |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Operational readiness
|
|
63
|
+
|
|
64
|
+
| Check | Status | Notes |
|
|
65
|
+
|-------|--------|-------|
|
|
66
|
+
| Security monitoring covers new features | ✅ Pass / 🚫 Fail | |
|
|
67
|
+
| Incident response runbook updated | | |
|
|
68
|
+
| On-call team briefed on security-relevant changes | | |
|
|
69
|
+
| Rollback plan documented | | |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Gate Summary
|
|
74
|
+
|
|
75
|
+
| Gate | Result | Blocker count | Notes |
|
|
76
|
+
|------|--------|--------------|-------|
|
|
77
|
+
| Application Security | ✅ PASS / 🚫 FAIL | | |
|
|
78
|
+
| Infrastructure Security | ✅ PASS / 🚫 FAIL | | |
|
|
79
|
+
| Compliance | ✅ PASS / 🚫 FAIL | | |
|
|
80
|
+
| Operational Readiness | ✅ PASS / 🚫 FAIL | | |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Outstanding Items
|
|
85
|
+
|
|
86
|
+
Items waived, accepted, or deferred for this release:
|
|
87
|
+
|
|
88
|
+
| Item | Risk ID | Justification | Owner | Resolution date |
|
|
89
|
+
|------|---------|---------------|-------|----------------|
|
|
90
|
+
| | | | | |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Blockers (NO-GO only)
|
|
95
|
+
|
|
96
|
+
| Blocker | Severity | Owner | Required action | Target date |
|
|
97
|
+
|---------|----------|-------|-----------------|-------------|
|
|
98
|
+
| | | | | |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Decision
|
|
103
|
+
|
|
104
|
+
**Decision:** ✅ GO / 🚫 NO-GO
|
|
105
|
+
|
|
106
|
+
**Rationale:**
|
|
107
|
+
[Brief summary of the security posture of this release and the basis for the decision]
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Authorisation
|
|
112
|
+
|
|
113
|
+
This sign-off has been produced by the Release Manager Agent. Human authorisation is
|
|
114
|
+
required before deployment to production.
|
|
115
|
+
|
|
116
|
+
| Role | Name | Signature | Date |
|
|
117
|
+
|------|------|-----------|------|
|
|
118
|
+
| Release Manager Agent | (automated) | — | [YYYY-MM-DD] |
|
|
119
|
+
| [CISO / Engineering Director / as per release policy] | | | |
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Risk Register
|
|
2
|
+
|
|
3
|
+
**Project / Feature:** [Name]
|
|
4
|
+
**Last updated:** [YYYY-MM-DD]
|
|
5
|
+
**Owner:** GRC Analyst Agent + [Human GRC lead]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Risk Scoring Guide
|
|
10
|
+
|
|
11
|
+
**Likelihood:** 1 (Rare) → 2 (Unlikely) → 3 (Possible) → 4 (Likely) → 5 (Almost certain)
|
|
12
|
+
**Impact:** 1 (Negligible) → 2 (Minor) → 3 (Moderate) → 4 (Major) → 5 (Critical)
|
|
13
|
+
**Inherent risk score** = Likelihood × Impact
|
|
14
|
+
|
|
15
|
+
| Score | Rating |
|
|
16
|
+
|-------|--------|
|
|
17
|
+
| 1–4 | LOW |
|
|
18
|
+
| 5–9 | MEDIUM |
|
|
19
|
+
| 10–16 | HIGH |
|
|
20
|
+
| 17–25 | CRITICAL |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Active Risks
|
|
25
|
+
|
|
26
|
+
| Risk ID | Description | Category | Likelihood | Impact | Inherent Score | Inherent Rating | Control(s) | Residual Score | Residual Rating | Owner | Status | Due Date | Notes |
|
|
27
|
+
|---------|-------------|----------|------------|--------|----------------|-----------------|------------|----------------|-----------------|-------|--------|----------|-------|
|
|
28
|
+
| R-001 | [Risk description] | [App / Infra / People / Process / Compliance] | [1-5] | [1-5] | [L×I] | [LOW/MED/HIGH/CRIT] | [Control description] | [1-5] | [LOW/MED/HIGH/CRIT] | [Owner] | [Open / Mitigated / Accepted / Transferred] | [YYYY-MM-DD] | |
|
|
29
|
+
|
|
30
|
+
**Category definitions:**
|
|
31
|
+
- **Application** — vulnerabilities in application code or logic
|
|
32
|
+
- **Infrastructure** — cloud, platform, or network-layer risks
|
|
33
|
+
- **People** — insider threat, privilege misuse, human error
|
|
34
|
+
- **Process** — gaps in process, oversight, or governance
|
|
35
|
+
- **Compliance** — regulatory or contractual obligations at risk
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Accepted Risks
|
|
40
|
+
|
|
41
|
+
Risks that have been formally accepted rather than mitigated. Each requires documented
|
|
42
|
+
business justification and an approver of appropriate seniority.
|
|
43
|
+
|
|
44
|
+
| Risk ID | Description | Residual Rating | Business Justification | Approver | Approval Date | Review Date |
|
|
45
|
+
|---------|-------------|-----------------|------------------------|----------|--------------|-------------|
|
|
46
|
+
| | | | | | | |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Closed Risks
|
|
51
|
+
|
|
52
|
+
| Risk ID | Description | Closure Reason | Closure Date |
|
|
53
|
+
|---------|-------------|---------------|-------------|
|
|
54
|
+
| | | [Mitigated / No longer applicable / Duplicate] | |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Compliance Control Mapping
|
|
59
|
+
|
|
60
|
+
Map risks to applicable framework controls to show coverage:
|
|
61
|
+
|
|
62
|
+
| Risk ID | ASVS Ref | SOC 2 | ISO 27001 | NIST CSF | PCI DSS | GDPR |
|
|
63
|
+
|---------|----------|-------|-----------|----------|---------|------|
|
|
64
|
+
| R-001 | | | | | | |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Review History
|
|
69
|
+
|
|
70
|
+
| Date | Reviewer | Changes made |
|
|
71
|
+
|------|----------|-------------|
|
|
72
|
+
| [YYYY-MM-DD] | | Initial version |
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# SAST Findings — [Feature / PR / Branch]
|
|
2
|
+
|
|
3
|
+
**Feature / PR / Branch:** [e.g. PR #42 — login endpoint / feature/user-auth]
|
|
4
|
+
**Date:** [YYYY-MM-DD]
|
|
5
|
+
**Tool(s):** [e.g. Semgrep, Checkmarx, Snyk Code, SonarQube]
|
|
6
|
+
**Author:** AppSec Engineer Agent + Dev Lead Agent + [Human reviewer]
|
|
7
|
+
**Status:** Open / In Remediation / Resolved
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
| Severity | Total | Confirmed | False Positive | Needs Review | Resolved |
|
|
14
|
+
|----------|-------|-----------|---------------|-------------|---------|
|
|
15
|
+
| CRITICAL | | | | | |
|
|
16
|
+
| HIGH | | | | | |
|
|
17
|
+
| MEDIUM | | | | | |
|
|
18
|
+
| LOW | | | | | |
|
|
19
|
+
| INFO | | | | | |
|
|
20
|
+
| **Total** | | | | | |
|
|
21
|
+
|
|
22
|
+
**Gate status:**
|
|
23
|
+
- CRITICAL confirmed findings: [N] — [Blocks merge / All resolved]
|
|
24
|
+
- HIGH confirmed findings: [N] — [Blocks release / All resolved]
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Findings
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### [SF-001] — [Tool Rule ID] — [Finding Title]
|
|
33
|
+
|
|
34
|
+
**File:** `path/to/file.ext:line_number`
|
|
35
|
+
**Severity:** CRITICAL / HIGH / MEDIUM / LOW / INFO
|
|
36
|
+
**Status:** Confirmed / False Positive / Needs Review / Resolved
|
|
37
|
+
**CWE:** [CWE-XXX — Name]
|
|
38
|
+
**OWASP Top 10:** [A0X:Year — Category] *(if applicable)*
|
|
39
|
+
**ASVS Ref:** [V.X.Y.Z] *(from security-requirements.md)*
|
|
40
|
+
|
|
41
|
+
**What the scanner found:**
|
|
42
|
+
```
|
|
43
|
+
[Paste the relevant code snippet — anonymised if needed]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Why this matters (plain English):**
|
|
47
|
+
[Explain the vulnerability and its real-world impact without jargon. Write this for the
|
|
48
|
+
developer who owns the fix, not for an auditor.]
|
|
49
|
+
|
|
50
|
+
**Confirmed exploitable:** Yes / No / Unknown
|
|
51
|
+
[If No or Unknown, explain why — e.g. "the affected function is only reachable from an
|
|
52
|
+
authenticated admin context, reducing exploitability significantly"]
|
|
53
|
+
|
|
54
|
+
**Remediation:**
|
|
55
|
+
[Concrete fix with a code example where possible]
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
[Example of the corrected code]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**References:**
|
|
62
|
+
- OWASP: [relevant link]
|
|
63
|
+
- ASVS: [control reference]
|
|
64
|
+
|
|
65
|
+
**Owner:** [Developer / team]
|
|
66
|
+
**Target resolution date:** [YYYY-MM-DD]
|
|
67
|
+
**Resolved date:** [YYYY-MM-DD or —]
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### [SF-002] — [Tool Rule ID] — [Finding Title]
|
|
72
|
+
|
|
73
|
+
*(Copy the block above for each finding)*
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## False Positives
|
|
78
|
+
|
|
79
|
+
Document findings marked as false positives so the reasoning is auditable:
|
|
80
|
+
|
|
81
|
+
| ID | Tool Rule | File:Line | Reason for FP determination | Reviewer | Date |
|
|
82
|
+
|----|-----------|-----------|----------------------------|----------|------|
|
|
83
|
+
| | | | | | |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Suppressed / Accepted Findings
|
|
88
|
+
|
|
89
|
+
Findings that are confirmed but have been formally accepted rather than fixed:
|
|
90
|
+
|
|
91
|
+
| ID | Severity | Description | Business Justification | Approver | Review Date | Risk Register Ref |
|
|
92
|
+
|----|----------|-------------|------------------------|----------|-------------|-------------------|
|
|
93
|
+
| | | | | | | |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Remediation Tracking
|
|
98
|
+
|
|
99
|
+
| ID | Severity | Finding | Owner | Target Date | Status | PR / Commit |
|
|
100
|
+
|----|----------|---------|-------|-------------|--------|-------------|
|
|
101
|
+
| SF-001 | | | | | Open / In Progress / Resolved | |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Review History
|
|
106
|
+
|
|
107
|
+
| Date | Reviewer | Action |
|
|
108
|
+
|------|----------|--------|
|
|
109
|
+
| [YYYY-MM-DD] | AppSec Engineer Agent | Initial triage |
|
|
110
|
+
| | | |
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Security Requirements — [Feature Name]
|
|
2
|
+
|
|
3
|
+
**Feature:** [Brief description of what is being built]
|
|
4
|
+
**Date:** [YYYY-MM-DD]
|
|
5
|
+
**Author:** Product Manager Agent + [Human reviewer]
|
|
6
|
+
**ASVS Target Level:** L1 / L2 / L3
|
|
7
|
+
**Status:** Draft / Review / Approved
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Actors
|
|
12
|
+
|
|
13
|
+
List every actor that interacts with this feature:
|
|
14
|
+
|
|
15
|
+
| Actor | Type | Trust Level | Notes |
|
|
16
|
+
|-------|------|------------|-------|
|
|
17
|
+
| [e.g. Authenticated user] | Human | Low | Standard registered user |
|
|
18
|
+
| [e.g. Admin] | Human | Medium | Internal staff with elevated access |
|
|
19
|
+
| [e.g. Payment service] | System | High | Third-party integration via API key |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Security Requirements
|
|
24
|
+
|
|
25
|
+
| ID | Requirement | ASVS Ref | Priority | Acceptance Criteria | Status |
|
|
26
|
+
|----|-------------|----------|----------|---------------------|--------|
|
|
27
|
+
| SR-001 | [Requirement text] | V[X.Y.Z] | MUST / SHOULD / MAY | [Testable criterion] | Open |
|
|
28
|
+
| SR-002 | | | | | |
|
|
29
|
+
| SR-003 | | | | | |
|
|
30
|
+
|
|
31
|
+
**Priority definitions:**
|
|
32
|
+
- MUST — non-negotiable; feature cannot ship without this
|
|
33
|
+
- SHOULD — strong preference; requires documented justification to defer
|
|
34
|
+
- MAY — nice to have; defer if time-constrained
|
|
35
|
+
|
|
36
|
+
**Common ASVS references by topic:**
|
|
37
|
+
|
|
38
|
+
| Topic | ASVS Chapter |
|
|
39
|
+
|-------|-------------|
|
|
40
|
+
| Authentication | V2 |
|
|
41
|
+
| Session management | V3 |
|
|
42
|
+
| Access control | V4 |
|
|
43
|
+
| Input validation | V5 |
|
|
44
|
+
| Cryptography | V6 |
|
|
45
|
+
| Error handling / logging | V7 |
|
|
46
|
+
| Data protection | V8 |
|
|
47
|
+
| Communications security | V9 |
|
|
48
|
+
| API security | V13 |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Privacy Requirements
|
|
53
|
+
|
|
54
|
+
- [ ] Data minimisation: only the following fields are collected: [list fields]
|
|
55
|
+
- [ ] Retention period defined: data retained for [X days/years], then [deleted/anonymised]
|
|
56
|
+
- [ ] Legal basis documented: [Consent / Contract / Legitimate interest / Legal obligation]
|
|
57
|
+
- [ ] User consent mechanism required: Yes / No — [reasoning]
|
|
58
|
+
- [ ] Data subject rights supported: access, rectification, erasure, portability
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Data Classification
|
|
63
|
+
|
|
64
|
+
| Data Element | Classification | Storage Location | Encryption Required | Access Control |
|
|
65
|
+
|---|---|---|---|---|
|
|
66
|
+
| [e.g. Password hash] | Confidential | Users DB | At rest + in transit | Auth users only |
|
|
67
|
+
| [e.g. Email address] | PII | Users DB | At rest + in transit | Owner + admin |
|
|
68
|
+
| [e.g. Session token] | Confidential | Redis | In transit | Owner only |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Integration Security
|
|
73
|
+
|
|
74
|
+
List any third-party services, APIs, or systems this feature calls:
|
|
75
|
+
|
|
76
|
+
| Integration | Purpose | Auth method | Data shared | Risk notes |
|
|
77
|
+
|---|---|---|---|---|
|
|
78
|
+
| [Service name] | [Why] | [API key / OAuth / mTLS] | [What data] | [Any concerns] |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Out of Scope
|
|
83
|
+
|
|
84
|
+
Document any ASVS controls explicitly deferred and the justification:
|
|
85
|
+
|
|
86
|
+
| ASVS Ref | Control | Reason deferred | Review date |
|
|
87
|
+
|----------|---------|----------------|-------------|
|
|
88
|
+
| | | | |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Sign-off
|
|
93
|
+
|
|
94
|
+
| Role | Name | Date | Status |
|
|
95
|
+
|------|------|------|--------|
|
|
96
|
+
| Product Manager | | | Approved / Pending |
|
|
97
|
+
| AppSec Engineer | | | Approved / Pending |
|
|
98
|
+
| Engineering Lead | | | Approved / Pending |
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Test Security Report — [Feature / Release Name]
|
|
2
|
+
|
|
3
|
+
**Feature / Release:** [Description]
|
|
4
|
+
**Date:** [YYYY-MM-DD]
|
|
5
|
+
**Author:** AppSec Engineer Agent + [Human reviewer]
|
|
6
|
+
**Test types performed:** DAST / Penetration test / Fuzz testing / Security regression / [other]
|
|
7
|
+
**Environment tested:** Staging / Pre-production / [other — never production without explicit approval]
|
|
8
|
+
**Status:** Draft / Review / Approved
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Test Coverage Summary
|
|
13
|
+
|
|
14
|
+
| Test Type | Tool / Method | Scope | Date Performed | Performed By |
|
|
15
|
+
|-----------|---------------|-------|---------------|-------------|
|
|
16
|
+
| DAST | [e.g. OWASP ZAP, Burp Suite] | [URLs / API endpoints in scope] | [YYYY-MM-DD] | [Agent / Person / External firm] |
|
|
17
|
+
| Penetration test | [Manual / Automated] | [Scope] | | |
|
|
18
|
+
| Fuzz testing | [e.g. Atheris, Jazzer, libFuzzer] | [Components] | | |
|
|
19
|
+
| Security regression | [Test suite reference] | [Feature] | | |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Findings Summary
|
|
24
|
+
|
|
25
|
+
| Severity | Count | Resolved | Outstanding | Accepted Risk |
|
|
26
|
+
|----------|-------|----------|-------------|---------------|
|
|
27
|
+
| CRITICAL | | | | |
|
|
28
|
+
| HIGH | | | | |
|
|
29
|
+
| MEDIUM | | | | |
|
|
30
|
+
| LOW | | | | |
|
|
31
|
+
| INFO | | | | |
|
|
32
|
+
|
|
33
|
+
**Gate status:**
|
|
34
|
+
- CRITICAL outstanding: [N] — [Blocks release / None]
|
|
35
|
+
- HIGH outstanding: [N] — [Blocks release or accepted risk documented]
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Findings
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### [TF-001] — [Finding Title]
|
|
44
|
+
|
|
45
|
+
**Source:** [DAST / Pentest / Fuzz / Regression]
|
|
46
|
+
**Tool / Tester:** [Tool name or tester]
|
|
47
|
+
**Endpoint / Component:** `[URL, method, or component name]`
|
|
48
|
+
**Severity:** CRITICAL / HIGH / MEDIUM / LOW / INFO
|
|
49
|
+
**Status:** Open / In Remediation / Resolved / Accepted Risk
|
|
50
|
+
**CWE:** [CWE-XXX — Name]
|
|
51
|
+
**OWASP Top 10:** [A0X:Year — Category]
|
|
52
|
+
**CVSS Score:** [X.X — if calculated]
|
|
53
|
+
|
|
54
|
+
**Description:**
|
|
55
|
+
[What was found. Be specific — include the request/response, payload, or reproduction steps
|
|
56
|
+
where it does not expose sensitive production details.]
|
|
57
|
+
|
|
58
|
+
**Reproduction steps:**
|
|
59
|
+
1. [Step 1]
|
|
60
|
+
2. [Step 2]
|
|
61
|
+
3. [Observed result]
|
|
62
|
+
|
|
63
|
+
**Expected result:**
|
|
64
|
+
[What should have happened instead]
|
|
65
|
+
|
|
66
|
+
**Evidence:**
|
|
67
|
+
[Screenshot reference, HTTP request/response excerpt, or log snippet — redact any real user
|
|
68
|
+
data or credentials before including here]
|
|
69
|
+
|
|
70
|
+
**Business impact:**
|
|
71
|
+
[What could an attacker do with this? Quantify where possible — e.g. "allows unauthenticated
|
|
72
|
+
read access to all user records" rather than "information disclosure".]
|
|
73
|
+
|
|
74
|
+
**Remediation:**
|
|
75
|
+
[Specific fix. Reference the relevant ASVS control and security requirement ID.]
|
|
76
|
+
|
|
77
|
+
**ASVS Ref:** [V.X.Y.Z]
|
|
78
|
+
**Security Requirement Ref:** [SR-XXX from security-requirements.md]
|
|
79
|
+
|
|
80
|
+
**Owner:** [Developer / team]
|
|
81
|
+
**Target resolution date:** [YYYY-MM-DD]
|
|
82
|
+
**Resolved date:** [YYYY-MM-DD or —]
|
|
83
|
+
**Verification:** [How the fix was verified — e.g. re-run ZAP scan, manual retest]
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### [TF-002] — [Finding Title]
|
|
88
|
+
|
|
89
|
+
*(Copy the block above for each finding)*
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## OWASP Top 10 Coverage
|
|
94
|
+
|
|
95
|
+
Document which OWASP Top 10 categories were tested and the result:
|
|
96
|
+
|
|
97
|
+
| Category | Tested | Result | Notes |
|
|
98
|
+
|----------|--------|--------|-------|
|
|
99
|
+
| A01 Broken Access Control | ✅ Yes / ❌ No | Pass / Finding | |
|
|
100
|
+
| A02 Cryptographic Failures | | | |
|
|
101
|
+
| A03 Injection | | | |
|
|
102
|
+
| A04 Insecure Design | | | |
|
|
103
|
+
| A05 Security Misconfiguration | | | |
|
|
104
|
+
| A06 Vulnerable and Outdated Components | | | |
|
|
105
|
+
| A07 Identification and Authentication Failures | | | |
|
|
106
|
+
| A08 Software and Data Integrity Failures | | | |
|
|
107
|
+
| A09 Security Logging and Monitoring Failures | | | |
|
|
108
|
+
| A10 Server-Side Request Forgery | | | |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Security Regression Results
|
|
113
|
+
|
|
114
|
+
| Test ID | Test Description | ASVS Ref | SR Ref | Result | Notes |
|
|
115
|
+
|---------|-----------------|----------|--------|--------|-------|
|
|
116
|
+
| | | | | Pass / Fail | |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Remediation Tracking
|
|
121
|
+
|
|
122
|
+
| ID | Severity | Description | Owner | Target Date | Status | PR / Commit |
|
|
123
|
+
|----|----------|-------------|-------|-------------|--------|-------------|
|
|
124
|
+
| TF-001 | | | | | Open / Resolved | |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Outstanding Items
|
|
129
|
+
|
|
130
|
+
List any findings that remain open at the time of sign-off, with accepted risk documentation:
|
|
131
|
+
|
|
132
|
+
| ID | Severity | Reason not resolved | Risk Register Ref | Approver | Review Date |
|
|
133
|
+
|----|----------|--------------------|--------------------|----------|-------------|
|
|
134
|
+
| | | | | | |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Sign-off
|
|
139
|
+
|
|
140
|
+
| Role | Name | Date | Status |
|
|
141
|
+
|------|------|------|--------|
|
|
142
|
+
| AppSec Engineer | | | Approved / Pending |
|
|
143
|
+
| Engineering Lead | | | Approved / Pending |
|