Commit graph

9 commits

Author SHA1 Message Date
Dallin Romney
c71acb8e4b
fix: resolve critical and high security vulnerabilities (#11848)
* 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.
2026-03-26 10:46:44 -07:00
dependabot[bot]
31ce150fa2
chore(deps-dev): bump picomatch from 4.0.3 to 4.0.4 in /packages/terminal-security (#11850)
chore(deps-dev): bump picomatch in /packages/terminal-security

Bumps [picomatch](https://github.com/micromatch/picomatch) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 16:23:11 -07:00
continue[bot]
96cbab156f style: run prettier on terminal security code
Fix code formatting to pass prettier checks in CI.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>
2025-10-30 00:56:55 +00:00
continue[bot]
3e66f6ebb1 fix(terminal-security): add explicit type annotation for TypeScript
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>
2025-10-30 00:51:52 +00:00
continue[bot]
bbb72d13b8 fix(terminal-security): prevent newline bypass in command validation
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>
2025-10-30 00:49:31 +00:00
dependabot[bot]
602a8e9f11
build(deps-dev): bump vite in /packages/terminal-security
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.4 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 01:41:52 +00:00
dependabot[bot]
9e0e5b5695
build(deps): bump esbuild and vitest in /packages/terminal-security
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.9 and updates ancestor dependency [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest). These dependencies need to be updated together.


Updates `esbuild` from 0.21.5 to 0.25.9
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.9)

Updates `vitest` from 1.6.1 to 3.2.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.4/packages/vitest)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.9
  dependency-type: indirect
- dependency-name: vitest
  dependency-version: 3.2.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 22:17:04 +00:00
Tomasz Stefaniak
45f3f5a6a6 fix: prettier 2025-09-03 12:48:57 -07:00
Tomasz Stefaniak
c00bbd78b1 improv: move terminal security to separate package 2025-09-03 12:47:08 -07:00