Skip to content

Home / Blog / Security

How do I get an audit trail of what ran in our CI for compliance?

Combine the audit log, run history and artifact attestations, and export the first two before they expire. What each records, how long GitHub keeps it and which plan each feature needs.

Combine 3 GitHub records and export the first 2 before they expire: the audit log, which records workflow events such as a run cancelled or a job approved, and changes to organization settings, and keeps events for 180 days; run history, kept for 90 days by default and up to 400 on private repositories; and artifact attestations, which establish the provenance of a build. No GitHub page says what an auditor will accept, so ask yours.

In short
  • The organization audit log keeps events for 180 days; the web view shows the last 3 months unless you set a date range.
  • Checks, workflow runs, statuses, artifacts and logs are kept 90 days by default, and up to 400 days on private repositories.
  • Run events such as workflows.completed_workflow_run are available only through the API, a stream or an export.
  • The audit log APIs are for Enterprise Cloud and streaming is set up at the enterprise level; any organization can export JSON or CSV.
  • No GitHub page says what an auditor will accept, so ask your auditor for the evidence, period and format first.

That is the whole answer. The rest of this page is the detail you need to build it: what each record holds, how long GitHub keeps it, what is on which plan, and where GitHub’s own pages disagree with what you may have read. Every figure was read from GitHub’s published pages on the date this post was last checked, and these are figures that change, so check the linked page before you promise a period to an auditor.

What does the GitHub audit log record about workflows?

The organization audit log has a workflows category, and GitHub’s events reference lists 15 events in it. The ones that matter for an audit trail are below. Three of them are not shown in the web interface and are available only through the REST API, audit log streaming or a JSON or CSV export.

EventWhat it recordsRestriction GitHub notes
workflows.created_workflow_run, workflows.completed_workflow_runA workflow run was created; a workflow status changed to completed.REST API, audit log streaming or JSON/CSV export only
workflows.prepared_workflow_jobA workflow job was started, and the event includes the list of secrets that were provided to the job.REST API, audit log streaming or JSON/CSV export only
workflows.approve_workflow_job, workflows.reject_workflow_jobA workflow job was approved or rejected.None noted
workflows.cancel_workflow_run, workflows.rerun_workflow_run, workflows.delete_workflow_runA workflow run was cancelled, re-run or deleted.None noted
workflows.disable_workflow, workflows.enable_workflowA workflow was disabled, and enabled again.None noted
workflows.actions_policy_violationA workflow run produced one or more workflow execution protection policy violations.None noted
workflows.debugger_session_started, workflows.debugger_session_completedA job with the debugger enabled started or completed a debug session, with the repository, ref, workflow file and actor.None noted
org.register_self_hosted_runner, org.remove_self_hosted_runner, org.configure_self_hosted_jit_runnerA self-hosted runner was registered or removed, or a just-in-time runner was configured.None noted

If another page tells you that run events are visible only through the API, check it against this one. Today the reference says so about 3 of the 15 events, the two run events and prepared_workflow_job, and the other 12 carry no such note. The last row matters if your jobs run on a runner that is not GitHub’s: registering, removing and configuring runners is itself logged.

How long does GitHub keep run history, logs and the audit log?

RecordKept forCan you change it?GitHub page
Organization audit logEvents from the last 180 days; the web view shows the last 3 months unless you set a date rangeGitHub's page gives no way to extend it: export or stream before they passReviewing the audit log for your organization
Checks, workflow runs, commit statuses, artifacts and logs90 days by defaultPublic repositories 1 to 90 days; private repositories 1 to 400 days; never above the organization's or enterprise's cap; not retroactiveConfiguring the retention period
The same checks, runs and statuses before 1 October 2026400 days or more, whatever the settingSince 1 October 2026 they follow the setting aboveGitHub changelog, 27 August 2026

The change on 1 October 2026 is the one that catches people. Until then, checks, workflow runs and commit statuses were kept for 400 days or more whatever your setting said. They now follow the same setting as artifacts and logs, which is 90 days unless you raised it. GitHub says that for most repositories no action is required, and that changing the setting does not bring back anything already removed. If you need run records for longer than 90 days, raise the retention up to your organization’s cap, or export what you need before it goes. Logs and artifacts count toward billable Actions storage, so a longer period costs more.

Can I stream or export the audit log to my own storage?

