You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prevent broad temporary permissions before atomic JSON write #484
When replacing an existing lifecycle JSON file, its temporary file must never
begin with permissions broader than the destination. Any widening required to
restore the exact destination mode must happen before payload bytes are written.
Observed
The temporary file is created with requested mode 0666. Under umask 022,
replacing an existing 0600 file therefore exposes an initially empty 0644
temporary entry until fchmod. Another account can open that entry during the
window and retain read access after payload bytes are written.
Acceptance
For replacement, request the existing destination mode during exclusive
creation.
Preserve process-umask behavior for first writes.
Restore the exact existing mode before writing when umask removed bits.
Add a deterministic regression that observes the temporary descriptor mode
before fchmod.
Activity
fix: restrict atomic replacement temp mode (#484)