mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-22 06:32:00 +00:00
Media: secure image temp dirs (#58270)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { findMessagingTmpdirCallLines } from "../../scripts/check-no-random-messaging-tmp.mjs";
|
||||
import {
|
||||
findMessagingTmpdirCallLines,
|
||||
messagingTmpdirGuardSourceRoots,
|
||||
} from "../../scripts/check-no-random-messaging-tmp.mjs";
|
||||
|
||||
describe("check-no-random-messaging-tmp", () => {
|
||||
it("finds os.tmpdir calls imported from node:os", () => {
|
||||
@@ -41,4 +44,8 @@ describe("check-no-random-messaging-tmp", () => {
|
||||
`;
|
||||
expect(findMessagingTmpdirCallLines(source)).toEqual([]);
|
||||
});
|
||||
|
||||
it("guards src/media against host tmpdir usage", () => {
|
||||
expect(messagingTmpdirGuardSourceRoots).toContain("src/media");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user