security: create store entries with private permissions (ai:gpt-5) #53
Labels
No labels
nagonag
nagonag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IUS/once#53
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?
Finding from a whole-codebase security review.
Affected code:
os.MkdirAll(f.path, 0777)and createsmeta.json/contentwithos.Create.UMask=0077.Impact:
The store contains uploaded secrets. Outside the systemd example, permissions depend on the process umask. With a common umask like 0022, directories may become 0755 and files 0644, exposing uploaded content and metadata to other local users on the host. Security should not depend on deployment-specific umask hygiene.
Suggested fix:
meta.json, temp metadata files, andcontentwith mode 0600 viaos.OpenFile.chmod/migration for existing store entries whose permissions are too broad.