Repository navigation
feat(guardian): Review every bash command - #3602
Merged
Merged
Conversation
Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
13 screenshot changes — 13 changed · 0 added · 0 removed Review screenshots in Frameshift Show 7 more changed screenshots |
dcramer
approved these changes
Nov 17, 2026
dcramer
left a comment
Member
There was a problem hiding this comment.
this could be annoying but we wont know ujnless we try
24 tasks done
This was referenced Nov 18, 2026
MathurAditya724
added a commit
that referenced
this pull request
Nov 18, 2026
…credential (#3694) Since #3602, Guardian reviews every bash command. It doesn't know that a plugin's token env var in the Sandbox is only a placeholder, or that the real token goes only to that plugin's own domains. So it treats a normal call to the plugin's API as leaking a secret and denies it. This is what breaks the generic OAuth evals on every PR. Now each plugin that has a credential adds a destination fact to the Guardian prompt. The fact names the env var and the domains that get the real token. The block rules stay the same. **Before:** a bash call that sends `$EVAL_OAUTH_ACCESS_TOKEN` to `example.com` is denied: "sends a bearer access token to the external example.com endpoint, whose trustworthiness … is not established." **After:** Guardian is told "`$EVAL_OAUTH_ACCESS_TOKEN` in the Sandbox holds a placeholder. The runtime adds the real credential only to Sandbox requests to `example.com`, the plugin's own service…", so the call goes through and the turn pauses for OAuth as it should. <!-- junior-request-attribution:start --> via @MathurAditya724. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A9471989e774fb87a4d826a7e13c15d0d --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A9471989e774fb87a4d826a7e13c15d0d) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A9471989e774fb87a4d826a7e13c15d0d/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Aditya Mathur <[email protected]>
dcramer
pushed a commit
that referenced
this pull request
Nov 18, 2026
…aps (#3697) Daily design docs audit for the commits on `main` from 2026-11-17 17:00 UTC to 2026-11-18 17:00 UTC. All six files were in scope. `automations.md` needs no change. **New gap** - `review-desk.md`: the "Needs you" group in the classic Inbox shows every open action in the viewer's list, including actions for Everyone and actions with no assignees (`packages/junior-dashboard/src/client/review-desk/reviewItemFormat.ts:277`, used in `ReviewDeskPage.tsx:82,187`). The waiting rule behind the Inbox count and the new Inbox's To do leaves those out (`reviewItemFormat.ts:205-212`, `packages/junior/src/chat/review-items/access.ts:81-87`). This breaks "'Needs you' means one thing on every surface". It predates this window. **Closed gaps, deleted** - `guardian.md`, plugins cannot declare destination facts: closed by #3596. The `review-context` manifest field reaches the Guardian prompt (`packages/junior/src/chat/plugins/manifest.ts:298`, `packages/junior/src/chat/agent/tools.ts:538`). - `guardian.md`, Sandbox commands are not reviewed: closed by #3602. `bash` is now `auto` and destructive, so Guardian reviews every call (`packages/junior/src/chat/tools/sandbox/bash.ts:6-14`). **Contract cuts** - `guardian.md`: prompt placement, sort order, and caching of destination facts; the repeat of `data_exposure`. - `child-agents.md`: the Agent invocation implementation, the rollout flag (which is not on `main`), and the `archiveAgent` tool details in Gaps. #3435 stays as a tracking link. - `sandbox-credentials.md`: the env var line (repeats the Intent and `sandbox-credentials#env-placeholder`) and the per-plugin Git/Sentry examples. - `github.md`: "still". Intent changes in the window were made on purpose and already edited the docs in the same PR: #3641 (child agent depth default), #3685 (re-request review), and #3556 (browser rule, Sandbox credential gaps closed). Nothing to rewrite. <!-- junior-request-attribution:start --> via [automation `sched_5076e4cb686a5e474279137daf734019`](https://junior-prod.sentry.dev/automations/sched_5076e4cb686a5e474279137daf734019) · Run ID `sched_5076e4cb686a5e474279137daf734019:1795021200000`. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
This branch was successfully deployed
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.
Core
bashhad noapprovalMode, so Guardian never reviewed Sandbox commands. This optsbashin withapprovalMode: "auto". Bash is annotated destructive, soautoreviews every call, the same asreviewwould today.autoalso leaves room for a later fast path:resolveApprovalMetadatacan mark a known-safe command read-only, and the gate needs no change.Routine Sandbox work, such as reads, builds, edits, and work-branch git steps, must stay allowed, including in Automations, where a false
askfails the run. Guardian's policy is unchanged. Its existing rule that sandbox-local work never needs confirmation is enough.Cost: one Guardian model call for each bash command, adding a few seconds of latency to each one. A later optimization can add a cheap first stage or a safe-command fast path. Code Mode's 10-call batch limit already counted bash calls, so it doesn't change.
The unreviewed Sandbox commands gap recorded in #3599 closes when this merges.
via @dcramer.
--
View Session [Sentry]