chore: sync core lib and CLAUDE.md from agent-core#14
Closed
avifenesh wants to merge 1 commit into
Closed
Conversation
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.
Automated sync of lib/ and CLAUDE.md from agent-core.
Note
Medium Risk
Touches the runtime binary download/install path, adding checksum verification and new extraction logic (including a custom PowerShell zip extractor), which could cause install failures or platform-specific regressions if release assets or archive layouts differ.
Overview
Hardens the
agent-analyzerruntime installer against supply-chain and archive-extraction attacks. Downloads now require a matching.sha256sidecar (with an explicit local-dev-onlyskipChecksumescape hatch) and abort on mismatch before any extraction.Extraction is reworked to use an isolated scratch directory with pre-validation of archive entry paths (rejecting absolute/UNC/drive-letter paths and
..traversal), post-extraction checks for symlinks/escape, and only the expected binary is copied into~/.agent-sh/binwhile all other extracted content is discarded. On Windows, zip handling switches fromExpand-Archivecommand strings to a-FilePowerShell helper script that validates entries and avoids quoting/space issues.Adds a comprehensive
node:testsuite for checksum parsing/verification, path validation, scratch cleanup, and basic tar/zip extraction behavior, and exports several helper functions for testing/advanced use.Reviewed by Cursor Bugbot for commit 647deaf. Configure here.