Skip to content

chore: clear trivy and zizmor security scan findings - #361

Merged
mch merged 2 commits into
developfrom
users/mahughes/dep-updates
Oct 14, 2026
Merged

mch merged 2 commits into
developfrom
users/mahughes/dep-updates

Conversation

@mch

@mch mch commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Clears every finding that would fail the trivy and zizmor jobs of the security scanning gate proposed in #360. Without these changes that gate is red on arrival, and stays red on every subsequent pull request.

trivy: 83 findings -> 0

docs/sphinx/requirements.txt had drifted far behind its inputs, producing 83 vulnerabilities (47 HIGH, 2 CRITICAL), all in transitive pins: gitpython 3.1.43, tornado 6.5, pyjwt 2.8.0, urllib3 2.6.0, cryptography 42.0.7, soupsieve 2.5 and jupyter-core 5.7.2.

requirements.in only constrains rocm-docs-core, which is tracked as a git branch ref rather than a version, so the fix is a straight recompile rather than a hand-edit:

uv pip compile requirements.in --python-version 3.10 --upgrade --output-file requirements.txt

The --python-version 3.10 matches the tools.python setting in .readthedocs.yaml.

zizmor: 13 HIGH -> 0 HIGH

Three audits were failing against the two pre-existing workflows.

unpinned-uses (10 findings): every action is now pinned to the commit SHA that its current major tag resolves to, with the resolved version recorded in a trailing comment. The major versions are deliberately unchanged (actions/checkout stays on v4 rather than jumping to v7), so this is a pinning change with no behavioural difference; the upgrades are left to dependabot once the github-actions ecosystem is enabled by #360.

unpinned-images (2 findings): both container images are pinned by digest, with the floating tag retained for readability. For rocm/dev-ubuntu-22.04 the digest is also tagged 10.1.0-full, which is recorded in a comment so the ROCm version is not lost.

excessive-permissions (1 finding): id-token: write was set at workflow level in build-relocatable-packages.yml for the OIDC S3 upload, which also handed an OIDC-minting token to the release-summary job that only writes a step summary and uploads a markdown file. It now sits on the two build jobs that actually run aws-actions/configure-aws-credentials.

The 3 remaining MEDIUM artipacked findings (actions/checkout without persist-credentials: false) are left alone: they are below the gate's HIGH threshold and are a separate hardening change. The MEDIUM dependabot-cooldown finding is fixed by #360 itself.

Testing

Both scanners were run locally at the versions the security baseline pins, trivy 0.70.0 and zizmor 1.30.0, using the config files from #360.

trivy fs reports 0 vulnerabilities at every severity, down from 83, and the HIGH/CRITICAL gate exits 0.

zizmor reports 0 HIGH, down from 13.

The documentation was built twice in a Python 3.10 virtualenv, once with the old pin set and once with the new one. Both builds succeed, emit an identical set of 36 warnings, and produce the same 20 pages. The extracted article text of index.html, install/build_from_source.html and reference/presets.html is character-for-character identical between the two builds, including the 105 KB generated presets reference, despite sphinx moving from 7.3.7 to 8.1.3.

actionlint reports the same 5 pre-existing shellcheck style findings before and after the workflow changes, so no new workflow issues were introduced. All four action SHAs were confirmed against the GitHub API to be exactly the commit their version comment names, and both image digests return HTTP 200 from their registries.

mch added 2 commits October 14, 2026 19:10
docs/sphinx/requirements.txt had drifted far enough behind its
pip-compile inputs that trivy reported 83 vulnerabilities (47 HIGH,
2 CRITICAL) against it, all in transitive pins: gitpython 3.1.43,
tornado 6.5, pyjwt 2.8.0, urllib3 2.6.0, cryptography 42.0.7,
soupsieve 2.5 and jupyter-core 5.7.2.

requirements.in only constrains rocm-docs-core (tracked as a git
branch ref), so the fix is a straight recompile rather than a
hand-edit:

    uv pip compile requirements.in --python-version 3.10 --upgrade \
        --output-file requirements.txt

Verified with trivy 0.70.0 (the version the security baseline pins):
0 findings at every severity, down from 83.

Verified the docs still build and render identically: sphinx builds
with both the old and new pin sets produce the same 20 pages and the
same 36 warnings, and the extracted article text of index.html,
install/build_from_source.html and reference/presets.html is
character-for-character identical between the two builds.

Co-authored-by: Pi Agent
zizmor 1.30.0 (the version the ROCm security baseline pins) reports 13
findings at HIGH against the two existing workflows, which is enough to
fail the security-scan gate that #360 introduces:

  10x unpinned-uses        build-relocatable-packages.yml, codeql.yml
   2x unpinned-images      build-relocatable-packages.yml, codeql.yml
   1x excessive-permissions build-relocatable-packages.yml

unpinned-uses / unpinned-images: every action is pinned to the commit
SHA its current major tag resolves to, with the resolved version in a
trailing comment, and both container images are pinned by digest. The
major versions are deliberately unchanged (checkout stays on v4, not
v7), so behaviour is identical and the upgrades are left to dependabot
once the github-actions ecosystem is enabled.

excessive-permissions: id-token: write was set at workflow level for the
OIDC S3 upload, which also handed an OIDC-minting token to the
release-summary job that only writes a step summary and uploads a
markdown file. Moved to the two build jobs that run
aws-actions/configure-aws-credentials.

Verified: zizmor drops from 13 HIGH to 0 HIGH; actionlint reports the
same 5 pre-existing shellcheck style findings before and after; all four
action SHAs were confirmed to be the commit their version comment names,
and both image digests return HTTP 200 from their registries.

The 3 remaining MEDIUM artipacked findings (checkout without
persist-credentials: false) are left alone - they are below the gate's
HIGH threshold and are a separate change.

Co-authored-by: Pi Agent
@mch
mch requested review from a team as code owners October 14, 2026 19:34
@alex-breslow-amd
alex-breslow-amd self-requested a review October 14, 2026 20:29

@alex-breslow-amd alex-breslow-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mch
mch merged commit 56a04c7 into develop Oct 14, 2026
10 checks passed
@mch
mch deleted the users/mahughes/dep-updates branch October 14, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants