Repository navigation
SOW 2 week 2: fixes for 0.8.0-beta.2 (supported events, blanked start-up variables, wrapped lines, report references) - #38
Merged
Conversation
… how a step starts The action refused pull_request_target because it hands a pull request's code the base repository's token. issue_comment, workflow_run and other events can do the same when a workflow checks out the pull request, and the service Wasit starts would then be that code, in a job whose later steps hold the token. The step that checks the inputs now allows pull_request, push, schedule, workflow_dispatch and merge_group, and stops any other event with exit 2. Every step also sets BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH and LD_AUDIT empty, as it already did NODE_OPTIONS: a file the shell runs before a step, or a library loaded into bash, node or gh, no longer reaches the steps that hold the token or the payer key from the workflow's env. The comments and the example workflow say what this does not cover: code that ran earlier in the job as the runner's user, which can change PATH or files or leave a process running, and which is kept from neither the key nor the token. The YAML test now also pins that "Finish the check run" runs only when a check run was started and uses only what the report step wrote.
…ow command The sanitiser breaks "::" and "##[" at the start of a text, but the coloured output of wasit test wraps text after that, so a word in the middle of a fix could start a line that a GitHub job log reads as a workflow command (colour is on in CI with FORCE_COLOR). wrap() now breaks every wrapped line the same way. The live wasit test moves from index.ts to its own module, test-live.ts, with the stream, the environment and the checks passed in, so a test can hold it to what the plain output promises: only Wasit's own colour codes, no secret of the environment, no line that starts with a command, the same exit code. The comment before the RPC check in wasit run no longer says the payment is built through that RPC on Stellar: there the x402 client builds it through its own default RPC for the network.
wasit run writes a reference only on an X402-06 PASS whose settlement was read back from the chain, and the payment proof links one only there. A report file read back could still carry one on another status; it is now dropped when the file is read, so the renderer's own PASS rule is not the only one. A test holds both, for FAIL, ERROR and SKIP. X402-11 gains a test at the exact limit of the authorization it sends: valid for 300 s plus 2 ledgers it is sent, one ledger more and it is discarded unsent. The comment before the RPC check in the payment checks no longer says the payment is built through that RPC on Stellar.
What changes on upgrade: the events the action runs on and the variables every step sets empty. Fixed: the wrapped lines of the coloured output, and the settlement reference in a report file.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…n on a runner The comment said that a step's env winning over an earlier step's GITHUB_ENV for BASH_ENV and the other names was not yet seen on a runner. It was seen on a GitHub-hosted runner on 2026-11-21: an earlier step set BASH_ENV through GITHUB_ENV, a plain step after it ran the file, and each step of this action showed BASH_ENV empty and did not run it.
This branch was successfully deployed
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.
Fixes for the next pre-release,
0.8.0-beta.2, on top of0.8.0-beta.1(38d8a86). Stacked on #30; it moves tomainonce #23 and #30 are merged.The Action
pull_request,push,schedule,workflow_dispatchandmerge_grouponly. Any other event (pull_request_targetas before, now alsoissue_comment,workflow_runand the rest) stops the job with exit 2 in the step that checks the inputs: on those events a workflow can hand a pull request's code the base repository's token, and the service Wasit starts would be that code.BASH_ENV,ENV,LD_PRELOAD,LD_LIBRARY_PATHandLD_AUDITempty, as it already didNODE_OPTIONS. The comments and the example workflow say what this does not cover: code that ran earlier in the job as the runner's user is kept from neither the payer key nor the job's token.The CLI
wasit test, no wrapped line starts with::name::or##[name].wasit testis its own module (test-live.ts), with the stream, the environment and the checks passed in, and a test holds it to: only Wasit's own colour codes, no secret of the environment, no line that starts with a workflow command, the same exit code.Core
wasit runwrites it.Tests (local, 2026-11-21): build and type-check clean; cli 275, core 830, server 30, action 195, none failing. CHANGELOG:
[Unreleased].