Repository navigation
Preflight v2: follow one execution step into referenced scripts - #524
Merged
Merged
Conversation
A resolved local script reference is now read as data (never executed, never followed through a link), hashed with SHA-256, and checked against a small set of conservative observation patterns. The report carries status present_inspected with file size, content hash and observation names only; contents stay out of the report and on the machine. New script_inspect module: text patterns for download-pipe-to-shell, base64-decode-pipe, eval-of-substitution, credential key paths, persistence file writes and long encoded blobs, plus an AST check for Python module-level eval/subprocess/network calls. conftest.py and tests/conftest.py are inventoried as pytest_conftest (import_time) surfaces, since pytest imports them at collection time. Observations name a shape; they are not a malware verdict or severity. Detection-frozen files are untouched, so the ruleset fingerprint does not move. docs/scanner.md updated; tests cover suspicious and benign scripts, conftest module-level calls, and content exclusion from output. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
blitzcrieg1
added a commit
that referenced
this pull request
Nov 28, 2026
Rebuilt on master after #524 merged: the same #525 content (bounded GitHub preflight reads, symlink skips, partial-report preservation) rebased onto the squashed preflight v2 base. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
blitzcrieg1
added a commit
that referenced
this pull request
Nov 28, 2026
Rebuilt on master after #524 merged: the same #525 content (bounded GitHub preflight reads, symlink skips, partial-report preservation) rebased onto the squashed preflight v2 base. Generated by Mistral Vibe. Co-authored-by: Mistral Vibe <[email protected]>
blitzcrieg1
added a commit
that referenced
this pull request
Nov 28, 2026
Preflight v2 ships as one release: preflight follows referenced scripts (#524), a read-only GitHub preflight at a pinned commit (#525), and preflight correlation with recorded sessions (#526). The canonical event schema moves to 1.3.0 with the additive workspace_sha256 field. Version and changelog move together per the version provenance tests. Generated by Mistral Vibe. Co-authored-by: Mistral Vibe <[email protected]>
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.
Preflight v2, step 1: follow one execution step.
When a declaration (npm lifecycle script, folder-open task, session-start hook, MCP command) resolves to a local script, the script is now read as data, never executed, never followed through a link, hashed with SHA-256, and checked against a small set of conservative observation patterns. The report shows
present_inspectedwith file size, content hash prefix and observation names only. Contents stay out of the report and on the machine, so the local-first and EU data-residency story is unchanged.New
core/scanner/script_inspect.py:download_pipe_to_shell,base64_decode_pipe,eval_of_substitution,credential_key_path,persistence_file_write,long_encoded_blobmodule_level_eval_call,module_level_subprocess_call,module_level_network_callconftest.py/tests/conftest.pyare inventoried aspytest_conftest(import_time), since pytest imports them at collection timeObservations name a shape; they are not a malware verdict or severity, matching the existing preflight contract.
Safety properties:
Verification:
pytest tests/test_repository_preflight.py tests/test_scanner.py96 passed, 1 skipped (platform symlink skip);ruff checkclean; CLI smoke on a synthetic repo reportsdownload_pipe_to_shellandmodule_level_subprocess_callwith hash prefixes only, exit 0.Next steps after this: remote preflight (
scan --github OWNER/REPO@SHAvia Trees/Blobs API, read-only), then dashboard correlation of preflight findings (repo + SHA) with recorded sessions in that workspace.