mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
fix(security): ignore materialized Paperclip runtime directory
Adds .paperclip-runtime/ to the root .gitignore alongside the existing .paperclip/ and .paperclip-local/ entries, and adds a Vitest regression test that asserts git check-ignore covers adapter credential paths. Without this entry, adapters that materialize runtime state into <workspace>/.paperclip-runtime/<adapterKey>/... expose those files as committable untracked entries inside the git working tree. A git add -A while an auth.json is materialized would stage plaintext credentials. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
c90e66bdd6
commit
191c61d23b
2 files changed
+20
No files matched your search
@@ -45,6 +45,7 @@ diagnostics/
|
||||
.vscode/
|
||||
.claude/settings.local.json
|
||||
.paperclip-local/
|
||||
.paperclip-runtime/
|
||||
/.idea/
|
||||
/.agents/
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const repoRoot = fileURLToPath(new URL("../../..", import.meta.url));
|
||||
|
||||
describe("repository gitignore", () => {
|
||||
it("ignores materialized Paperclip runtime credentials", () => {
|
||||
const sensitiveRuntimePath = ".paperclip-runtime/codex/home/auth.json";
|
||||
const result = spawnSync("git", ["check-ignore", "-v", sensitiveRuntimePath], {
|
||||
cwd: repoRoot,
|
||||
encoding: "utf8",
|
||||
});
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout).toContain(".paperclip-runtime/");
|
||||
expect(result.stdout).toContain(sensitiveRuntimePath);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user