Repository navigation
fix(server): Claude text generation no longer loads settings from the checkout - #8
Draft
devin-ai-integration[bot] wants to merge 1 commit into
Draft
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
… checkout Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Thread transfer impact
This comment will update automatically after the next completed run. |
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.
Problem
Review guides run
claude -pwith the pull request worktree as cwd. Claude then loads that checkout's.claude/settings.jsonandCLAUDE.md, which the pull request author controls. A fork PR can setapiKeyHelper(Claude runs it as a shell command) orenventries such asGIT_EXTERNAL_DIFF, and get code running on the reviewer's machine when they generate a guide.Change
runClaudeJsonnow passes--setting-sources user, so Claude reads only the user's own settings and skips project and local settings and the projectCLAUDE.md. The flag applies to every Claude text generation call. None of them should depend on the repo's Claude config.Scope and approval
Small security fix to one argument list. It does not change user-level Claude settings,
CLAUDE_CONFIG_DIRhandling, or the investigation tool allow list.Verification
Reproduced with Claude Code 2.1.312 against a local HTTP server standing in for the API (
ANTHROPIC_BASE_URL). The test project had a.claude/settings.jsonwithenv.ANTHROPIC_CUSTOM_HEADERS, anapiKeyHelperthat touches a marker file, and aCLAUDE.mdwith a marker string. I ran the exact argument list fromrunClaudeJson.--setting-sources userClaude ignored the project
permissions.allowentry in both runs because the workspace was untrusted.envandapiKeyHelperstill applied before the fix.The
ClaudeTextGeneration.test.tsargument assertion now includes--setting-sources user. It fails without the fix and passes with it.vp run check:changedpasses.Devin (Claude), Devin harness.
Link to Devin session: https://app.devin.ai/sessions/0e0964340bdc489a8a244be513977299
Open in Devin Desktop: https://app.devin.ai/desktop/session/0e0964340bdc489a8a244be513977299?variant=devin