fix(security): harden diagnostics storage boundary
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { InstallContext } from "../types/context";
|
||||
import { runMutating } from "../lib/process";
|
||||
import { ensureDiagnosticsStorageRoot } from "../lib/diagnosticsStorage";
|
||||
|
||||
async function userExists(user: string): Promise<boolean> {
|
||||
try {
|
||||
@@ -58,5 +59,6 @@ export async function prepareFilesystem(context: InstallContext): Promise<void>
|
||||
await ensureDir(context.config.installDir, "0755", "root:root");
|
||||
await ensureDir("/usr/local/lib/hy2xs", "0755", "root:root");
|
||||
await ensureDir("/etc/nftables.d", "0755", "root:root");
|
||||
await ensureDiagnosticsStorageRoot();
|
||||
await runMutating`chmod -R go-w ${context.config.installDir}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user