Yes, with limits that depend on your plan. Any organization can export the audit log as JSON or CSV, but there is a hard limit on an export: a 100 MB compressed file, or 10 minutes of processing. The REST and GraphQL APIs for the organization audit log are for GitHub Enterprise Cloud. Streaming is configured at the enterprise level and documented in GitHub’s Enterprise Cloud documentation. It delivers to Amazon S3, Azure Blob Storage, Azure Event Hubs, Datadog, Google Cloud Storage or Splunk, and to Microsoft Purview for Copilot agent session events only, delivers each event at least once, so some arrive twice, and keeps a seven-day buffer if you pause it. GitHub’s advice is to keep exported logs as long as you need them.

What do artifact attestations add?

An attestation is a signed claim that establishes the provenance of a build. GitHub says that by itself it provides SLSA v1.0 Build Level 2, and that building in a shared reusable workflow can reach Build Level 3. It also says an attestation is not a guarantee that an artifact is secure: attestations link you to the source code and the build instructions that produced an artifact, and you decide what to trust. The concept page names no plan requirement. It says that private repositories use GitHub’s own Sigstore instance and public ones the Public Good Instance, so check your plan before you promise an auditor one. This is the workflow GitHub documents, which we have not run:

name: release
on:
  push:
    tags: ["v*"]
permissions:
  contents: read
jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
      attestations: write
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - run: make dist
      - uses: actions/attest@v4
        with:
          subject-path: dist/app.tar.gz
gh attestation verify dist/app.tar.gz -R your-org/your-repo

The action’s README lists a third permission, artifact-metadata: write, that GitHub’s how-to does not, so read both before you copy either.

What will an auditor accept?

No source we found says. The controls auditors ask about, who may change a pipeline, who approved a change, what ran and how long you can show it, map onto the records above, but the mapping is your auditor’s to confirm. Ask what evidence, for what period and in what format before you choose a retention figure, and ask whether a JSON export from the audit log is acceptable or whether they need a screenshot of the web view.

What does GitHub’s Actions Data Stream add?

We could not confirm it. GitHub’s March 2026 security roadmap promised an Actions Data Stream, with near real-time execution telemetry delivered to destinations such as Amazon S3 and Azure Event Hub, and gave a preview window of 3 to 6 months. The page of GitHub’s Actions changelog we read on the date this post was last checked covers only 1 October to 12 November and lists no release of it, and the window has probably passed, so check the changelog yourself. Until you have, plan your evidence on the records above.

What do we keep when your jobs run on runners.io?

Our own record is narrower than GitHub’s, and it does not replace it. We keep a copy of each job’s log, and its page shows it for 30 days, while GitHub keeps the log it holds for 90 days by default. The job’s timings and minutes stay after that, because your bill is worked out from them. A terminal into a running job, if an owner or admin has switched it on, is recorded in your organisation’s activity feed. The security documentation, the jobs page documentation and the limits page have the rest, and what to ask any runner service covers the questions to put to any runner service. Every size we run, with its memory, disk and rate a minute, is on our managed GitHub Actions runners page.

Sources

Frequently asked questions

How do I get an audit trail of what ran in GitHub Actions?

Combine the organization audit log, which records workflow events such as a run cancelled or a job approved, with run history and artifact attestations. Export the first two before they expire: the audit log keeps events for 180 days, and run history 90 days by default.

How long does GitHub keep workflow runs and logs?

90 days by default. Public repositories can set 1 to 90 days and private repositories 1 to 400, within any cap an organization or enterprise sets. Since 1 October 2026 checks, workflow runs and commit statuses follow the same setting; before that they were kept 400 days or more.

Can I stream the GitHub audit log to my own storage?

Yes, at the enterprise level, as GitHub's Enterprise Cloud documentation describes. It streams to Amazon S3, Azure Blob Storage, Azure Event Hubs, Datadog, Google Cloud Storage or Splunk, delivering each event at least once. Any organization can export JSON or CSV, up to 100 MB compressed or 10 minutes of processing.

Which GitHub records does a SOC 2 auditor accept?

No GitHub page says. The controls auditors ask about, such as who may change a pipeline and who approved a change, map onto the audit log, run history and attestations, but your auditor confirms the mapping. Ask for the evidence, period and format first.

Move your CI onto our runners with one line

Change one line, watch your own build, then decide.

Connect GitHub

Card required. You pay only for the minutes your jobs run.

.github/workflows/ci.yml
jobs: test:removed: runs-on: ubuntu-latestadded: runs-on: runnersio-4vcpu-ubuntu-2604 steps: - uses: actions/checkout@v4 - run: make testadded: build:added: runs-on: runnersio-32vcpu-ubuntu-2604