Backport workflow-hardening fix (unpinned-uses) to `maint-16.x`
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Summary
The default branch already hardened `.github/workflows/dev.yml` against the issue(s) below, but the release branch **`maint-16.x`** still carries it. This proposes the same, minimal fix for that branch.
### Affected branch / file
- branch: **`maint-16.x`** (HEAD `c8d10c56`)
- file: `.github/workflows/dev.yml`
### What's flagged (by [zizmor](https://github.com/woodruffw/zizmor))
- `unpinned-uses` — actions referenced by mutable tag/branch instead of a pinned commit SHA
These are already resolved on the default branch in https://github.com/apache/datafusion/commit/9b27952303d38f9991475e9feb1d81ccac9d4f65 but the fix was not backported to `maint-16.x`.
### Suggested fix
Concretely:
- ~ jobs.$J.steps[uses=actions/checkout].uses : pin(actions/checkout -> target_ref SHA)
- ~ jobs.$J.steps[uses=korandoru/hawkeye].uses : pin(korandoru/hawkeye -> target_ref SHA)
- ~ jobs.$J2.steps[uses=actions/checkout].uses : pin(actions/checkout -> target_ref SHA)
- ~ jobs.$J2.steps[uses=actions/setup-node].uses : pin(actions/setup-node -> target_ref SHA)
```diff
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -36,8 +36,8 @@
name: Use prettier to check formatting of documents
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
+ - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
with:
node-version: "14"
- name: Prettier check
```
*(Whitespace is normalized in the diff above; only the security-relevant lines change.)* This patch was checked locally with **zizmor** and **actionlint**: the flagged finding(s) are cleared on the affected construct and no new lint or security findings are introduced.
---
*This issue was prepared by an automated workflow-hardening analysis and double-checked against the two scanners above. Please review before merging — happy to send a pull request instead if that's preferred.*
Contributor guide
Research direction
Update .github/workflows/dev.yml on the maint-16.x branch, following the pinned references from the issue and the default-branch commit. Run zizmor and actionlint against the workflow; done means the listed unpinned-uses findings are cleared without introducing new lint or security findings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100