Repository navigation
fix(security): frame untrusted external tool outputs and PR comments (CLO-1113) - #221
Open
nullStack65 wants to merge 1 commit into
Open
nullStack65 wants to merge 1 commit into
nullStack65 wants to merge 1 commit into
Conversation
…(CLO-1113) Implements the PR-eligible t3code scope of CLO-1113 (audit finding A-P1-10): - Add apps/server/src/security/untrustedContent.ts with unpredictable per-call <untrusted-<source>-<id>> framing, closing-tag & provider mention neutralization, external-source classification (mail/Gmail, Twenty CRM, web fetch/preview, PR/issue comments), and trigger-based defaultRuntimeModeForThreadTrigger (keeping founder threads full-access and narrowing webhook/mail/external triggers to approval-required). - Frame PR descriptions and review comments in apps/server/src/pullRequest/pullRequestReviewGuideInput.ts. - Frame external-source MCP appContext values in apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts. - Add unit tests in apps/server/src/security/untrustedContent.test.ts. Model: gemini-4-neon Task: CLO-1113 Agent: implementation-subagent Harness: t3/antigravity Model-family: gemini Model-generation: 4 Skills-SHA: 648bce52b3575d550528afb0c5cc178f75199a55
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been 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.
Summary
Implements the PR-eligible
t3codescope of CLO-1113 (audit finding A-P1-10: reduce blast radius) targetingrelease/native-0.1.10:apps/server/src/security/untrustedContent.ts):isUntrustedExternalSource.<untrusted-<source>-<id>>tags, neutralizes spoofed closing tags and provider mentions, and appends an explicit data-not-instructions notice.defaultRuntimeModeForThreadTrigger(keeping founder-started threadsfull-access, narrowingwebhook/mail/external_eventtoapproval-required).apps/server/src/pullRequest/pullRequestReviewGuideInput.ts): wraps PR description and settled review comments in untrusted-content frames before passing to review guide generation.apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts): wraps external-source MCP appContext entries inside the untrusted fence before sending to provider input.Verification
pnpm --filter t3 exec vp test run src/security/untrustedContent.test.ts src/pullRequest/PullRequestReviewGuideService.test.ts— 2/2 files, 12/12 tests passed.pnpm --filter t3 run typecheck— passed cleanly.machines/tailscale/policy.hujson) and undeclared laptopauth_sessionsrevocation.