apache / apache/infrastructure-actions
Discuss: which GitHub-Actions-security measures should be recommended / encouraged / enforced across ASF repos?
- Dominant language
- Python
- Stars
- 30
- Forks
- 83
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 79
Description
Follow-up to the discussion on #631 (`actions-audit.py`), where @raboof noted we don't yet have consensus on all the checks the tool proposes, and @dave2wave raised the enforcement vs. voluntary-adoption split and the missing input from Security / Infra.
This issue is the place to work toward that consensus. Once we agree, #631 (and any successor in [`apache/infrastructure-gha-workflow-scanner`](https://github.com/apache/infrastructure-gha-workflow-scanner)) can be adjusted to match.
### Classification scheme
For each check, please indicate which tier it belongs to:
- π’ **Recommend** β document it, PMCs opt in themselves
- π‘ **Encourage** β proactively open PRs against PMC repos (with PMC consent upstream on dev@), PMCs can decline
- π΄ **Enforce** β mandatory baseline, continuously scanned (e.g. via `infrastructure-gha-workflow-scanner`), failure flagged to Infra
- βͺ **Out of scope** β not appropriate as an ASF-wide policy
### Checks proposed in #631
- [ ] **Dependabot enabled for `github-actions` ecosystem** β tier: βͺπ’π‘π΄
- [ ] **Dependabot cooldown for `github-actions`** (separate thread in #683 β current proposal: 7 days for "used" actions; 0 days for dependabot PRs that trigger review in this repo) β tier: βͺπ’π‘π΄, value: 0 / 4 / 7 / other
- [ ] **Dependabot cooldown for language/package ecosystems** (pip, npm, uv, maven, etc.) β tier: βͺπ’π‘π΄, value: ?
- [ ] **CodeQL scanning for Actions** (`github/codeql-action`) β tier: βͺπ’π‘π΄
- [ ] **Zizmor workflow scanner** (`zizmorcore/zizmor-action`) β tier: βͺπ’π‘π΄
- [ ] **ASF allowlist-check** (requires every `uses:` ref to be on the approved list) β tier: βͺπ’π‘π΄
### Checks proposed elsewhere / worth considering
- [x] **Hash-pinning of all third-party actions** (incl. `actions/*`, `github/*`) β raised in #683 / #703 β tier: βͺπ’π‘π΄
- [x] **Binary-download verification** in allowed actions (see #686 / #743) β applies to allowlist review, not per-PMC repo scan β n/a here
- [ ] **Minimum-permission workflows** (top-level `permissions: read-all` or equivalent) β tier: βͺπ’π‘π΄
- [ ] **`persist-credentials: false` on `actions/checkout`** β tier: βͺπ’π‘π΄
### Meta questions
- [ ] **Where does the tooling live?** β this repo (`infrastructure-actions`) for voluntary / PR-opening; [`apache/infrastructure-gha-workflow-scanner`](https://github.com/apache/infrastructure-gha-workflow-scanner) for continuous enforcement? Or both? (@raboof, @dave2wave)
- [ ] **Scope:** PMC repos (prefix matched), non-PMC repos (`infrastructure-*`, `tooling-*`, `www-site`), or both? (@dave2wave raised scoping)
- [ ] **`.asf.yaml` opt-in/opt-out** β should PMCs be able to configure which checks apply via `.asf.yaml`? (@dave2wave's suggestion)
- [ ] **Decision process:** who has binding input? Proposed: Infra + Security Response team ratify the tiers; PMCs consulted on dev@ before any "π‘ Encourage" PRs are opened.
- [ ] **Rollout:** trial with a small number of friendly PMCs first (announce on their dev@), iterate on PR template, then broaden.
### Related
- #631 β audit tool PR
- #683 β cooldown-period discussion
- #686 β allowlist review criteria
- #703 β hash-pin all third-party actions
cc @raboof @dave2wave @ppkarwasz
Contributor guide
Assessment
This issue has not been assessed yet.