{"record":{"id":"cc24a642d04e6584","repo":"tinyhumansai/openhuman","slug":"refusing-to-run-git-in-its-repository-config-s","errorCode":null,"errorMessage":"refusing to run git in {}: its repository config sets `{key}`, which is not on the allowlist of configuration this tool will run under. Several git config keys name a command git then executes, and this directory is agent-writable, so unrecognised configuration is treated as untrusted rather than honoured.","messagePattern":"refusing to run git in (.+?): its repository config sets `(.+?)`, which is not on the allowlist of configuration this tool will run under\\. Several git config keys name a command git then executes, and this directory is agent-writable, so unrecognised configuration is treated as untrusted rather than honoured\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/workspace_state.rs","lineNumber":329,"sourceCode":"        let key = entry.split('\\n').next().unwrap_or(entry);\n        if !ALLOWED_REPO_CONFIG.contains(&normalise_config_key(key).as_str()) {\n            return Ok(Some(key.to_string()));\n        }\n    }\n    Ok(None)\n}\n\nasync fn run_git(dir: &std::path::Path, args: &[&str]) -> anyhow::Result<String> {\n    if let Some(key) = repo_config_is_inert(dir).await? {\n        // The refusal is otherwise only visible folded into the tool's own\n        // output, which is not greppable when an operator is asking why a\n        // workspace stopped reporting. Correlation fields: the directory and\n        // the key that caused it.\n        tracing::debug!(\n            \"[workspace_state] refusing to run git: dir={}, disallowed_config_key={key}\",\n            dir.display()\n        );\n        anyhow::bail!(\n            \"refusing to run git in {}: its repository config sets `{key}`, which is \\\n             not on the allowlist of configuration this tool will run under. \\\n             Several git config keys name a command git then executes, and this \\\n             directory is agent-writable, so unrecognised configuration is treated \\\n             as untrusted rather than honoured.\",\n            dir.display()\n        )\n    }\n\n    let output = hardened_git(dir).args(args).output().await?;\n\n    if output.status.success() {\n        Ok(String::from_utf8_lossy(&output.stdout).to_string())\n    } else {\n        anyhow::bail!(\n            \"git {} failed: {}\",\n            args.join(\" \"),\n            String::from_utf8_lossy(&output.stderr)","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/workspace_state.rs#L311-L347","documentation":"Error \"refusing to run git in {}: its repository config sets `{key}`, which is not on the allowlist of configuration this tool will run under. Several git config keys name a command git then executes, and this directory is agent-writable, so unrecognised configuration is treated as untrusted rather than honoured.\" thrown in tinyhumansai/openhuman.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/workspace_state.rs:329 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the repo config (git config --local --list) for the named key","Remove or correct the unrecognised key if it was added accidentally","Add genuinely needed safe keys to ALLOWED_REPO_CONFIG after security review","Avoid committing agent-controlled .git/config into the workspace"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}