Skip to content

Write credentials atomically and audit permissions - #226

Merged
LuisPalacios merged 1 commit into
mainfrom
fix/162-atomic-token-writer
Nov 14, 2026
Merged

LuisPalacios merged 1 commit into
mainfrom
fix/162-atomic-token-writer

Conversation

@LuisPalacios

Copy link
Copy Markdown
Owner

Closes #162

What changed

Credential updates share one writer that prepares and syncs a temporary file before replacement. Account-aware saves use Git credential-store format directly; legacy raw tokens remain readable. Coordinated reads prevent Windows replacement conflicts within Gitbox.

A metadata-only permission audit runs at startup and in System check. It reports Unix modes, Windows access rules and unverifiable paths without changing permissions. Exposure warnings appear in both dashboard views. UI text and documentation cover English and Spanish.

Test plan

  • Go vet, focused tests, race checks and full health check.
  • Frontend type check and 48 tests.
  • Native Windows permission, concurrent rotation and external-lock tests.
  • Builds and version smoke on macOS ARM, Windows and Linux.
  • Manual Forgejo and GitLab token-account smoke.
  • macOS Intel verification: host unavailable.

Share the credential writer across raw and account-aware storage, coordinate readers during replacement, and preserve the previous file on failure. Report Unix permissions and Windows access rules at startup and in System check without modifying them.

Closes #162
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.

[Phase 1] One atomic token writer and a startup permission audit

1 participant