Skip to content

Update Blume and reconcile security overrides #249

Update Blume and reconcile security overrides

Update Blume and reconcile security overrides #249

name: Automation trust review

Check warning on line 1 in .github/workflows/automation-trust.yml

View workflow run for this annotation

GitHub Actions / Automation trust review

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
contents: read
pull-requests: write
jobs:
trust-review:
name: Automation trust review
runs-on: ubuntu-latest
steps:
- name: Require review for repo-owned automation
uses: actions/github-script@v9
with:
script: |
const files = await github.paginate(
github.rest.pulls.listFiles,
{
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100,
},
);
const protectedPath = (path) =>
path === "AGENTS.md" ||
path === "skills-lock.json" ||
path === ".github/workflows/automation-trust.yml" ||
path === ".github/workflows/release.yml" ||
path === "scripts/release-workflow.mjs" ||
path.startsWith(".codex/") ||
path.startsWith(".agents/");
const changed = [
...new Set(
files.flatMap((file) =>
[file.filename, file.previous_filename].filter(
(path) => path && protectedPath(path),
),
),
),
];
let reviewed = context.payload.pull_request.labels.some(
(label) => label.name === "automation-reviewed",
);
if (
changed.length &&
reviewed &&
context.payload.action === "synchronize"
) {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "automation-reviewed",
});
reviewed = false;
}
if (changed.length && !reviewed) {
core.setFailed(
`Review repo-owned automation, then add the automation-reviewed label: ${changed.join(", ")}`,
);
}