Production-grade guide to security champion program covering architecture patterns, implementation strategies, testing approaches, and operational best practices for enterprise engineering teams.
A Security Champion Program is a structured initiative where engineers across development teams are designated as security advocates, responsible for embedding security into the day-to-day workflow of software delivery. It matters most when security is no longer a gatekeeper role but a distributed, embedded practice—when teams move beyond compliance checklists and one-off audits to a culture where security is owned by the engineers who build the software.
Security champions are typically selected from mid-level developers, SREs, and platform engineers. The onboarding process begins with a two-week bootcamp, culminating in a certification exam. Champions are expected to:
The role is formalized through a security-champion.yml configuration file in the team’s config/ directory:
name: "Alice Chen"
team: "Payments"
onboarding: 2024-03-15
skills:
- "OWASP Top 10"
- "CI/CD Security"
- "Secrets Management"
- "API Security"
active: true
workshops:
- "Introduction to SAST"
- "Securing Kubernetes Deployments"
- "Threat Modeling for Microservices"
This file is consumed by the central security automation system. A ./scripts/validate-champion.sh script checks the file’s structure and ensures required fields are present:
#!/bin/bash
set -euo pipefail
if ! yq '.name' config/security-champion.yml >/dev/null; then
echo "Error: Missing 'name' field in security-champion.yml"
exit 1
fi
if ! yq '.skills | length > 0' config/security-champion.yml; then
echo "Error: At least one skill must be listed in 'skills'"
exit 1
fi
echo "✅ Champion configuration is valid"
Failure to meet these criteria blocks the champion’s access to the security portal and disables their ability to request security reviews.
Each pull request undergoes a security review by the champion. The process starts when a PR is labeled security-review and triggers a GitHub Actions workflow:
# .github/workflows/security-review.yml
name: Security Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
# Install security tools
sudo apt-get update
sudo apt-get install -y jq nodejs npm
npm install -g snyk
# Run SAST
snyk test --org=acme --file=package.json --severity=high
# Run dependency scanning
docker run --rm -v $(pwd):/app -w /app aquasec/trivy:latest --exit-code 1 --severity HIGH --light --format json ./src
# Generate report
cat <<EOF > security-report.json
{
"pr_id": "${{ github.event.number }}",
"reviewer": "${{ github.actor }}",
"tools": [
{ "name": "Snyk", "issues": 12 },
{ "name": "Trivy", "issues": 8 }
],
"timestamp": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
}
EOF
- name: Add review summary to PR
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d @security-report.json \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments"
The output is a JSON summary posted to the PR as a comment. The champion reviews the report and adds a follow-up comment with a checklist:
The security-report.json structure is standardized across all teams. Any mismatch in field names or nesting breaks the ingestion pipeline.
Champions are expected to deliver a workshop every quarter. The workshop is structured around a template stored in workshops/:
# Workshop: Securing Kubernetes Deployments
## Duration
90 minutes (60 min + 30 min Q&A)
## Objectives
- Understand common Kubernetes security misconfigurations
- Learn how to harden a PodSpec
- Practice using OPA policies
## Agenda
1. Introduction (10 min)
2. Hands-on: Analyze a flawed deployment.yaml (25 min)
3. Group discussion: Top 5 security issues (15 min)
4. OPA policy lab (30 min)
5. Q&A (15 min)
## Materials
- [ ] `deployment.yaml` with common flaws
- [ ] `rego` policy template
- [ ] `kubectl` and `opa` CLI available
- [ ] Slides in `slides.pdf`
## Success Criteria
- 80% of attendees can identify at least three critical security issues in a deployment.yaml
- 70% of participants write and test a working OPA policy
The workshop is executed using a ./scripts/run-workshop.sh script that prepares the environment:
#!/bin/bash
set -euo pipefail
# Ensure tools are installed
for tool in kubectl opa; do
if ! command -v "$tool" &>/dev/null; then
echo "Error: $tool not installed"
exit 1
fi
done
# Deploy sample Kubernetes cluster
kubectl create namespace workshop
kubectl apply -f samples/deployment.yaml -n workshop
# Start OPA server
opa run --server --addr=0.0.0.0:8181 --set=services.default.address=http://localhost:8181
# Output instructions
cat <<EOF
🚀 Workshop environment ready.
1. Open a terminal and run:
kubectl get pods -n workshop
2. Evaluate the deployment.yaml for security issues.
3. Test OPA policies:
curl -X POST localhost:8181/v1/policies -d @policy.rego
4. Access the OPA server at http://localhost:8181
EOF
The most common failure is missing --addr in the opa run command. Without it, the OPA server listens on :8181, but the API clients expect http://localhost:8181, leading to 404 Not Found errors when evaluating policies.
Each team maintains a SECURITY.md file in the repository root, updated quarterly by the champion. The file follows a strict structure:
# Security Playbook
## Overview
This document outlines the security practices for the Payments team.
## Key Practices
### CI/CD Security
- All PRs must pass SAST and dependency scanning.
- Security gates are enforced via GitHub Actions.
### Secrets Management
- All secrets are stored in HashiCorp Vault.
- `secrets.json` is versioned in Git and synced nightly.
### Incident Response
- First response within 15 minutes of alert.
- Runbook for common incidents is maintained in `runbooks/`.
## Tools
- SAST: Snyk
- DAST: OWASP ZAP
- Image Scanning: Trivy
- Policy Enforcement: OPA
## Metrics
- Average time to resolve security issues: 4.2 days
- Number of security issues per sprint: 6.8
The champion runs a ./scripts/validate-playbook.sh script before each sprint planning meeting:
#!/bin/bash
set -euo pipefail
# Check for required sections
for section in "Overview" "Key Practices" "Tools" "Metrics"; do
if ! grep -q "## $section" SECURITY.md; then
echo "Error: Missing section '## $section' in SECURITY.md"
exit 1
fi
done
# Validate metrics format
if ! grep -q "Average time to resolve" SECURITY.md; then
echo "Error: 'Average time to resolve' must be in Metrics section"
exit 1
fi
# Check for list formatting
if ! grep -q "### " SECURITY.md; then
echo "Error: Key Practices must use '###' for subsections"
exit 1
fi
echo "✅ Playbook is up to date"
The most subtle failure is using ### for subsections but placing content without blank lines. This causes Markdown renderers to collapse the sections into a single paragraph.
A central dashboard tracks all champions using a PostgreSQL database with the following schema:
CREATE TABLE security_champions (
id SERIAL PRIMARY KEY,
github_login VARCHAR(255) UNIQUE NOT NULL,
team_name VARCHAR(255) NOT NULL,
onboarding_date DATE NOT NULL,
active BOOLEAN DEFAULT true,
last_workshop DATE,
total_reviews INT DEFAULT 0,
last_reviewed_pr BIGINT
);
CREATE TABLE security_reviews (
id SERIAL PRIMARY KEY,
pr_id BIGINT NOT NULL,
champion_id INT REFERENCES security_champions(id),
review_date TIMESTAMPTZ DEFAULT NOW(),
issues_found INT,
status VARCHAR(50) CHECK (status IN ('pending', 'approved', 'rejected')),
comments TEXT
);
When a champion completes a workshop, a script inserts a record into the security_reviews table:
#!/bin/bash
set -euo pipefail
# Read workshop metadata
WORKSHOP=$(cat workshop.yaml)
TITLE=$(echo "$WORKSHOP" | jq -r '.title')
DATE=$(echo "$WORKSHOP" | jq -r '.date')
# Insert into database
psql -c "
INSERT INTO security_reviews (pr_id, champion_id, issues_found, status, comments)
VALUES (
$1,
(SELECT id FROM security_champions WHERE github_login = '$2'),
$3,
'approved',
'Workshop: $TITLE ($DATE)'
);
" "$PR_ID" "$GITHUB_USER" "$ISSUE_COUNT"
A cron job runs every Monday at 9:00 AM to send a digest email to all champions:
Subject: Weekly Security Champion Digest - 2024-04-15
You have 7 new security reviews to review.
- PR #1234: User Profile API
- 3 new issues found
- Status: pending
- Link: https://github.com/acme/payments/pull/1234
- PR #1235: Checkout Flow
- 5 new issues found
- Status: approved
- Link: https://github.com/acme/payments/pull/1235
Also, you are due to deliver your next workshop in 14 days.
[View all reviews](https://security.acme.com/champions/123)
The most common issue is a misconfigured psql connection string. Without host, port, user, and password in the environment, the script fails silently with:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
security-champion.yml: The central system fails to send emails or assign PRs.SECURITY.md file: The CI pipeline fails with Error: No SECURITY.md found.opa run command: OPA server is unreachable, causing policy evaluation to fail.security-report.json: Tools fail to parse the report, leading to missing data in the dashboard.--format json: The ingestion pipeline expects a JSON array but receives a single object.chmod +x run-workshop.sh is forgotten, causing the script to fail on ./scripts/run-workshop.sh.The program’s success hinges on consistency: a champion’s work is only as valuable as the precision of their configuration and the clarity of their output.
This page was rewritten on 12 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy