fix(TLS 驗證): 移除 git 與 OpenRouter 的不安全憑證略過設定
This commit is contained in:
@@ -96,7 +96,7 @@ describe('commitAndPush', () => {
|
||||
|
||||
for (const { args, opts } of networkCalls) {
|
||||
assert.ok(opts?.env?.GIT_ASKPASS, `GIT_ASKPASS missing for git ${args[0]}`);
|
||||
assert.equal(opts.env.GIT_SSL_NO_VERIFY, 'true', `GIT_SSL_NO_VERIFY missing for git ${args[0]}`);
|
||||
assert.equal(opts.env.GIT_SSL_NO_VERIFY, undefined, `GIT_SSL_NO_VERIFY must not be forced for git ${args[0]}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -267,7 +267,7 @@ describe('cloneRepo', () => {
|
||||
assert.ok(networkCalls.length > 0, 'expected at least one network git call');
|
||||
for (const { args, opts } of networkCalls) {
|
||||
assert.ok(opts?.env?.GIT_ASKPASS, `GIT_ASKPASS missing for git ${args[0]}`);
|
||||
assert.equal(opts.env.GIT_SSL_NO_VERIFY, 'true', `GIT_SSL_NO_VERIFY missing for git ${args[0]}`);
|
||||
assert.equal(opts.env.GIT_SSL_NO_VERIFY, undefined, `GIT_SSL_NO_VERIFY must not be forced for git ${args[0]}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -310,7 +310,7 @@ describe('verifyRemoteAccess', () => {
|
||||
const lsRemote = calls.find(c => c.args[0] === 'ls-remote');
|
||||
assert.ok(lsRemote, 'expected git ls-remote to run');
|
||||
assert.ok(lsRemote.opts?.env?.GIT_ASKPASS, 'expected GIT_ASKPASS env for ls-remote');
|
||||
assert.equal(lsRemote.opts.env.GIT_SSL_NO_VERIFY, 'true');
|
||||
assert.equal(lsRemote.opts.env.GIT_SSL_NO_VERIFY, undefined);
|
||||
});
|
||||
|
||||
it('does not leak the token in ls-remote args', () => {
|
||||
|
||||
Reference in New Issue
Block a user