Skip to content

ci(release): allowlist the files the release bot may change - #665

Open
MRmarioruci wants to merge 1 commit into
mainfrom
ci/bot-approved-files
Open

MRmarioruci wants to merge 1 commit into
mainfrom
ci/bot-approved-files

Conversation

@MRmarioruci

Copy link
Copy Markdown
Contributor

Every release PR is blocked on a check that cannot pass. #663 is the first one to hit it.

The Cut release workflow opens its PR as github-actions, so Check Bot Policies runs instead of skipping. That job reads .github/repo_policies/BOT_APPROVED_FILES from the default branch and raises when the file is missing, which is the 404 traceback on #663. Human-opened PRs skip the job entirely, which is why nothing before #663 saw it.

This adds the file. The patterns cover the version and changelog release prepare writes per project, plus .release.json, Cargo.lock, the wallet's compat.json, and the test crates whose dependency versions bump alongside released crates.

.github/** is excluded on purpose, so a bot PR cannot change a workflow, an action, or this allowlist.

Verified with fnmatch against the union of every file changed by the last 12 release commits plus #663, 30 distinct paths, all covered. Also checked that .github/workflows/release.yaml, scripts/deploy-app, cli/src/cli.ts, canister_ids.json, dfx.json and station source are all still blocked.

The job reads the config from the default branch, so #663 needs no rebase. Merge this, then re-run its failed check.

The Cut release workflow opens its PR as github-actions, which makes the
Check Bot Policies job run instead of skip. That job reads
.github/repo_policies/BOT_APPROVED_FILES from the default branch and
throws when it is absent, so every bot-authored release PR is blocked on
a check that can never pass.

Patterns cover the version and changelog files release prepare writes for
each project, plus .release.json, Cargo.lock, the wallet compat file and
the test crates whose dependency versions bump with the released crates.
Verified against every file in the last 12 release commits.

.github/** is deliberately excluded, so a bot PR cannot change a
workflow, an action, or this allowlist.
@MRmarioruci
MRmarioruci requested a review from a team as a code owner September 11, 2026 14:03
@zeropath-ai

zeropath-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 2b6fda2.

Security Overview
Detected Code Changes
Change Type Relevant files
Other relevant categories ► .github/repo_policies/BOT_APPROVED_FILES
    Add bot-approved file patterns for release automation

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants