ci: pin workflow action refs to commit SHA and tighten permissions#839
Open
kitsuyui wants to merge 1 commit into
Open
ci: pin workflow action refs to commit SHA and tighten permissions#839kitsuyui wants to merge 1 commit into
kitsuyui wants to merge 1 commit into
Conversation
🎉 Happy commit!
|
Code Metrics Report
Details | | main (5e1e87b) | #839 (21d52c4) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 99.2% | 99.2% | 0.0% |
| Files | 5 | 5 | 0 |
| Lines | 131 | 131 | 0 |
| Covered | 130 | 130 | 0 |
| Code to Test Ratio | 1:0.5 | 1:0.5 | 0.0 |
| Code | 1630 | 1630 | 0 |
| Test | 912 | 912 | 0 |
+ | Test Execution Time | 2s | 1s | -1s |Reported by octocov |
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.
Summary
test.ymlandmain.ymlto commit SHApermissions.contentsfromwritetoreadintest.ymltest.ymlreferencedactions/checkout@v6,oven-sh/setup-bun@v2,actions/setup-node@v6, andkitsuyui/gh-build-size@v0.1.2using only version tags.main.ymlreferencedactions/checkout@v6similarly. Tags can be force-pushed by the repository owner at any time, creating a supply-chain risk.octocov.ymlalready pinned all its actions to SHA in previous PRs (#823, #824); this change applies the same pattern to the remaining workflows.The
contents: writepermission intest.ymlwas excess — the workflow only reads source, runs lint/test/build, and measures build size; none of these require write access to repo contents.Validation
bun run lint(biome check) — no issuesbun run test— 47/47 tests passmadge --circular --extensions ts src/— no circular dependenciesNotes
SHAs match those already used in
octocov.yml:actions/checkout→de0fac2e4500dabe0009e67214ff5f5447ce83dd(v6)oven-sh/setup-bun→0c5077e51419868618aeaa5fe8019c62421857d6(v2)actions/setup-node→48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e(v6)kitsuyui/gh-build-size→97ad8d5f4fff8ba676a5c614822adacab32780e3(v0.1.2)