[AAASM-3878] 🔧 (ci): Harden aggregate.yml perms + verify downloads#48
Draft
Chisanan232 wants to merge 2 commits into
Draft
[AAASM-3878] 🔧 (ci): Harden aggregate.yml perms + verify downloads#48Chisanan232 wants to merge 2 commits into
Chisanan232 wants to merge 2 commits into
Conversation
The build job inherited the org-default token (over-broad). Scope the whole workflow to contents: read; the deploy job keeps its own pages/id-token scope at the job level. Refs AAASM-3878 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf
The pinned mdBook 0.5.2 and mdbook-mermaid 0.17.0 release tarballs were curl'd and run unverified. Pin their SHA-256 and sha256sum -c before extracting so a tampered/MITM'd asset fails the step closed. Refs AAASM-3878 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
Hardens
.github/workflows/aggregate.yml(docs-hub aggregation) against two MEDIUM-severity supply-chain/permission issues flagged in AAASM-3878:buildjob had nopermissions:block, so it inherited the over-broad org-defaultGITHUB_TOKEN. Added a top-levelpermissions: contents: read(all the build job needs — it clones public repos and builds). Thedeployjob retains its ownpages: write/id-token: writescope at the job level, overriding the default for that job alone.curl'd andsudo mv'd into/usr/local/binwith no integrity check. Now each tarball is verified withsha256sum -cagainst a pinned checksum before extraction, withset -euo pipefail, so a tampered/MITM'd asset fails the step closed. Upstream ships no.sha256sidecar assets, so the checksums were computed from the exact pinned tarballs and pinned with an explanatory comment.Type of Change
Related Issues
Closes AAASM-3878
Documentation Checklist
cd docs && mdbook buildpasses locally with no warningsdocs/src/SUMMARY.md🤖 Generated with Claude Code
https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf