CI/CD Dependency Poisoning & Ephemeral Cloud Staging
Executive Summary
Section titled โExecutive SummaryโSimulates build pipeline dependency confusion and malicious pre-install script execution within an isolated ephemeral Docker container.
MITRE ATT&CK Lifecycle Phases
Section titled โMITRE ATT&CK Lifecycle PhasesโInitial AccessExecutionCollectionExfiltration
Multi-Stage Emulation Sequence
Section titled โMulti-Stage Emulation Sequenceโ-
Stage 1: Package Name Typo-Squatting Resolution Probe
- Technique:
T1195.001 - Compromise Software Dependencies - Safe Command:
Terminal window npm info @hermes-bas-canary/internal-auth-token version 2>&1 || true - Expected Telemetry: Private package registry audit log recording lookup query for internal scope.
- Success Verification: Lookup blocked or routed exclusively to private Artifactory repository.
- Technique:
-
Stage 2: Simulated Pre-Install Environment Harvest Attempt
- Technique:
T1082 - System Information Discovery - Safe Command:
Terminal window python3 -c 'import os; print(f"HERMES_BAS_SIMULATION: Auditing env keys count: {len(os.environ)}")' - Expected Telemetry: EDR container runtime alert for unauthorized process spawning during package installation.
- Success Verification: Sensitive secrets (AWS_SECRET_ACCESS_KEY, CI_TOKEN) masked from process environment.
- Technique:
-
Stage 3: Ephemeral Cloud S3 Staging Emulation
- Technique:
T1567.002 - Exfiltration to Cloud Storage - Safe Command:
Terminal window python3 -c 'print("HERMES_BAS: Emulating multipart upload probe to mock-s3-endpoint")' - Expected Telemetry: CloudTrail / VPC flow log recording DNS query to mock S3 endpoint.
- Success Verification: Mock S3 probe logged; zero sensitive data transmitted.
- Technique:
Safety Guardrails & Cleanup Verification
Section titled โSafety Guardrails & Cleanup Verificationโ- Simulations run inside disposable ephemeral Docker containers destroyed upon completion.
- Zero real environment tokens are accessed or logged.
- External repository publications are strictly blocked.
Cleanup Command:
docker rm -f hermes_bas_sandbox 2>/dev/null || trueVerification Check: docker ps -a | grep -v -q โhermes_bas_sandboxโ