Repository navigation
Conversation
The ledger holds each task's first prompt line, so it should not be readable by other local users. The import now creates the directory 0700 and the CSVs 0600. The band's $.fs.write takes no mode, so a freshly created ledger directory is chmod 700 once (not on Windows). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The band writes one CSV per project to
~/.config/ponytail/band/, and/ponytail band importfills it from every transcript. Together these files are a running log of all projects: names, task names, cost and tokens. Right now they're created with the default umask, so on a typical system (umask 022) other local users can read them.This PR limits them to the user who owns them:
hooks/ponytail-band-import.js: the ledger directory is created with mode0o700and the CSVs with0o600.hooks/band/register.tsx:$.fs.writetakes no mode, sorecord()checks whether the directory already exists before the first write. If the write has just created it, it runschmod 700on it once. This is skipped on Windows, using the same check asopenBoard, and a failure is ignored. No chmod runs on later turns.tests/band-import.test.js: checks that a fresh import creates the directory as 0700 and the CSV as 0600 (POSIX only). It also pins the fresh-directory check and the chmod line inregister.tsx, so these run innpm test.Notes:
~/.config/ponytail/bandkeeps its mode.chmod 700 ~/.config/ponytail/bandfixes it once.mkdirSync({ recursive: true, mode })gives the same mode to any parent directory it creates, for example~/.configon a fresh machine. 0700 is what the XDG spec recommends for it.ledgeroption still defaults totrue. Would you consider defaulting it tofalse, so the log only exists for people who use the board? That's a question, not part of this PR.Tests:
node --test tests/*.test.jsgives 143 of 144 passing. The one failure iscsv: correct pandas one-liner passes, which also fails onmainin my environment (no pandas).npm test --prefix pi-extensionpasses 30 of 30.claude plugin test .gives 30 passing and 2 failing, and the two failing layout tests fail onmaintoo.🤖 Generated with Claude Code
https://claude.ai/code/session_01J9HLRpQYgqTqGkrBigkfaS