mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 13:58:38 +00:00
Tests: clean up temp git helper directory
This commit is contained in:
@@ -231,6 +231,7 @@ describe("git env exploit regression", () => {
|
||||
os.tmpdir(),
|
||||
`openclaw-git-exec-path-marker-${process.pid}-${Date.now()}`,
|
||||
);
|
||||
try {
|
||||
try {
|
||||
fs.unlinkSync(marker);
|
||||
} catch {
|
||||
@@ -266,6 +267,10 @@ describe("git env exploit regression", () => {
|
||||
});
|
||||
|
||||
expect(fs.existsSync(marker)).toBe(false);
|
||||
} finally {
|
||||
fs.rmSync(helperDir, { recursive: true, force: true });
|
||||
fs.rmSync(marker, { force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("blocks GIT_SSH_COMMAND override so git cannot execute helper payloads", async () => {
|
||||
|
||||
Reference in New Issue
Block a user