Conversation
Addresses injection (argv arrays instead of shell strings), webview XSS (quote escaping, no inline handlers, tightened CSP), cross-window message validation, path traversal in @mentions, fail-open CI tooling, hardcoded machine paths/versions, mock drift, and duplicate definitions. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Comment on lines
+240
to
+247
| const result = piBinaryInternals.spawnSync( | ||
| "/bin/sh", | ||
| ["-c", 'command -v "$1"', "sh", binary], | ||
| { | ||
| shell: false, | ||
| timeout: 1000, | ||
| }, | ||
| ); |
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.
Summary
Full verification-and-fix pass across the top issues, module hotspots, and quick wins:
Security
execSyncstring interpolation replaced with argv-arrayexecFileSync/node:fsinpostinstall-patch.mjs,native-addons.ts, and the download/clean-up scripts; Windowsshell: trueseam inshell.tshardened.escapeHtmlnow escapes quotes, inlineonclickattributes removed, CSP tightened (nounsafe-inline, explicitconnect-src), remote Google Fonts@importremoved.event.datavia a shared guard (webview/messages.ts) before trusting payloads;message-serializerparses defensively.@mentionresolution constrained to the workspace root;MOCHA_TEST_FILEandloader.cjssub-path imports refuse root escape.Reliability / correctness
verify.mjs,fallow-audit.mjs,run-node-tests.mjs,runTest.ts, test scaffold); watchdog/no-result paths exit non-zero.pi-binary.tsbare-name resolution works again (was spawning a shell builtin withshell: false).loader.cjs: package-name typo fixed, doc URLs extracted, timeouts onwhich/where, no duplicate process-wideModule._resolveFilenamehook, bare imports resolved via the packageexportsmap.Quality
disposeCallstracking, no double listener fire, no dup handler registration).PiAgentConfig/ThinkingLevel/SessionNodeand the per-componentsendMessageclones; consolidated ABI-scan logic.prefers-reduced-motionguards, timer/cache/log caps.pnpm-workspace.yamlkeys removed, tsconfig redundancy trimmed,.vscodeignoreno longer ships nested env/secret files.Verification
pnpm run verify: all 6 stages green (check, lint, format, 661 unit tests, webview tests, fallow audit — 0 introduced findings).Changelog
Updated
CHANGELOG.mdunder[Unreleased]with a line per fix.🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com