SECOPS

Log Every Security MR Decision to a Postgres Review Ledger

When a security-labeled GitLab MR is approved, merged, or closed, records the outcome, reviewer, risk tier, and time-to-decision into a Postgres audit ledger for compliance…

CategorySecOps
Enginesim
Difficultyintermediate
Triggerevent
Steps4
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR approved, merged, or closedGitLabGitLab
  • LogicKeep only security-labeled MRs
  • ActionExtract reviewer, tier, decision, time-to-decision
  • OutputUpsert row into Postgres review ledgerPostgreSQLPostgres

What it does

Builds an immutable record of how each security-flagged merge request was handled, who approved it, at what risk tier, and how long it took, so you can answer auditors and track review throughput over time.

When to use it

Run this when you need evidence for SOC 2 / ISO change-management controls, or simply want metrics on security review volume, approval rates, and SLA adherence per reviewer.

How it works

  1. 1A GitLab webhook fires on merge request `approved`, `merge`, and `close` events.
  2. 2A branch filters to MRs that carry a `sec/*` label, dropping non-security MRs.
  3. 3The flow extracts the MR ID, risk tier, assigned reviewer, decision type, and computes time-from-label-to-decision.
  4. 4It upserts a row into the Postgres `security_review_ledger` table keyed by MR ID.
  5. 5The final step confirms the write and emits the ledger row for downstream BI, giving you a queryable compliance trail.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.