A Docker-based simulation environment demonstrating Application Security (AppSec) integration in CI/CD pipelines using Jenkins and GitLab with OpenGrep/Semgrep scanners.
This project simulates security scanning in development workflows, showing how OpenGrep and Semgrep detect vulnerabilities in vulnerable test applications and generate SARIF reports for external platforms.
graph TB
subgraph "Docker Environment"
GL[GitLab CE]
JK[Jenkins]
end
subgraph "Host System"
GR[GitLab Runner - External]
end
subgraph "Test Applications"
VJA[vulnerable-java-app]
VJS[vulnerable-js-app]
end
subgraph "Security Scanners"
OG[OpenGrep]
SG[Semgrep]
end
subgraph "External Platform"
RC[Rapticore Platform]
end
GL --> VJA
GL --> VJS
GR --> OG
GR --> SG
JK --> OG
JK --> SG
OG --> SF[SARIF Reports]
SG --> SF
SF --> RC
style GL fill:#fc6d26
style JK fill:#326ce5
style RC fill:#ff6b6b
style OG fill:#4ecdc4
style SG fill:#4ecdc4
- Docker & Docker Compose
- 4GB+ RAM
- 10GB+ free disk space
git clone <repository-url>
cd appsec-pipeline-simulator
chmod +x scripts/*.sh# Edit .env file with your Rapticore credentials
RAPTICORE_API_ENDPOINT=https://your-instance.com
RAPTICORE_USERNAME=admin
RAPTICORE_PASSWORD=your-passworddocker-compose up -d
./scripts/setup-gitlab-projects.sh # Sets up GitLab projects + external runner- GitLab: http://localhost:3000 (root/ComplexPassword123!)
- Jenkins: http://localhost:8080 (admin/admin123)
sequenceDiagram
participant Dev as Developer
participant GL as GitLab
participant GR as Host Runner
participant Scan as Scanner
participant RC as Rapticore
Dev->>GL: git push
GL->>GR: Trigger Pipeline
GR->>Scan: Run OpenGrep/Semgrep
Scan->>GR: SARIF Results
GR->>RC: Upload to Rapticore
GR->>GL: Upload Artifacts
- vulnerable-java-app: Java app with security vulnerabilities
- vulnerable-js-app: Node.js app with common security issues
- OpenGrep: Static analysis scanner
- Semgrep: Rule-based security scanner
- Jenkins: Pipeline automation with security scanning jobs that upload SARIF to Rapticore
- GitLab CI/CD: Git-based CI/CD with external runner and automated security scans + Rapticore upload
- GitLab Runner: External runner installed on host system (not containerized)
RAPTICORE_API_ENDPOINT=https://your-rapticore-instance.com
RAPTICORE_USERNAME=admin
RAPTICORE_PASSWORD=your-passwordappsec-pipeline-simulator/
├── docker-compose.yml
├── .env
├── scripts/
│ ├── setup-gitlab-projects.sh
│ └── upload-sarif-to-rapticore.sh
├── jenkins/
│ └── init.groovy.d/
├── templates/
│ └── .gitlab-ci.yml
└── test-repos/
├── vulnerable-java-app/
└── vulnerable-js-app/
- Access GitLab at http://localhost:3000
- Navigate to vulnerable-java-app or vulnerable-js-app project
- View pipeline execution and SARIF artifacts
- Access Jenkins at http://localhost:8080
- Find auto-created security scan jobs
- Trigger job execution and review console output
# Check Jenkins logs
docker-compose logs jenkins
# Restart Jenkins
docker-compose restart jenkins# Check runner status
docker-compose logs gitlab-runner
# Re-run setup
./scripts/setup-gitlab-projects.sh