Tighten analytics usage log to 0600 for consistency with other on-disk writes #268
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/analytics/analytics.go:145opensusage.jsonlwith mode0644, while every other on-disk write in the project (serve.log, crashlog, gitconfig, staged binaries) uses0600.The contents are non-sensitive - the
Eventstruct (lines 27-32) is only{ts, surface, command, outcome}, no arguments and no token - so this is not a credential leak. It's a minor local info-disclosure (which madtea commands ran, and when, readable by other local users on a shared host) plus an inconsistency with the file's own 0600 discipline.Fix: open with
0600.Acceptance: the analytics log is created 0600; a test or the existing perms coverage asserts it.