2.2 KiB
2.2 KiB
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:
- The Jenkins pipeline must have working security scanners.
- Scanner versions and detection rules must be recorded.
- The trusted Jenkins agent must be configured.
- Deployment credentials must be unavailable to untrusted builds.
- The normal security checks must pass.
Controlled Failure Test
- Create a dedicated test branch from the reviewed application source.
- Select a synthetic, nonfunctional fixture explicitly supported by the configured security scanner.
- Verify that the scanner detects the fixture in an isolated test.
- Introduce the fixture into the test branch.
- Trigger the Jenkins pipeline.
- Confirm that the appropriate security stage fails.
- Confirm that no image is published or deployed.
- Capture the Jenkins build number, scanner output, exit code, timestamp, and screenshot.
- Remove the fixture in a separate corrective commit.
- 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.