mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
refactor(tmp): harden temp boundary guardrails
This commit is contained in:
@@ -18,6 +18,14 @@ describe("check-no-random-messaging-tmp", () => {
|
||||
expect(findMessagingTmpdirCallLines(source)).toEqual([3]);
|
||||
});
|
||||
|
||||
it("finds tmpdir calls imported from os", () => {
|
||||
const source = `
|
||||
import os from "os";
|
||||
const dir = os.tmpdir();
|
||||
`;
|
||||
expect(findMessagingTmpdirCallLines(source)).toEqual([3]);
|
||||
});
|
||||
|
||||
it("ignores mentions in comments and strings", () => {
|
||||
const source = `
|
||||
// os.tmpdir()
|
||||
|
||||
Reference in New Issue
Block a user