Skip to content

ops: audit logging on branch-protection bypass (enforce_admins=false) #215

Description

@colek42

Background

aflock-ai/rookery has enforce_admins: false on the main branch protection. This is necessary today because the org has a single primary author (Cole) who cannot self-approve PRs under GitHub's hardcoded review semantics — admin-bypass is the only path to land PRs without a second human reviewer.

The cost: every admin merge leaves no signal in the review trail beyond the merge commit itself. Compare to:

  • A standard PR merge: includes reviewer name, approval timestamp, dismissed reviews if any
  • An admin-bypass merge: looks identical to a passing-checks merge until you check the audit log

For a supply-chain attestation tool, the lack of visible audit on protection bypass is a self-referential weakness.

Scope

Three options, ordered by cost:

  1. Minimal: rg/gh script that scans the last N merges, cross-references the Audit Log API, and produces a protection-bypass-merges.md log. Run weekly via a scheduled GitHub Action.

  2. Medium: branch protection ruleset with bypass_actors enumerating exactly who can bypass + why. Replaces enforce_admins: false with an auditable allow-list. Each bypass produces an Audit Log entry naming the actor.

  3. Full: introduce a claude-bot service account that can approve PRs as a second reviewer. Removes the need for any bypass; protection stays on for everyone including admins. Cost: PAT/bot user creation, write access grant, auto-approval workflow.

Why this matters

If cilock attestations claim "cilock itself was built under a chain-of-custody policy," but the cilock repo merges via admin-bypass with no audit trail, the claim is weaker than the tool's own threat model would accept from a downstream user. Eat your own dogfood.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity hardening / vulnerability mitigation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions