apache / apache/infrastructure-actions

Discuss: which GitHub-Actions-security measures should be recommended / encouraged / enforced across ASF repos?

Open
#746 13 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.