Conversation
2695f89 to
be69c85
Compare
d0bf057 to
9c9ccf1
Compare
22a80a7 to
647a41e
Compare
80da98a to
ea813f9
Compare
c708ed2 to
3b0f891
Compare
4b0a2b1 to
d9ab52c
Compare
|
OK. The verification script is now battle-tested on some 15 PRS of dependabot. It allows to literally review 100s of actions per hour with the current optimizations. |
Add a Python script that verifies compiled JavaScript in GitHub Actions matches a clean rebuild from source. The script clones the action at a given commit inside an isolated Docker container, rebuilds it, and diffs the original vs rebuilt dist/ output with formatted, colored terminal output.
|
Looking for reviews and merge :) |
|
We have 3 of them open since yesterday - one of them is not really mergable because it failed actions check - because it uses BTW. I will report the |
|
It would be helpful to include a workflow that runs the utility. Currently you have to install and run locally. |
dave2wave
left a comment
There was a problem hiding this comment.
Looks good to me, but some of the negative results need to be investigated.
There was a problem hiding this comment.
This unlocks checking that compiled javascript in 'dist' corresponds to the more auditable source code, which is a significant improvement.
I tested with utils/verify-action-build.py coursier/setup-action@fd1707a76b027efdfb66ca79318b4d29b72e5a02 (for #543 even though that was already merged) and that verified dist/index.js . I have not done a negative test.
I have some more thoughts but will put those into issues :)



Summary
utils/verify-action-build.py— a Python script that verifies compiled JavaScript in GitHub Actions matches a clean rebuild from source--check-dependabot-prsmode for batch-reviewing and merging open dependabot PRsSingle action verification
node:20-slimDocker containerdist/files, then deletes compiled JSjsbeautifierfor readable comparison@vercel/nccruntime helpers (e.g.sourcemap-register.js) when they are not referenced by other JS filesncc buildwithout--minify) and explains that rebuild differences are expected due to toolchain versionsdist/,node_modules/, lock files,__tests__/,__mocks__/,.github/) with user confirmationBatch dependabot PR review (
--check-dependabot-prs)org/repo@hashfrom the diffDependencies
docker(for isolated builds)uv(for running the script with inline dependencies)gh(GitHub CLI, for--check-dependabot-prsmode)Test plan
dorny/test-reporter—index.jsmatches rebuildsourcemap-register.jscorrectly skipped as unreferenced vendored helperdocker/build-push-action(yarn-based) rebuilds correctlydorny/paths-filter(non-minified JS) handled gracefullycrowdin/github-action(docker action) detected and skippeddawidd6/action-send-mail(no dist/, ships node_modules) falls back to source JSbiomejs/setup-biome(action.yaml instead of action.yml) detected correctlyopentofu/setup-opentofusource diff shows actual source changes, not compiled dist--check-dependabot-prslisting and filteringGenerated-by: Claude Opus 4.6 (1M context)