Skip to content

ci: add ASF allowlist check for GitHub Actions (Dependabot guard)#8817

Open
rzo1 wants to merge 1 commit into
masterfrom
add-asf-allowlist-check
Open

ci: add ASF allowlist check for GitHub Actions (Dependabot guard)#8817
rzo1 wants to merge 1 commit into
masterfrom
add-asf-allowlist-check

Conversation

@rzo1

@rzo1 rzo1 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Adds a CI check that validates every referenced GitHub Action against the ASF allowlist, and wires it in as a required status check on master.

Why

Dependabot's github-actions ecosystem updater opens PRs that bump action versions. Without this guard, an update could point us at an action that is not on the ASF allowlist, which would only surface later (or get merged). This makes the violation fail fast on the PR.

How

  • New workflow .github/workflows/asf-allowlist-check.yml
    • Runs apache/infrastructure-actions/allowlist-check@main.
    • Triggers on pull_request (and push to master/2.x) limited to paths: .github/** — exactly the files Dependabot's github-actions updater touches.
    • scan-glob: ".github/**/*.{yml,yaml}" because Storm mixes both .yml and .yaml workflow files (the action's default only matches .yml).
    • permissions: contents: read, persist-credentials: false per ASF guidance.
  • .asf.yaml: adds asf-allowlist-check to required_status_checks.contexts on master so failing PRs are blocked from merging (branch protection on ASF repos is managed via .asf.yaml, not the GitHub UI).

@rzo1 rzo1 requested review from GGraziadei and reiabreu June 29, 2026 17:27
@rzo1 rzo1 force-pushed the add-asf-allowlist-check branch from 5b521a8 to 8bd70e1 Compare June 29, 2026 17:29
@GGraziadei

Copy link
Copy Markdown
Member

Hi @rzo1, thanks for jumping in so quickly to support!

I checked the logs for the allowlist action, and it looks like it isn't actually scanning any files. It returns Checking 0 unique action ref(s), even though the workflows exist:

RUN python3 "/home/runner/work/_actions/apache/infrastructure-actions/main/allowlist-check/check_asf_allowlist.py" "/home/runner/work/_temp/approved_patterns.yml"
...
env:
  GITHUB_YAML_GLOB: .github/**/*.{yml,yaml}
Checking 0 unique action ref(s) against the ASF allowlist:

All 0 unique action refs are on the ASF allowlist

I suspect the glob pattern might be the issue here. Could this syntax be incorrect for this specific python script?

scan-glob: ".github/**/*.{yml,yaml}"

It seems that the py doesn't expand the {yml,yaml}

Adds a workflow running apache/infrastructure-actions/allowlist-check on
PRs touching .github/** (which is what Dependabot's github-actions
updater modifies) so that bumps to actions not on the ASF allowlist are
caught before merge. Also marks asf-allowlist-check as a required status
check on master via .asf.yaml so such PRs are blocked from merging.
@rzo1 rzo1 force-pushed the add-asf-allowlist-check branch from 8bd70e1 to 03f0277 Compare June 29, 2026 17:58
@rzo1

rzo1 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Should be fine now @GGraziadei

@GGraziadei GGraziadei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick fix!

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