Skip to content

Commit 743a581

Browse files
committed
Use real include file permissions in audit test
1 parent d94d242 commit 743a581

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/security/audit-config-include-perms.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ describe("security audit config include permissions", () => {
1313
fs.mkdirSync(stateDir, { recursive: true, mode: 0o700 });
1414

1515
const includePath = path.join(stateDir, "extra.json5");
16-
fs.writeFileSync(includePath, "{ logging: { redactSensitive: 'off' } }\n", "utf-8");
16+
fs.writeFileSync(includePath, "{ logging: { redactSensitive: 'off' } }\n", {
17+
encoding: "utf-8",
18+
mode: 0o644,
19+
});
1720
fs.chmodSync(includePath, 0o644);
1821

1922
const configSnapshot: ConfigFileSnapshot = {

0 commit comments

Comments
 (0)