This repository hosts GitHub Actions developed by the ASF community and approved for any ASF top level project to use. It also manages the organization wide allow list of GitHub Actions via ‘Configuration as Code’.
To contribute a GitHub Action to this repository:
/MyNewAction)The Infrastructure team will review each proposed Action based on:
Once approved, the Infrastructure team will merge the pull request and add the new Action to the list of available Actions for all ASF projects.
We highly appreciate contributed reviews, especially from people associated with the projects that (would like to) use a particular action, even if they‘re not committers on this project: you’re especially qualified to judge and vouch for the safety and correctness of the action.
As stated in the ASF GitHub Actions Policy, GitHub Actions from external sources are blocked by default in all apache/* repositories. Only actions from the following namespaces are automatically allowed:
apache/*github/*actions/*All other actions must be explicitly added to the allow list after undergoing a security review. This review process applies to both new actions and new versions of previously approved actions (though reviews for new versions are typically expedited).
graph TD; manual["manual PRs"]--new entries-->actions.yml dependabot--updates (after review)-->dummy[".github/workflows/dummy.yml"]; dummy--updates-->actions.yml actions.yml--new entries-->dummy actions.yml--generates-->approved_patterns.yml
To request addition of an action to the allow list:
actions.yml using the following format:repo/owner: '<exact-commit-sha>': tag: vX.Y.Z
Create a PR against the main branch
Include in your PR description:
Wait for review by the infrastructure team
[!NOTE] Always pin actions to exact commit SHAs, never use tags or branch references.
The infrastructure team will review your request and either approve, request changes, or provide feedback on alternatives.
In most cases, new versions are automatically added through Dependabot:
Projects are encouraged to help review updates to actions they use. Please have a look at the diff and mention in your approval what you have checked and why you think the action is safe.
Many GitHub Actions ship pre-compiled JavaScript in their dist/ directory. To verify that the published compiled JS matches a clean rebuild from source, use the verification script:
uv run utils/verify-action-build.py org/repo@commit_hash
For example:
uv run utils/verify-action-build.py dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3
The script will:
dist/ files as published in the repositorynpm ci && npm run build)A clean result confirms that the compiled JS was built from the declared source. Any differences will be flagged for manual inspection.
To review all open dependabot PRs at once, run:
uv run utils/verify-action-build.py --check-dependabot-prs
This will:
gh CLIIf you prefer not to install the gh CLI, you can use --no-gh to make all GitHub API calls via Python requests instead. In this mode you must provide a GitHub token either via --github-token or the GITHUB_TOKEN environment variable:
# Using the flag: uv run utils/verify-action-build.py --no-gh --github-token ghp_... org/repo@commit_hash # Or via environment variable: export GITHUB_TOKEN=ghp_... uv run utils/verify-action-build.py --no-gh --check-dependabot-prs
The --no-gh mode supports all the same features as the default gh-based mode.
Dependabot PRs that modify dummy.yml are automatically verified by the verify_dependabot_action.yml workflow. It extracts the action reference from the PR, rebuilds the compiled JavaScript in Docker, and compares it against the published version. The workflow reports success or failure but does not auto-approve or merge — a human reviewer must still approve.
To verify a specific PR locally (non-interactively), use:
uv run utils/verify-action-build.py --ci --from-pr 123
The --ci flag skips all interactive prompts (auto-selects the newest approved version for diffing, auto-accepts exclusions, disables paging). The --from-pr flag extracts the action reference from the given PR number.
[!NOTE] Prerequisites:
dockeranduv. When using the default mode (without--no-gh),gh(GitHub CLI, authenticated viagh auth login) is also required. The build runs in anode:20-slimcontainer so no local Node.js installation is needed.
This repository uses a Dependabot cooldown period of 4 days. After a Dependabot PR is merged or closed, Dependabot will wait 4 days before opening the next PR for the same ecosystem. This helps keep the volume of update PRs manageable and gives reviewers time to catch up.
[!TIP] We recommend that ASF projects configure a similar cooldown in their own
dependabot.ymlto avoid being overwhelmed by update PRs and to catch up with approved actions here:updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" cooldown: default: 4Adjust the
defaultvalue (in days) to match your project's review capacity.
If you need to add a specific version of an already approved action (especially an older one):
actions.yml with the following format:existing/action: '<exact-commit-sha>': expires_at: 2025-01-01 keep: true tag: vX.Y.Z
main branch[!WARNING] Older versions may contain security vulnerabilities or performance issues. Always evaluate if using the latest version is possible before requesting older versions.
[!IMPORTANT] If a version or entire action needs to be removed immediately due to a security vulnerability:
actions.ymlmain branchThe infrastructure team will prioritize these removal requests and may take additional steps to notify affected projects if necessary.
For ‘regular’ removals (not security responses), you can use ./utils/action-usage.sh someorg/theaction to see if/how an action is still used anywhere in the ASF, and create a ‘regular’ PR removing it from actions.yml (or adding an expiration date) when it is no longer used.