ci: test the event source before publish - #821
Open
ryanduguid wants to merge 3 commits into
Open
Conversation
ryanduguid
marked this pull request as ready for review
August 14, 2026 10:28
The workflow_dispatch input orr_id was interpolated raw into a single-quoted bash string in the notify-codegen-repo job. A dispatch value containing a single quote closed the argument and ran injected commands in the same shell, which is the one job holding the xero-codegen-bot installation token and which runs under if: always() with no environment gate. The payload values now travel as env vars and the JSON is assembled by jq from quoted shell variables, so nothing reaches the shell as code. The installation token moves to env for the same reason. Verified with stubbed curl/jq: the old block executed an injected command and echoed the token, the new block hands the same input to jq as a single inert argument.
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.
What changed
npm installnpm ci${{ github.sha }}for every publish-workflow jobnpm ciWhy
The repository ran two overlapping push workflows, the older one used mutable dependency resolution, and the release workflow could publish after a build without running tests. The contribution guide also instructed Node contributors to run Maven.
Validation
actionlinton both retained workflowsnpm ciandnpm audit: 0 vulnerabilitiesnpm cinpm run buildnpm test -- --runInBand— 16 tests passedgit diff --check