You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A reference repository implementing all 5 stages of the Trusted OSS โ AI Coding Strategy.
Fork it for immediate use, or copy individual config files into your existing project.
Implementation Status by Stage
Stage
Description
Implementation Files
Stage 1
Prompt-only
โ (no tools needed)
Stage 2
AI rule internalization
CLAUDE.md, .cursorrules
Stage 3
CI/CD auto-blocking
.github/workflows/ (6 traditional tools)
Stage 4
AI defense layer
ai-review.yml (findings-driven), ai-fuzzing.yml
Stage 5
Continuous monitoring & auto-remediation
dependabot.yml, renovate.json, dast.yml
Stage 3: CI/CD Configuration
Workflow
Tool
Role
PR
Push/Main
secret-detection.yml
Gitleaks
Detect hardcoded API keys & tokens
โ
โ
sast.yml
Semgrep
Detect SQL injection & vulnerable patterns
โ
โ
codeql.yml
CodeQL
Deep static analysis (includes weekly scan)
โ
โ
oss-policy.yml
syft + grype
CVE scan + license check
โ
โ
iac-security.yml
Checkov
Dockerfile & K8s security config check
โ
โ
container-security.yml
Trivy
Docker image vulnerability scan
โ
โ
Stage 4: AI Defense Layer
Workflow
Tool
Role
Trigger
ai-review.yml
Claude API
Semgrep/grype findings โ AI validation & interpretation โ PR comment
PR (auto-activates when ANTHROPIC_API_KEY is set)
ai-fuzzing.yml
Claude + requests
AI-generated edge cases to detect 5xx errors
Push to main ยท weekly
Stage 5: Continuous Monitoring & Auto-Remediation
Workflow / Config
Tool
Role
Schedule
dependabot.yml
Dependabot
Auto-generate dependency update PRs
Weekly
renovate.json
Renovate
Auto-merge critical patches
Immediately ยท weekly
dast.yml
OWASP ZAP
Dynamic vulnerability scan after deployment (soft fail)
Push to main
Quick Start
1. Fork
Fork this repository on GitHub, then clone it.
git clone https://github.com/YOUR-ORG/ai-coding-best-practice.git
cd ai-coding-best-practice
Opening a PR on GitHub will automatically trigger all 6 Stage 3 workflows.
3. Register GitHub Secrets
Secret Name
Purpose
Required
ANTHROPIC_API_KEY
Stage 4 AI review (ai-review.yml), AI fuzzing (ai-fuzzing.yml)
Optional
Once ANTHROPIC_API_KEY is registered, the Stage 4 AI defense layer activates automatically.
No additional configuration needed โ findings-driven AI review starts on the next PR.
Customization
File
What to Modify
CLAUDE.md
Team license policy, prohibited package list
.cursorrules
Per-tool rule adjustments
.grype.yaml
Vulnerability threshold (high โ critical)
.gitleaks.toml
Add organization-internal pattern exceptions
.semgrep.yml
Add language/framework-specific rulesets
renovate.json
Auto-merge scope, update schedule
dast.yml
Switch to hard fail by changing fail_action: true after stabilization