A unified DevSecOps pipeline that runs multiple security scanners, parses their findings, and exports results into Allure reports mapped against OWASP ASVS v5.
Useful both for industrial pipelines (CI/CD) and reproducible academic work (e.g., thesis).
- OWASP Dependency-Check – SCA for Java/Node
- Trivy – filesystem & container image scans
- OWASP ZAP – baseline/full/auth DAST
- npm audit – Node.js dependency audit
- Semgrep – SAST with OWASP/CI rules
- Gitleaks – secret scanning (tree/history)
- SonarQube – code quality + vuln checks
- Bandit – Python SAST (if Python code present)
- Credentials and URLs are redacted in logs.
- ZAP Authentication is excluded (future work).
- Gitleaks defaults to scanning only the current tree unless
GITLEAKS_HISTORY=true. - Sonar runs against a local container (no external upload).
security-tests/
├── run_security_scans.sh # main entrypoint
├── run_security_scans.timer.sh # wrapper for timings
├── parsers/asvs-unified-to-allure.ts
├── config/
│ ├── gitleaks.toml
│ └── semgrep-rules/
└── ...
.env.example # copy → .env.local
Copy .env.example → .env.local and edit.
Here are the key knobs (all optional, sensible defaults included):
HOST_PWD– workspace path (macOS Docker fix)GENERATE_ALLURE– generate HTML automatically (true)ALLURE_VERSION– default2.29.0ITERATIONS– how many runs per tool for timing
NVD_API_KEY– for faster CVE syncODC_DATA_DIR– cache dirODC_PLATFORM– container platform override
TRIVY_CACHE_DIR– cache dirTRIVY_PLATFORM– container platform overrideTRIVY_SEVERITY– default HIGH,CRITICAL
ZAP_IMAGE– defaultghcr.io/zaproxy/zaproxy:stableZAP_BASELINE_TIME/ZAP_FULL_TIME– scan duration minutes
GITLEAKS_IMAGE– defaultzricethezav/gitleaks:latestGITLEAKS_HISTORY–true= scan full historyGITLEAKS_CONFIG– config file pathGITLEAKS_LOG_OPTS– optional git log filters
SONAR_HOST_URL– usuallyhttp://host.docker.internal:9000SONAR_TOKEN– local auth tokenSONAR_SCANNER_EXTRA– extra args
- Allure results →
./allure-results/<repo> - Allure HTML report →
./allure-report/<repo> - Scanner JSONs →
./security-reports/ - categories.json → maps findings to ASVS controls
- timings.csv → duration + exit codes (for reproducibility)
-
Warm caches once
bash security-tests/run_security_scans.sh --warmup
-
Run a staging snapshot
git checkout -b thesis-freeze-1 bash security-tests/run_security_scans.sh --repo-url <url> --tools odc,trivy-fs,...
-
Run with timing
bash security-tests/run_security_scans.timer.sh --repo-url <url> --tools odc,trivy-fs,zap,...
-
View results
allure open ./allure-report/<repo>
-
Inspect timings
column -t -s, timings.csv | less -S
- Tag stable points for reproducibility:
git tag -a thesis-freeze-1 -m "Thesis pipeline freeze" git push origin thesis-freeze-1 - For later updates, create new tags (
thesis-freeze-2,thesis-final).
- If Allure report shows “Loading…” endlessly:
→ Clear cache or restart system. Sometimes stale JS bundles cause this. - On macOS, add Homebrew’s path to
~/.zprofile:eval "$(/opt/homebrew/bin/brew shellenv)"
- For Gitleaks “ambiguous argument” errors:
→ SetGITLEAKS_HISTORY=falseto scan only current tree.