Files
gstack/design
Garry TanandClaude Fable 5 a2ae26d44c fix(design): create the OpenAI key file owner-only, closing the write-then-chmod race
saveApiKey wrote ~/.gstack/openai.json at the default umask and tightened to
0600 afterwards, leaving the API key briefly world-readable between write and
chmod (CWE-377/367). Pass mode 0o600 at create; the trailing chmodSync stays
as a backstop to tighten a pre-existing loose file.

Contributed by @bunlongheng (PR #2468).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 20:20:58 -07:00
..