Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

security: the project check command runs model-edited code without a command approval when the sandbox is off

Open
#292 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
desktop, security

Research direction

Start with src/main/chat_manager.ts at lines 451–453 and 509–513, then read src/main/agent/edit_check.ts at lines 49–55 to trace how automatic checks reach shell.run. Review how sandbox mode is determined and how the existing approval flow handles run_command. Done when checks that may run edited project code are skipped or require approval with the sandbox off, and the behavior is documented.

Written by the indexing model from the issue text.

Description

priority: low security severity: low

Found in the Oct 11 audit (at c5f5641). Related to #272.

Where: src/main/chat_manager.ts:451-453 and :509-513; src/main/agent/edit_check.ts:49-55.

Cause: after any batch of edits, checkCommand runs through shell.run with no approval card, because the user confirmed the command itself in settings. Typical check commands (npm test, npm run lint, eslint) run project code the model can write: tests, eslint.config.mjs, package.json scripts.

Impact: in Ask mode run_command needs approval, but one approved edit of a test or config file, or an edit auto-allowed by a rule such as edit_file src/*, runs model-written code right away. That is unsandboxed when sandbox mode is off.

Fix: skip the automatic check (or ask) when the sandbox is off, and document that the check runs code from edited files.

Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.