TestDebugLogFilePermsAreOwnerOnly: the log captures every prompt and tool-call payload: bash args can carry heredoc secrets, so a world-readable log leaks them. 0o600 only.
(t *testing.T)
| 679 | // payload: bash args can carry heredoc secrets, so a world-readable log leaks |
| 680 | // them. 0o600 only. |
| 681 | func TestDebugLogFilePermsAreOwnerOnly(t *testing.T) { |
| 682 | dir := t.TempDir() |
| 683 | OpenDebugLog(dir) |
| 684 | t.Cleanup(CloseDebugLog) |
| 685 | st, err := os.Stat(filepath.Join(dir, "log.txt")) |
| 686 | if err != nil { |
| 687 | t.Fatal(err) |
| 688 | } |
| 689 | if got := st.Mode().Perm(); got != 0o600 { |
| 690 | t.Fatalf("log.txt perms = %v, want 0o600", got) |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | // TestVerboseLogCapturesTurnRecords drives a realistic two-round turn (reasoning |
| 695 | // → bash tool call → final answer) with logging on, and asserts the verbose |
nothing calls this directly
no test coverage detected