How devops-accelerators/devsecops-template works
Main Components
• Jenkins Pipeline Controller – At the center is the parameterized Jenkinsfile which orchestrates the different stages:
• Stage 1: Checkout of source code.
• Stage 2: Pre-build setup (spinning up security tools via containers).
• Stage 3: Check-secrets (e.g., using Trufflehog).
• Stage 4: Source Composition Analysis (using tools like Snyk).
• Stage 5: SAST (analysis from Sonarqube/Sonarqube’s configurations).
• Stage 6: Container Image Scan (using Anchore-Engine configured with docker-compose).
• Stage 7: DAST (possibly using Archerysec-ZeD with automated scan scripts like zapscan.sh).
• Stage 8: Inspec (using the hardening-test profile to evaluate infrastructure security).
• Security Tools Containers – Each folder in the file tree corresponds to a tool:
• Anchore-Engine: Contains configuration and a docker-compose.yaml to run vulnerability scans on container images.
• Archerysec-ZeD: Provides scripts (archery_script.py and zapscan.sh) and docker-compose.yml to perform dynamic testing.
• Inspec: Contains a complete inspection and hardening test profile, indicating infrastructure compliance tests.
• Snyk, Sonarqube, and Trufflehog: Each has its README and configuration, representing additional scanning functionalities.
• Source Code Repository and External Artifacts:
• The project accepts parameters such as application repository URL, docker image name/tag, and server URL. This emphasizes the integration with external code repositories and running environments.
Out Relationships and Data Flow
• “Pre-build Setup” as the step where Jenkins uses Docker Compose to spin up the tool containers (Anchore, Archerysec, etc.).
• Each security stage should be depicted as its own sub-component or container:
• Check-Secrets stage (e.g., Trufflehog) inspects the repository.
• SCA stage (Snyk) analyzes third-party dependencies.
• SAST stage (Sonarqube) performs static code analysis.
• Container Image Scan stage (Anchore-Engine) inspects container images.
• DAST stage (Archerysec-ZeD) tests the running application.
• Inspec stage tests infrastructure hardening.
Architectural Patterns and Technologies
• Microservice-like Containerization: Each security tool runs in its own container, orchestrated using Docker Compose.
• Pipeline as Code: The parameterized Jenkinsfile defines stages that are modular and independently invoked.
• Integration Points: Highlight how each tool plugs into the overall pipeline.
• Technologies Involved: Docker, Jenkins, and possibly language-specific tools for Java/Node depending on the application under test.