Get started with security scanning in 5 minutes!
- Sample executive security report: View Report 🎯
A reference DevSecOps project demonstrating how SAST scanning can be embedded into a CI/CD workflow for a Spring Boot application.
This project reflects practical security patterns I have used in real-world environments, including:
Static Application Security Testing
CI/CD security checks
Vulnerability reporting
Secure development workflow design
Developer-friendly security feedback loops
The goal is not just to run a tool.
The goal is to show how security controls can become part of the delivery process instead of being treated as a late-stage review.
This approach was influenced by security patterns implemented while working on real-world systems, including startup and federal environments.
# Check if you have the required tools
java -version # Need Java 21
mvn -version # Need Maven
docker --version # Need Docker
python3 --version # Need Python 3.11+
# Install Python dependencies
pip install -r requirements.txt# Install Snyk (for dependency scanning)
npm install -g snyk
snyk auth
# Install Trivy (for container scanning)
# Ubuntu/Debian:
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
# macOS:
brew install trivy
# Install OWASP Dependency-Check
# Download from: https://owasp.org/www-project-dependency-check/# Make script executable (already done if you cloned the repo)
chmod +x run-security-scans.sh
# Run all security scans
./run-security-scans.sh# Note: Sample Security Scanning Executive Summary report in the security-reports folder
# View the PDF summary
open security-reports/executive-summary-*.pdf
# Or check the consolidated JSON
cat security-reports/consolidated-report-*.json | jq- 🔴 CRITICAL: Immediate action required - exploitable vulnerabilities
- 🟠 HIGH: Should be fixed soon - significant security risk
- 🟡 MEDIUM: Should be reviewed - moderate security concern
- 🟢 LOW: Low priority - minor security issue
- ℹ️ INFO: Informational - best practice recommendations
- Review the PDF Summary: Start with the executive summary
- Prioritize Critical/High: Focus on the most severe issues first
- Check Remediation: Look for upgrade paths in the detailed reports
- Update Dependencies: Run
mvn versions:display-dependency-updates - Re-scan: Run the scans again after fixes to verify
# Run only specific scans
cd backend/auth-service
mvn spotbugs:spotbugs # SpotBugs only
mvn pmd:pmd # PMD only
snyk test # Snyk only
trivy fs . # Trivy filesystem only
# Generate reports from existing scan results
python3 generate-executive-summary.py --reports-dir security-reports
python3 create-pdf-report.py --reports-dir security-reports
# Clean up old reports
rm -rf security-reports/*- Install the missing tool (see Step 2 above)
- Or the script will skip that scan and continue
snyk auth
# Follow the browser prompt to authenticate# Make sure Docker is running
docker ps
# If needed, restart Docker
sudo systemctl restart docker # Linux
# or restart Docker Desktop on macOS/Windowspip install -r requirements.txt
# or
pip install reportlab- 📖 Read the full documentation on this Readme file
- 🐛 Report issues: Open a GitHub issue
- 💬 Ask questions: Check the troubleshooting section in the main README
- ✅ Run your first scan
- ✅ Review the PDF report
- ✅ Fix critical vulnerabilities
- ✅ Integrate into your CI/CD pipeline
- ✅ Schedule regular scans(weekly recommended)
- ✅ Use scanning tools that provides the best coverage for your application
Happy scanning! 🔒