Skip to content

fix: create update-state directory with private permissions - #381

Merged
baiyuqing merged 2 commits into
mainfrom
baiyuqing/credential-storage
Nov 9, 2026
Merged

baiyuqing merged 2 commits into
mainfrom
baiyuqing/credential-storage

Conversation

@baiyuqing

@baiyuqing baiyuqing commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

When the update-state writer recreates a missing ~/.ticloud directory, it currently requests 0755 even though the same directory holds CLI configuration. Request 0700 instead, consistent with startup initialization. MkdirAll leaves existing directory permissions unchanged.

Add regression coverage for new and existing private directories, state-file permissions, and state serialization. Validation: go test -race ./internal/service/github and golangci-lint (0 issues).

This is directory-creation hardening. API-key storage and OAuth token behavior retain their existing implementation; plaintext API-key storage remains a separate finding.

@ti-chi-bot ti-chi-bot Bot added the size/XL label Nov 9, 2026
@ti-chi-bot ti-chi-bot Bot added size/M and removed size/XL labels Nov 9, 2026
@baiyuqing baiyuqing changed the title fix: add optional secure API key storage fix: create update-state directory with private permissions Nov 9, 2026
@baiyuqing
baiyuqing merged commit 50fb631 into main Nov 9, 2026
7 checks passed
@baiyuqing
baiyuqing deleted the baiyuqing/credential-storage branch November 9, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant