Inspiration

Most outages and security incidents happen after code is merged. Teams stitch together scanners, release notes, approvals and monitoring by hand, and the weakest link is the handoff between them. We wanted one workflow that carries a merged merge request all the way to a safe, monitored release, with humans staying in control of risky decisions.

What it does

Release Guardian turns a merged merge request into a supervised release: Triage and govern: findings are merged into one view. A policy blocks the release on any critical or high issue. Only documented false positives can be suppressed. Remediate: for fixable dependency vulnerabilities, it opens a remediation merge request with the upgrade, an explanation, and the remaining risk. It never merges anything itself. Document: it classifies the change, writes release notes from the merged work (with MR and issue links), and posts a report on the merge request. Package and stage: it builds a versioned container image and smoke-tests it in a staging environment. Approve: a plain-language approval summary is posted and the pipeline waits for a human to approve production. Monitor and roll back: after deployment it watches health, error rate and latency. If the release degrades, it rolls production back to the previous version and opens an incident issue with a timeline, evidence and suspect commits. Release: healthy releases get a GitLab Release with notes and a tag.

How we built it

GitLab CI/CD is the backbone: 13 custom jobs across 12 stages, plus GitLab's SAST and Secret Detection templates, with GitLab Environments tracking staging and production history. Deterministic scripts (Node.js, zero dependencies) perform the high-stakes actions: triage policy, remediation MR, smoke tests, monitoring, rollback. They are covered by 18 automated tests. A GitLab Duo custom flow (flows/release-guardian-analyst.yaml) adds agentic reasoning: it reads the merge request, classifies the change, assesses release risk, and posts a recommendation for reviewers. Design principle: agents reason and recommend, deterministic jobs act, humans approve. This keeps autonomy supervised and auditable.

Challenges we ran into

GitLab's newer dependency scanning no longer outputs a classic vulnerability report, so we added a deterministic npm audit step that produces machine-readable findings with fix information. Making rollback trustworthy: we verify the previous image exists and record the rollback as a real deployment in GitLab Environments. Keeping autonomy safe: remediation only proposes non-major fixes and never merges. A Windows-only Node.js crash in our test scripts that taught us to set exit codes instead of forcing process exit.

Accomplishments that we're proud of

A complete loop from vulnerable merge, to blocked release, to remediation, to approved deployment, to automatic rollback, all visible in GitLab. 18 automated tests covering the pipeline logic, including a real healthy-versus-failing service check. Humans stay in control: every production change needs an explicit approval.

What we learned

Agents are most useful where judgment and explanation matter; deterministic jobs are better where an action must be predictable and repeatable. Combining them is what makes supervised autonomy practical.

What's next for Release Guardian

Deploy to a real cloud target such as Cloud Run, add a second flow that analyzes incidents and proposes a fix merge request, support more ecosystems for remediation, and add Slack or email approval notifications.

Built With

  • docker
  • gitlab-ci/cd
  • gitlab-container-registry
  • gitlab-duo-agent-platform
  • gitlab-environments
  • gitlab-releases
  • gitlab-sast
  • gitlab-secret-detection
  • node.js
Share this project:

Updates

Submission history