Skip to content

Gate secret-bearing and PR-code-executing workflows behind a maintainer /approve-ci command #2191

Description

@Adi-204

Motivation

Following #2184, looked at how much of our CI a pull request can reach before a maintainer has looked at it.

The gap

GitHub's built-in "require approval for fork pull requests" setting only applies to pull_request runs from forks. It does not cover pull_request_target, which runs in the base repository context with access to repository secrets — a trigger GitHub's own docs flag as a known risk area. For that class of workflow we currently have no native approval step available.

Proposal (v1)

A /approve-ci PR comment command:

  • A maintainer comments /approve-ci; the command verifies them against a hardcoded maintainer allowlist and applies a ci-approved label
  • A small set of workflows stays skipped until that label is present
  • Approval is sticky for the PR's lifetime — once approved, later pushes run normally
  • Bot-authored PRs (asyncapi-bot, dependabot) bypass the gate, reusing the bot-exclusion conditions these workflows already have

Deliberately minimal: easy to review, easy to revert, room to tighten later.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions