Skip to content

Restrict result file permissions and redact agent output#39

Merged
that-github-user merged 1 commit into
mainfrom
issue-24-file-permissions
Mar 28, 2026
Merged

Restrict result file permissions and redact agent output#39
that-github-user merged 1 commit into
mainfrom
issue-24-file-permissions

Conversation

@that-github-user

Copy link
Copy Markdown
Owner

Summary

  • Write .thinktank/ result files with mode 0o600 (owner-only access)
  • Redact agent stdout/stderr from saved JSON to prevent credential leakage
  • Worktrees remain available for full output inspection

Change type

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI / infrastructure
  • Chore

Related issue

Closes #24

How to test

  1. Run thinktank run "add a comment" -n 2
  2. Check .thinktank/latest.json — agent output should say "[redacted]"
  3. On Unix: stat -c %a .thinktank/latest.json should show 600

Breaking changes

  • This PR introduces breaking changes

Saved result files no longer contain agent stdout/stderr. Use worktrees to inspect full output.

🤖 Generated with Claude Code

- Write .thinktank/ files with mode 0o600 (owner read/write only)
- Redact agent stdout/stderr from saved JSON results to prevent
  credential exposure from build output or Claude debug logs
- Worktrees still available for full output inspection

Closes #24

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user

Copy link
Copy Markdown
Owner Author

Self-review: Redaction preserves all scoring-relevant fields (diff, filesChanged, linesAdded, etc.) while removing stdout/stderr. File permissions restrict access on Unix; Windows ignores mode but the redaction still protects. 40 tests pass, lint clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict .thinktank/ result file permissions to prevent credential exposure

1 participant