Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4285 +/- ##
=======================================
Coverage 32.70% 32.71%
=======================================
Files 673 673
Lines 41698 41701 +3
=======================================
+ Hits 13638 13641 +3
Misses 28060 28060 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roman-khimov
left a comment
There was a problem hiding this comment.
@evgeniiz321, please check and improve other repos if it works this way.
run-tests.yml granted the job-wide write-all token and forwarded every repository secret (secrets: inherit) to a reusable workflow it calls in a different repository (nspcc-dev/neofs-testcases's system-tests.yml). Checking that workflow's own definition: it declares exactly two secrets (TEST_RESULTS_WALLET, TEST_RESULTS_PASSWORD) and its only use of GITHUB_TOKEN is guibranco/github-status-action-v2 posting a commit status, which needs only the statuses: write permission. Everything else write-all grants, and every other repository secret secrets: inherit forwards, is unused by the callee. Narrow both to exactly what's needed: permissions: statuses: write, and an explicit secrets: block naming just the two secrets the callee declares. GitHub Actions treats any unlisted permission as none once permissions is a map rather than write-all/read-all, so this is a straightforward reduction with no other behavioral change - the workflow's own steps don't do anything besides invoking the reusable workflow, so they need nothing beyond what it needs. Left the @master refs (here and in go.yml/dco.yml) as a separate, broader question: pinning reusable-workflow references to a specific commit is good supply-chain hygiene in general, but introduces an ongoing maintenance cost (bumping the pin on every upstream workflow change) that's a policy call for the maintainers, not a scoped bug fix - and go.yml/dco.yml don't carry the write-all + secrets:inherit combination this fix addresses, so they're materially lower risk as-is. Verified with actionlint (clean across all workflow files) since there's no local way to execute a reusable-workflow call; the real validation is this PR's own CI run, which exercises run_system_tests exactly as configured here. Signed-off-by: Fabian Wahle <fabian@nash.io>
A permissions block sets every unlisted scope to none, and neofs-testcases/system-tests.yml checks out five repositories. Verified against that workflow: it declares exactly two secrets (both required) and sets no permissions of its own, and its only token use is two commit-status posts. Signed-off-by: Fabian Wahle <fabian@nash.io> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
f0b2d91 to
ebb3f15
Compare
Signed-off-by: Fabian Wahle <fabian@nash.io> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note on the red
With
That is what the other PRs in this stack show. On this branch the call evaluates, the job starts and gets as far as the tests themselves ( CHANGELOG entry added in 373faeb. |
|
Second red here, Reproduced on unmodified Cause: Happy to send the |
Summary
run-tests.ymlgranted the job-widewrite-alltoken and forwarded every repository secret (secrets: inherit) to a reusable workflow it calls in a different repository (nspcc-dev/neofs-testcases'ssystem-tests.yml).I checked that workflow's own definition: it declares exactly two secrets (
TEST_RESULTS_WALLET,TEST_RESULTS_PASSWORD) and its only use ofGITHUB_TOKENisguibranco/github-status-action-v2posting a commit status, which needs only thestatuses: writepermission. Everything elsewrite-allgrants, and every other repository secretsecrets: inheritforwards, is unused by the callee.Fix
Narrow both to exactly what's needed:
permissions: statuses: write, and an explicitsecrets:block naming just the two secrets the callee declares. GitHub Actions treats any unlisted permission asnoneoncepermissionsis a map rather thanwrite-all/read-all, so this is a straightforward reduction with no other behavioral change - this workflow's own steps don't do anything besides invoking the reusable workflow, so they need nothing beyond what it needs.Left the
@masterrefs (here and ingo.yml/dco.yml) as a separate, broader question: pinning reusable-workflow references to a specific commit is good supply-chain hygiene in general, but introduces an ongoing maintenance cost (bumping the pin on every upstream workflow change) that's a policy call for the maintainers, not a scoped bug fix - andgo.yml/dco.ymldon't carry thewrite-all+secrets:inheritcombination this fix addresses, so they're materially lower risk as-is.Test plan
actionlint(clean across all workflow files in the repo).mastertip, and lints clean there too.run_system_tests/run_all_testsexactly as configured here.🤖 Generated with Claude Code