CI/CD Audit Trail: What to Capture and What Auditors Want

Craig CookFounderLinkedInGitHub8 min read

Three weeks before a SOC 2 audit, the request lands: show every change that reached production last quarter, who approved it, and the evidence it was tested. Your pipeline recorded all of it, the commits, the workflow runs, the approvals, the deploys. It is just spread across the provider audit log, the run history, the artefact registry, and a couple of chat threads, none of it indexed the way an auditor reads.

A CI/CD audit trail is the dated, attributable record of every change that reached production, captured in a form an auditor can query. The instinct when someone says "audit trail" is to log everything, and that produces the opposite of what an audit needs. A CI/CD audit trail an auditor can actually use is small, structured, and indexable: a handful of fields per change, keyed to the control each one evidences, not a thirty-gigabyte stream of debug output nobody can search.

This is the evidence-layer cut of CI/CD compliance. The controls those records satisfy are covered in the ISO 27001 CI/CD controls; here the focus is the trail itself: what to capture, where it already lives, what auditors accept, and how long to keep it.

What a CI/CD audit trail actually is

It is not your application logs, and it is not your observability stack. Those answer "what did the system do at runtime?" An audit trail answers a different question: "who changed what reached production, when, and on whose authority?" The unit is the change, not the request or the log line. Each production change should leave one durable, attributable record: the commit that caused it, the person or process that approved it, the pipeline run that shipped it, and the outcome.

Most of that already exists as a side effect of the pipeline running. The gap is rarely capture; it is structure, attribution, and retention. The provider records who triggered a workflow and when, but it does not key that record to the SOC 2 or ISO 27001 control it evidences, and it does not keep it for as long as the framework requires.

The anti-pattern: logging everything

Faced with an audit, teams often reach for volume: turn on every log, ship it all to a bucket, and point the auditor at it. This fails in both directions. The auditor cannot find the handful of records they need in a sea of debug output, so they ask you to extract them, which puts you back to manual reconstruction under deadline. And undifferentiated logs rarely carry the attribution an auditor needs anyway: a line saying a deploy happened is not evidence of who approved it.

The trail an auditor can use runs the other way. A small set of fields per production change, each record tied to the control it evidences, queryable by date, repository, and environment. Smaller and structured beats larger and raw every time, because the test of an audit trail is not how much it contains but how fast a specific, attributable record can be produced on request.

The schema: what to capture per change

One evidence row per production change. These are the fields that make a row an auditor accepts, and the reason each one matters.

FieldWhat it captures, and why the auditor wants it
Pipeline run IDThe specific workflow run that performed the deploy. The anchor every other field hangs off, and the link back to the full execution record.
Commit SHAExactly what code shipped. Immutable, and traceable to the change that introduced it.
Actor and approverWho triggered the deploy and who approved it, preferably distinct identities. The core of the change-management and segregation-of-duties controls.
TimestampWhen the change reached production, so the record falls inside the audit window and the sequence is provable.
Destination environmentWhich environment the change reached, so production deploys are distinguishable from staging or test runs.
Artefact referenceWhat was deployed, ideally with a signature, so the running artefact is tied to the reviewed source.
Structured findingsThe security and test results for the change in open formats (SARIF, CycloneDX), so a scan is evidence rather than a log line saying it ran.
Outcome and control IDWhether the deploy succeeded, and which control the row evidences. The control ID is what turns an activity record into audit evidence.

The control-ID column is the one most teams miss. The same run record can evidence several controls at once: a deploy with a recorded approver supports SOC 2 CC8.1 change management and ISO 27001 8.32 in a single row. Capture the activity once, project it onto every control it satisfies.

Where the trail already lives

Most of the schema above is already recorded, just scattered. The provider audit log (GitHub Actions Audit Log, GitLab Audit Events, the equivalent on Bitbucket Pipelines, CircleCI, Azure DevOps, and Jenkins) holds the actor and trigger records. The run history holds the pipeline run and outcome. The artefact registry holds what shipped. The scanner output holds the findings. Compiling the trail is the work of reading those sources and presenting them indexed by control ID and by change, rather than chronologically per tool.

The pipeline audit log is also where the gaps show up. Approvals recorded as chat messages rather than as workflow artefacts, deploy paths that bypass the standard workflow, and self-approved production changes are each a hole an auditor will find. Surfacing them before the audit does is the point of treating the trail as a first-class output, not an afterthought.

What auditors request, and how long to keep it

Auditors do not ask for your logs. They ask for evidence that a control operated across the audit period: every production deploy in the window with its approver, the scan results for every change, the access events on the deploy environment. A SOC 2 Type 2 audit covers a period rather than a point in time, so the request is for the whole window, not a sample. That is why a queryable trail beats a screenshot: the answer to "show me Q2" is a filter, not a fortnight of reconstruction.

Retention is the field teams most often get wrong. SOC 2 and PCI-DSS typically expect a twelve-month trail; some ISO 27001 controls expect longer. The default workflow-log retention on the major providers is far shorter, so a trail that lives only in provider logs can age out before the audit asks for it. The fix is keeping the structured evidence rows beyond the provider default, with an off-provider copy, rather than retaining raw logs forever.

How CI/CD Watch surfaces audit-trail evidence

CI/CD Watch, a CI/CD observability platform that monitors pipelines across GitHub Actions, GitLab CI, Bitbucket Pipelines, CircleCI, Azure DevOps, and Jenkins, records each audit finding in the structured, dated shape an evidence row wants: a rule ID, the repository, a workflow reference, a timestamp, and a state. The audit run itself is an artefact: the date it ran, the pipeline state at the time, and the rules that fired and passed. For ISO 27001 specifically, findings carry the Annex A control IDs they evidence, can be filtered by standard, and roll up into a per-standard coverage view.

Some pieces of the schema above are roadmap, not shipped. Signed-artefact inventory, an approver record on every production deploy, secret-rotation evidence, and a dated PDF export for handing to an auditor are planned, not current features. What ships today is the structured, control-ID-keyed findings trail. Read the audit documentation for how findings are classified, and the CI/CD for DevSecOps page for the security and compliance companion.

Build an audit trail your auditor can use

The fastest way to see where your pipeline audit trail stands is to run the audit against your own repositories. Connect a provider and the structured findings appear keyed to their control IDs, with the change-management and access gaps called out before an auditor finds them. The Free tier covers pipeline-run monitoring; the audit and the standards mapping sit on the paid tiers, with the breakdown on the pricing page. For the framework this evidence sits inside, the CI/CD compliance overview covers all five standards and the evidence-row model.

CI/CD Watch is built by 3CS Technologies Ltd. It started as an internal tool for tracking pipeline health across a mixed GitHub Actions and Jenkins estate. The same engine now powers the SaaS platform.

Related articles

Ready to monitor your CI/CD pipelines?

Connect your first provider in under two minutes. No credit card required.