fix(ci): pin checkout in release notification smoke workflow (#4399)

## Description

Pin `actions/checkout` to a full commit SHA in the local `act` smoke
workflow `.github/act/release-slack-notification.yml`, so a mutable tag
cannot be silently repointed (CWE-1357). This is defence-in-depth
hardening, not a demonstrated exploit.

Closes #

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

None of the boxes fit exactly: this is CI/security hardening of one
workflow line (see Additional Notes).

## Changes Made

- Replace `actions/checkout@v7` with
`actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7` in
`.github/act/release-slack-notification.yml`.
- Amend the commit subject to satisfy commitlint (<=100 chars) and
retitle the PR as a Conventional Commit.

## Testing

- [ ] Unit tests pass (`pytest`)
- [ ] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [ ] New tests added for new functionality
- [x] Manual testing performed

`pytest`, `ruff`, `mypy` and new tests are N/A: no Python code changed.

### Test Output

```text
$ python3 -I -c "import yaml; yaml.safe_load(open('.github/act/release-slack-notification.yml'))"
yaml ok  (step 0: uses: actions/checkout@3d3c42e5aa)

$ git ls-remote https://github.com/actions/checkout 'refs/tags/v7*'
3d3c42e5aac5ba805825da76410c181273ba90b1	refs/tags/v7
3d3c42e5aac5ba805825da76410c181273ba90b1	refs/tags/v7.0.1

$ ls .github/actions/release-slack-notification
action.yml  build_payload.py
```

## Real Behavior Proof

- Environment: macOS, local checkout of this branch.
- Exact command / steps: the three commands above.
- Observed result: the workflow YAML parses; the pinned SHA equals the
current `refs/tags/v7` (also `v7.0.1`); the local composite action
referenced by the workflow exists.
- Not tested: the workflow was **not executed** (`act` is not installed
here), so there is no end-to-end evidence that the smoke job resolves
the pinned checkout or that the notification component runs. No Slack
delivery or production release was exercised. `release.yml` still uses
`actions/checkout@v7` and is out of scope.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

- **Unchecked boxes** are N/A for a one-line workflow pin (no code, docs
or tests touched), not skipped work.
- **`pip-audit` / `cargo-audit` failures are pre-existing on `main`**,
not caused by this change (it touches one YAML line). The Security
workflow has failed on recent `main` runs, e.g.
[39724115555](https://github.com/headroomlabs-ai/headroom/actions/runs/39724115555).
Advisories seen on this PR's run: pip-audit `certifi 2026.1.4`
PYSEC-2026-4320 and `pillow 12.3.0` CVE-2026-112895; cargo-audit
RUSTSEC-2026-0381 and RUSTSEC-2026-0382. I deliberately did not modify
dependency files here to keep the PR scoped; I'll rebase once `main`
carries the remediation.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
This commit is contained in:
Anupam Mediratta
2026-10-24 08:43:39 -07:00
committed by GitHub
co-authored by Claude Sonnet 5.5 JerrettDavis
parent 1668a6c0dd
commit 70273db0af
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Exercise production notification component
uses: ./.github/actions/release-slack-notification
with: