Blocking Policy One-Pager

This one-pager defines what fails the build, what warns, how exceptions are granted, and the evidence we keep. Tune the thresholds to your risk.

Scope

  • Applies to builds run via make ci and release candidates promoted with make promote.
  • Local parity: make on a laptop mirrors CI behavior; CI is the source of truth for enforcement.

Gates & Thresholds (default)

AreaTool / SourceBlocks BuildWarns OnlyNotes
SecretsTruffleHogVerified credentialsHeuristics/unverifiedVerified = provider-validated or high-confidence match
SASTSemgrep (curated)High/Critical in curated rulesetOthersCurated rules maintained by Security to keep noise low
DockerfileHadolintAll findingsStyle & safety hints; fix in PRs
IaCCheckovPrivileged, runAsRoot, no seccomp, no probes, writable root FSOthersFails on high-risk K8s misconfig
SCA (images)TrivyCritical, High (if fix available)Unfixed High, Medium/LowUnfixed tracked separately; see Exceptions
LicensesLicense scanDISALLOWED (once tuned)WARN initiallyStart WARN → ENFORCE after review
SBOM presenceSyftMissing SBOMSBOM required for RCs
DAST (baseline)ZAPWARNNon-blocking in baseline mode
Admission readinessKyvernoDeny bad; Verify imagesEnforced in cluster; CI checks can lint manifests

Adjust “Blocks Build” cells as you ratchet. Start permissive, then move to enforce over 4–6 weeks.


Enforcement Matrix

Pipeline StageSecretsSASTIaCSCALicensesSBOMNotes
Local (dev)WarnWarnWarnWarnWarnRequired for RCKeep speed; show parity
PR / CIBlock (verified)Block (curated H/C)Block (high-risk)Block (Crit; High if fix)Warn (then Block)RequiredPR is the contract
Release CandidateBlockBlockBlockBlockBlockRequiredEvidence ZIP archived

Exceptions

  • Use the Exception Register (time-boxed, with expiry & rationale).
  • Scope narrowly (service/component); require a remediation plan.
  • Security approves; Ops implements any compensating control.
  • Expired exceptions auto-revert to Block.

SLAs (apply after merge)

  • Critical7 days · High30 days · Medium90 days · Low best-effort.
  • SLA clock starts when the finding is triaged & assigned.

Evidence

  • Store all scanner outputs and policy logs under ./artifacts/ and in the Evidence ZIP per build.
  • Keep at least the last 10 Evidence ZIPs for audit.

Command Examples (reference)

CI should call make targets; samples below show intent.

Trivy: fail on CRITICAL (and HIGH if fix available)

docker run --rm \
  -v "$PWD":/workspace \
  -v "$PWD/.trivy-db":/root/.cache/trivy \
  -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:latest \
  image --ignore-unfixed --severity HIGH,CRITICAL \
  --exit-code 1 --format json \
  -o /workspace/artifacts/trivy-image.json "$IMAGE"

semgrep: curated ruleset, JSON Output (CI Enforces exit code)

docker run --rm -v "$PWD":/src returntocorp/semgrep semgrep \
  --config p/owasp-top-ten --config /src/tools/semgrep \
  --json --json-output /src/artifacts/semgrep.json /src/app
# CI: fail if curated High/Critical present

Checkov: K8s directory scan (JSON to Artifacts)

docker run --rm -v "$PWD":/work -w /work bridgecrew/checkov \
  -d infra -o json > artifacts/checkov.json

Ownership (mini-RACI)

  • Security (A): sets thresholds, curates rules, approves exceptions.
  • Dev (R): fixes findings in owned code; proposes RBAC/NetPol changes.
  • Ops (R): enforces admission policies, manages keys & base images, archives evidence.

Effective Date & Review

  • Policy effective: ____________
  • Review cadence: monthly (ratchet), quarterly (policy).
  • Approved by: Security ___ · Platform/Ops ___ · Engineering ___