Repository navigation
feat: follow wrapped Executor calls, open staged scripts, list runtime source builds - #8
Merged
Merged
Conversation
…e source builds - Command helpers are followed when the Executor sink sits in a callback inside them (e.g. `new Promise(r => Executor.start(cmd, ...))`), so each call site is graded by its own command. - `btoa(...)` and local base64 helpers that end in `btoa` are folded. Base64 piped through `base64 -d` in a command is decoded and checked (`shell.encoded_script`). - New `shell.staged_script` (High): a file written with content the scanner can't read and then run with `sh <file>`. The file's script-shaped constants are checked as the likely content. - New `shell.builds_remote_source`: `git clone` plus a build step, `pip install git+...` and `npm install github:...`, naming each repo (expanding `for R in ...` loops). Medium when unpinned, Low when pinned to a tag or commit. - Bump rules version to 2026.11.4.
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.
Fixed
function exec(cmd) { return new Promise(r => Executor.start(cmd, ...)) }. Before this, every command passed to such a helper was lost, includingcurl ... | sh, and only a generic "built at runtime" finding was reported.btoa(...)of a known string, and local base64 helpers that returnbtoa(...), now fold to their value.Added
shell.encoded_script(Medium): base64 piped throughbase64 -dinside a command (printf %s <b64> | base64 -d > file,echo <b64> | base64 -d | sh) is decoded, and the decoded script gets the same checks as any command.shell.staged_script(High): a file written with content the scanner can't read, then run withsh <file>from Executor or a terminal tab. The file's multi-line, script-shaped constants are checked as the likely content.shell.builds_remote_source:git clonefollowed by a build step (make,cmake,npm install,cargo build, …),pip install git+…, andnpm install github:….for R in a b c; do git clone …/$Rfallback lists.--branch <tag>,git checkout <sha>,pkg@<ref>).Other
RULES_VERSIONis bumped to2026.11.4.Tests
cargo test: 88 pass. New tests cover:btoaand base64-helper foldingcargo clippy --all-targetsis clean.staged_scriptandbuilds_remote_sourcefindings, and its helper call sites are graded individually.