Add a lightweight CI step that sends deploy context to your tenant and gets an allow, warn, or deny decision back without self-hosting OPA. Audiencia: Platform engineers, release managers, and security engineers. Tiempo típico de configuración: 3 minutes.
Antes de comenzar
Install the managed starter pack in Policies and keep it in advisory mode for the first rollout.
Create or reuse a tenant API key in Settings → API Keys for your CI system.
Identify the service ID, target environment, artifact name, and branch values your deploy pipeline already exposes.
Paso a paso
Paso 1
Install the managed starter pack in the tenant
Open the Policies console, keep the starter pack in advisory mode first, and tune thresholds before enforcing production blocks.
Open Policies in the dashboard and review Starter Deploy Guardrails.
Confirm environments, severity thresholds, freshness window, and fail-open or fail-closed behavior.
Run a simulation with a representative production payload before wiring CI.
Publish any tenant-specific custom Rego only after the draft validates cleanly.
Paso 2
Store the existing tenant API key in CI
The hosted decision API reuses the same tenant API key pattern as other machine-to-machine workflows, so no extra auth system is required.
Create or reuse a scoped API key in Settings → API Keys.
Store `SECPLATFORM_API_URL` and `SECPLATFORM_API_KEY` in your CI secret store.
Map service, environment, branch, artifact, and actor metadata from your pipeline variables.
Start with advisory rollout mode so warn outcomes surface without blocking releases.
Paso 3
Add the policy client job to your deploy pipeline
Run the policy client before the real deployment step. It posts the deploy request, prints reasons, and exits non-zero only when the final decision is deny.
Bootstrap the GitHub Actions or GitLab source bundle from this guide, then commit it to your repo.
Set `POLICY_SERVICE_ID`, `POLICY_TARGET_ENVIRONMENT`, and any optional repository or artifact fields.
Pass reviewer, ticket, or promotion metadata through `POLICY_CONTEXT_JSON` when your tenant policies expect it.
Place the job immediately before the production deploy so the decision reflects the current release candidate.
Obtén el bundle de código fuente
Descarga los archivos exactos usados en esta guía o ejecuta el instalador de un solo comando para escribirlos localmente antes del despliegue.
GitHub Actions deploy gate
Writes `.github/workflows/deploy-guardrails.yml` with a hosted policy decision step that runs before production deploys.