Skip to main content

CI security gates

French version: ../ci-security-gates.md.

The same gates exist in .forgejo/workflows/ci.yml and .gitlab-ci.yml. High and critical findings fail the pipeline; the build job depends on every security job.

Job (Forgejo / GitLab)ToolScopeFailure condition
security-sast / banditBandit 1.8services/control-plane/src, sdks/python/srchigh severity, medium confidence or more
security-semgrep / semgrepSemgrep, rules p/owasp-top-ten, p/python, p/typescriptwhole repository except subchartsERROR severity
security-deps-python / pip-auditpip-audit 2.7backend and Python SDKany known vulnerability
security-deps-node / npm-auditnpm audit --audit-level=highportal, sdks/typescripthigh or critical
security-secrets / gitleaksGitleaks 8.21git history and working treeany detected secret
security-fs / trivy-fs, trivy-configTrivy 0.58 (fs and config deploy/)dependencies, secrets, IaChigh or critical
build (step trivy image scan) / trivy-imageTrivy 0.58 (image, exceptions in .trivyignore, one per line with justification, owner and review date)vulnerabilities of published imageshigh or critical
build (step cosign sign and attest) / sbom-signcosign with the COSIGN_PRIVATE_KEY key, no Rekor log; publishing fails without the key because Kyverno (eai-verify-image-signatures) only accepts that key for harbor.*/eai/*signature and SPDX and CycloneDX attestationsmissing key
security-manifests / manifestskubeconform (strict, datree CRD catalog), Kyverno CLI, pytestchart rendered with the three values filesinvalid schema, admission refusal, security invariant
security-dast / zap-baselineOWASP ZAP baseline 2.15portal and API of the compose stackFAIL rule of deploy/ci/zap-baseline.conf

Notes​

  • ZAP runs with -I: warnings are reported, only rules marked FAIL break the build (cookies without HttpOnly or SameSite, clickjacking, X-Content-Type-Options, X-Powered-By leak, CORS misconfiguration, error disclosure). HSTS and Secure cookies are ignored on the plain HTTP compose stack and checked at the TLS edge.
  • A Bandit exception is justified in code (# nosec Bxxx with the reason), a Semgrep exception with # nosemgrep: <rule>; a dependency vulnerability without a fix is ignored with an explicit id (pip-audit --ignore-vuln, .trivyignore) and a review date.
  • Offline reproduction: helm lint, helm template, kubeconform, kyverno test deploy/policies/kyverno/tests, opa test deploy/policies/opa -v, terraform fmt -check -recursive deploy/terraform, pytest services/control-plane/tests -k platform.