DevSecOps toolkit for AI-assisted secure development
A DevSecOps pipeline integrates security checks at every stage of the software delivery lifecycle, rather than treating security as a final gate.
Code → Commit → Build → Test → Deploy → Monitor
↓ ↓ ↓ ↓ ↓ ↓
Lint Secrets SAST DAST Config Runtime
Check Scan Scan Scan Audit Protection
Security starts before code leaves the developer’s machine.
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: detect-private-key
- id: check-added-large-files
args: ['--maxkb=500']
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
Claude Code Integration:
{
"hooks": {
"PreToolUse": [{
"matcher": "Write|Edit",
"command": "bash scripts/check-secrets.sh $FILE"
}]
}
}
| Check | Tool | Purpose |
|---|---|---|
| Secret scanning | Gitleaks, TruffleHog | Prevent credential leaks |
| Dependency audit | npm audit, pip-audit |
Known vulnerability detection |
| License compliance | FOSSA, Licensee | OSS license verification |
# GitHub Actions example
- name: Build with SBOM
run: |
docker build --sbom=true -t myapp:$ .
- name: Sign image
uses: sigstore/cosign-installer@v3
run: cosign sign myapp:$
Static Application Security Testing analyzes source code for vulnerabilities.
| Language | Tool | Coverage |
|---|---|---|
| Multi | Semgrep | Custom rules, OWASP patterns |
| JavaScript | ESLint security plugin | XSS, injection |
| Python | Bandit | Common Python security issues |
| Go | gosec | Go-specific vulnerabilities |
| Java | SpotBugs + FindSecBugs | Java security patterns |
- name: SAST with Semgrep
uses: semgrep/semgrep-action@v1
with:
config: >-
p/owasp-top-ten
p/security-audit
Dynamic testing against running applications:
- name: DAST with ZAP
uses: zaproxy/action-full-scan@v0.10.0
with:
target: 'https://staging.example.com'
rules_file_name: '.zap/rules.tsv'
- name: Config audit
run: |
# Check Kubernetes manifests
kubesec scan deployment.yaml
# Check Terraform
tfsec .
# Check Dockerfiles
hadolint Dockerfile
| Level | Description | Key Activities |
|---|---|---|
| Level 1 | Ad-hoc | Manual reviews, basic linting |
| Level 2 | Repeatable | CI secret scanning, dependency audit |
| Level 3 | Defined | SAST/DAST in pipeline, security gates |
| Level 4 | Managed | Metrics-driven, SLA on fix times |
| Level 5 | Optimized | Automated remediation, threat intel integration |