fix: patch command injection, OAuth CSRF, and path deny-list bypass#23
Open
olleepalmer wants to merge 2 commits intosuitedaces:mainfrom
Open
fix: patch command injection, OAuth CSRF, and path deny-list bypass#23olleepalmer wants to merge 2 commits intosuitedaces:mainfrom
olleepalmer wants to merge 2 commits intosuitedaces:mainfrom
Conversation
- Replace execSync shell interpolation with execFileSync in macNotify() and checkBinaryExists() to prevent OS command injection (CWE-78) - Reject OAuth state mismatch instead of ignoring it to prevent CSRF - Merge ALWAYS_DENIED with user deniedPaths instead of replacing, so ~/.ssh, ~/.aws, ~/.gnupg are always protected Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@olleepalmer is attempting to deploy a commit to the DevApe Team on Vercel. A member of the Team first needs to authorize it. |
- Replace naive startsWith() path matching with segment-aware boundary checks so /safe no longer matches /safe_evil (CWE-22) - Resolve parent directory via realpathSync for non-existent targets to prevent symlink-parent bypasses on file creation (CWE-367) - Enforce sender allowlist on Telegram callback queries (approve/deny buttons, question responses) to prevent unauthorized users from approving tool executions (CWE-284) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Security fixes for 4 vulnerabilities identified during a code audit:
macNotify()(src/gateway/server.ts) —execSyncwith string interpolation allows arbitrary command execution via crafted notification title/body. Replaced withexecFileSyncusing argument arrays to avoid shell interpretation.checkBinaryExists()(src/skills/loader.ts) —execSync(which ${bin})passes skill YAML metadata directly into shell. A malicious community skill could execute arbitrary commands at load time. Replaced withexecFileSync('which', [bin]).src/providers/claude.ts) — PKCE state param mismatch was logged as a warning but token exchange proceeded anyway, defeating CSRF protection. Now rejects the exchange with an error.ALWAYS_DENIEDpaths overridable (src/config.ts) — CustomdeniedPathsin gateway config replaced the built-in deny list (~/.ssh,~/.aws,~/.gnupg, etc.) instead of merging with it. Now always merges so sensitive dirs stay protected.Test plan
macNotifywith normal strings)deniedPathsconfig still blocks specified paths~/.ssh,~/.aws,~/.gnupgare denied even with customdeniedPaths🤖 Generated with Claude Code