* fix: resolve critical and high security vulnerabilities across packages
Bump vulnerable dependencies and remove unused `request` package to
address ~351 of ~394 npm audit vulnerabilities reported by GitHub.
* fix: handle nullable textContent from @mozilla/readability v0.6.0
readability.textContent can be undefined in v0.6.0, add nullish
coalescing to satisfy ArticleComponent.body type constraint.
Add explicit ToolPolicy type annotation to mostRestrictivePolicy variable
to fix TypeScript compilation error in CI. TypeScript was inferring a
narrower type that didn't include 'disabled', causing type mismatch errors.
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>
Fixes a security vulnerability where an attacker could bypass the terminal
command allow-list by using newline characters (\n, \r\n, \r) as command
separators.
The issue occurred because shell-quote treats literal newlines as whitespace,
causing multiple newline-separated commands to be evaluated as a single
command. This allowed dangerous commands to be hidden after safe commands.
Changes:
- Split input on line breaks before parsing with shell-quote
- Evaluate each line independently and return the most restrictive policy
- Added comprehensive tests for newline bypass scenarios
- Tests cover Unix (\n), Windows (\r\n), and old Mac (\r) line endings
Security Impact:
- Prevents bypass of allow-list using 'ls\nopen -a Calculator'
- Prevents bypass of allow-list using 'echo hello\nnpm install malicious'
- Critical commands (sudo, rm -rf /) are still properly blocked
- High-risk commands now correctly require permission
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>