AI Safety

Deployment and CI/CD

How merge, review, and automated deployments can be treated as production approval.

Version: 2026-06-05

Summary

  • Merge into the main branch is often production approval.
  • Direct pushes to the main branch remain forbidden.
  • Deployment may start automatically after merge.
  • Code rollback is not the same as database or configuration rollback.
  • Pull requests need visible deployment-risk markers.
  • AI may prepare deployment code, but not execute or trigger deployment.

Topic

Deployment and CI/CD in customer projects, especially where automatic deployment follows a merge into the main branch.

Starting Point

Modern projects often have strong automation. Once a change is merged, CI builds, tests, packages, and deploys. This reduces manual work and improves repeatability, but it also shifts responsibility: review becomes part of the production gate.

AI assistance can generate workflow files, deployment scripts, Docker changes, configuration changes, migration steps, and release notes. These areas are security-relevant.

Risk

A small code change can have production impact when deployment is automatic. A wrong workflow permission, missing rollback step, unsafe migration, or unreviewed environment change can bypass the team's intended operational process.

Recommendation

Treat deployment configuration as security code. Changes to CI/CD, infrastructure scripts, workflow permissions, secrets, release paths, and database migrations need explicit review.

AI may draft these changes. It must not execute deployment commands, trigger production workflows, or merge into protected branches without human approval.

Review Checklist

  • Does the pull request alter CI/CD, deployment, or runtime configuration?
  • Is the deployment path automatic after merge?
  • Are database migrations reversible or at least operationally planned?
  • Is rollback documented for code, config, and data?
  • Are workflow permissions minimal?
  • Is production approval human and visible?

Wall rules

Deployment config is security code.

Deployment code is security code.

AI may prepare deployment code, but not execute it.

Merge into main is production approval.

Code rollback does not replace database rollback.

Open questions for a project

  • Which branch triggers production deployment?
  • Which files mark a pull request as deployment-relevant?
  • Who approves CI/CD changes?
  • What is the rollback path for database and config changes?