Add secure-delivery/security/SECURITY_GATE_TEST.md
startup-product-ci/pipeline/head This commit looks good
startup-product-ci/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# Chapter 6 — Security Gate Verification
|
||||
|
||||
## Objective
|
||||
|
||||
Demonstrate that the Jenkins delivery pipeline blocks an unsafe release
|
||||
and successfully resumes after the test condition is removed.
|
||||
|
||||
## Preconditions
|
||||
|
||||
Before running the demonstration:
|
||||
|
||||
1. The Jenkins pipeline must have working security scanners.
|
||||
2. Scanner versions and detection rules must be recorded.
|
||||
3. The trusted Jenkins agent must be configured.
|
||||
4. Deployment credentials must be unavailable to untrusted builds.
|
||||
5. The normal security checks must pass.
|
||||
|
||||
## Controlled Failure Test
|
||||
|
||||
1. Create a dedicated test branch from the reviewed application source.
|
||||
2. Select a synthetic, nonfunctional fixture explicitly supported by
|
||||
the configured security scanner.
|
||||
3. Verify that the scanner detects the fixture in an isolated test.
|
||||
4. Introduce the fixture into the test branch.
|
||||
5. Trigger the Jenkins pipeline.
|
||||
6. Confirm that the appropriate security stage fails.
|
||||
7. Confirm that no image is published or deployed.
|
||||
8. Capture the Jenkins build number, scanner output, exit code,
|
||||
timestamp, and screenshot.
|
||||
9. Remove the fixture in a separate corrective commit.
|
||||
10. Rerun the pipeline and confirm the security check passes.
|
||||
|
||||
## Safety Requirements
|
||||
|
||||
- Never use a real credential, password, private key, or access token.
|
||||
- Never introduce a deliberately vulnerable image into production.
|
||||
- Never disable security checks to make the pipeline pass.
|
||||
- Never expose registry-write or deployment credentials to test branches.
|
||||
- Do not merge the failing fixture into protected main.
|
||||
- If a scanner cannot detect the selected fixture, choose a documented
|
||||
scanner-supported fixture instead of claiming a successful detection.
|
||||
|
||||
## Evidence Checklist
|
||||
|
||||
- [ ] Scanner name and exact version
|
||||
- [ ] Scanner rules or vulnerability database version
|
||||
- [ ] Synthetic fixture description
|
||||
- [ ] Test branch and commit
|
||||
- [ ] Jenkins build number
|
||||
- [ ] Failed security stage screenshot
|
||||
- [ ] Scanner exit code and report
|
||||
- [ ] Confirmation that publication and deployment did not occur
|
||||
- [ ] Corrective commit
|
||||
- [ ] Passing rerun screenshot
|
||||
|
||||
## Status
|
||||
|
||||
Procedure prepared.
|
||||
|
||||
The actual scanner selection, fixture verification, blocked pipeline,
|
||||
corrective run, and evidence collection are assigned to Sergio.
|
||||
Reference in New Issue
Block a user