Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(files): refuse the key formats the outside-file guard missed
DeryFerdb94d19216161
diff --git a/server/outside-file-guard.test.ts b/server/outside-file-guard.test.tsindex 041215a3ea..29f4836b91 100644--- a/server/outside-file-guard.test.ts+++ b/server/outside-file-guard.test.ts@@ -28,6 +28,7 @@ describe("files a self-hosted owner may open from outside the workspace", () =>it.each(["id_rsa", "id_rsa.pub", "id_ed25519", "id_ecdsa_work", "server.pem", "tls.KEY", "cert.p12", "cert.pfx", "vault.kdbx","credentials", "credentials.json", "production.env",+ "deploy.ppk", "backup.kdb", "server.jks", "app.keystore", "AuthKey_7A2B3C4D5E.p8", "private.asc", "secring.gpg",])("refuses a name that looks like a key or credential: %s", (name) => {expect(outsideFileRefused(`/home/ada/Downloads/${name}`, linux)).toBe(true);});diff --git a/server/outside-file-guard.ts b/server/outside-file-guard.tsindex ca2dc906e7..f5b94e0fa7 100644--- a/server/outside-file-guard.ts+++ b/server/outside-file-guard.ts@@ -18,7 +18,7 @@ function resolvedHome(): string {const here = (): OutsideFilePlace => ({ home: resolvedHome(), platform: process.platform, env: process.env });/** Names that hold keys or credentials wherever they sit. */-const SECRET_NAME = /^(?:id_(?:rsa|ed25519|ecdsa|dsa)|credentials)|\.(?:pem|key|p12|pfx|kdbx|env)$/i;+const SECRET_NAME = /^(?:id_(?:rsa|ed25519|ecdsa|dsa)|credentials)|\.(?:pem|key|p12|pfx|p8|kdbx|kdb|ppk|jks|keystore|asc|gpg|env)$/i;/** Browser profile folders under macOS's Application Support; each holds cookies, saved passwords and session tokens. */const MAC_BROWSERS = [