Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(schema): sanitize Git discovery env [A5,A6]

Corey Olson03705062705d
diff --git a/src/git.js b/src/git.js
index 7f2ff2c8..b6c7dbd6 100644
--- a/src/git.js
+++ b/src/git.js
@@ -21,9 +21,11 @@ const CODE_ROOT = dirname(dirname(fileURLToPath(import.meta.url)));
*/
export function gitChildEnv(root) {
const env = { ...process.env };
+ const discoveryEnv = { ...env };
+ for (const name of ['GIT_DIR', 'GIT_WORK_TREE', 'GIT_COMMON_DIR']) delete discoveryEnv[name];
const result = spawnSync('git', ['rev-parse', '--local-env-vars'], {
cwd: root,
- env: { PATH: process.env.PATH },
+ env: discoveryEnv,
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
});