Repository navigation
fix(presets): read git config proxy values and mcp credential headers as credentials - #2371
Merged
Merged
Conversation
… as credentials A GIT_CONFIG_VALUE_<n> whose GIT_CONFIG_KEY_<n> names a git proxy (http.proxy, https.proxy, http.<url>.proxy, remote.<name>.proxy, core.gitProxy) is now read as a proxy, so a scheme-less user name or password in it is refused at save (finding 1276). MCP server headers on the Gateway and nodeHost apply the model provider credential header rule and must hold references (finding 1278).
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 22:50 — with
GitHub Actions
Error
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 22:50 — with
GitHub Actions
Error
…arameters
Review follow-up for finding 1276:
- keys pair across the maps OpenClaw merges (env, env.vars and every
skill's; the Docker sandbox defaults and each Agent's)
- a key that is a whole reference, or waits on a Preset variable at
either end, can name a proxy (wildcard-aware match)
- Preset names such as GIT_CONFIG_VALUE{{ vars.n }} pair with every index
- names are trimmed, as OpenClaw trims them
- GIT_CONFIG_PARAMETERS 'key'='value' and 'key=value' pairs are checked
- core.gitProxy is dropped: it names a command, not a URL
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 23:03 — with
GitHub Actions
Error
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 23:03 — with
GitHub Actions
Error
OpenClaw runs each Agent's sandbox with the defaults' environment and its own, so one Agent's proxy key no longer refuses another Agent's ordinary git config value (re-review over-refusal).
freeqaz
temporarily deployed
to
integration-qa-pr
October 13, 2026 23:13 — with
GitHub Actions
Inactive
freeqaz
temporarily deployed
to
integration-qa-pr
October 13, 2026 23:13 — with
GitHub Actions
Inactive
This branch was previously 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
Two credential gaps in Configuration and Preset saves (findings 1276 and 1278):
GIT_CONFIG_KEY_0=http.proxyandGIT_CONFIG_VALUE_0=u:pw@proxy.example:3128saved. The scheme-less proxy read was keyed on the variable name only (*_PROXY), but git readsGIT_CONFIG_VALUE_<n>as the value of the keyGIT_CONFIG_KEY_<n>names, and git and curl send a proxy's userinfo asProxy-Authorization.mcp.servers.*.headersandnodeHost.mcp.servers.*.headers, which OpenClaw marks sensitive, accepted a literalAuthorization: Bearer .... Model provider headers already refuse the same names.Change
validateModelCredentialReferencesreads aGIT_CONFIG_VALUE_<n>as a proxy (scheme-less, as http) whenGIT_CONFIG_KEY_<n>nameshttp.proxy,https.proxy,http.<url>.proxyorremote.<name>.proxy, in any case. Keys pair across the env maps OpenClaw merges into one environment:env,env.varsand every skill's (the Gateway's process), and the Docker sandbox defaults' with each Agent's (one Agent's keys do not pair with another's). Names are trimmed, as OpenClaw trims them.GIT_CONFIG_PARAMETERSis parsed into its'key'='value'(and older'key=value') pairs, and each value whose key names a proxy gets the same check.${VAR}reference, or that waits on a Preset variable, can name a proxy when the text around it allows one ({{ vars.k }},http.{{ vars.u }},{{ vars.s }}.proxy);user.{{ vars.k }}cannot. A Preset variable name whose index waits on a variable (GIT_CONFIG_VALUE_{{ vars.n }},GIT_CONFIG_VALUE{{ vars.n }}) pairs with every index.core.gitProxyis not matched: it names a command forgit://, not a URL (credentials in commands are finding 1277's class).isCredentialHeaderName, including Preset names around a variable): a credential header must hold${NAME}, orBearer ${NAME}for an Authorization header. Writes only; the stored-read path is unchanged. The refusal names the field, never the value.Verification
node --test tests/integration/configuration-controller.test.mjs tests/conformance/configuration-occ.test.mjs tests/conformance/kubernetes-configuration.test.mjs tests/conformance/filesystem-configuration.test.mjs: 147/147 pass.GIT_CONFIG_PARAMETERS, MCP header names and values, and the budget (the new key match and parser are linear); its bypasses and one over-refusal it found are covered by tests here; Preset-only leftovers are tracked as a low follow-up.user.emailwith an@value, a proxy without userinfo, a whole${GIT_PROXY}reference,url.<base>.insteadOf,http.proxyAuthMethod, acore.gitProxycommand withuser@host), ordinaryGIT_CONFIG_PARAMETERS, a proxy key in an unrelated process's map, and MCP headers holding references or naming no credential (including a number).tsc --build tsconfig.json, eslint and prettier clean on touched files.Risks
@at an index whose key is a whole${VAR}reference or Preset variable, or in a map merged with one whose key at that index is a proxy, is now refused; write it as a${NAME}reference.{{ vars.name }}) is still checked only once filled, as before.