solyanviktor-star
2b30744c34
security(photon): create auth.json temp file with 0o600 atomically
...
_save_auth() wrote the bearer token with tmp.open('w') — created at
process umask (typically 0o644) — and only chmod'ed to 0o600 after the
write, leaving a window where the token sat world-readable. The temp
name was also fixed and predictable (auth.json.tmp), so it could be
pre-planted (symlink attack).
Create the temp file with os.open(O_WRONLY|O_CREAT|O_EXCL, 0o600) and a
per-process random suffix, fsync before the atomic replace, and clean
the temp file up on failure. Mirrors hermes_cli/auth.py:_save_auth_store
(#19673 , #21148 ), which hardened the same pattern in the core writer.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-28 18:20:06 -07:00
..
2026-07-25 18:06:32 -07:00
2026-07-22 12:10:58 -05:00
2026-07-28 18:17:56 -07:00
2026-07-23 05:45:17 +00:00
2026-07-28 12:37:35 -07:00
2026-07-26 03:38:23 -05:00
2026-07-26 16:52:25 +10:00
2026-07-28 18:17:52 -07:00
2026-07-07 18:33:28 +10:00
2026-07-27 19:19:01 +05:30
2026-07-28 08:25:25 -07:00
2026-07-28 17:57:48 -07:00
2026-07-28 17:34:21 -07:00
2026-07-17 06:53:38 -07:00
2026-07-24 07:53:12 -07:00
2026-07-05 13:42:46 -07:00
2026-07-01 03:16:13 -07:00
2026-07-24 13:00:53 +05:30
2026-07-28 18:20:06 -07:00
2026-07-25 22:46:35 -07:00
2026-07-28 18:17:56 -07:00
2026-07-27 21:10:51 -07:00
2026-07-22 03:20:45 -07:00
2026-07-26 20:59:26 -07:00
2026-07-24 16:00:34 -07:00
2026-07-05 13:42:46 -07:00
2026-07-28 18:12:26 -07:00
2026-07-28 17:21:58 -05:00
2026-07-28 18:17:52 -07:00
2026-07-03 14:27:34 +10:00
2026-07-28 14:07:21 -07:00
2026-07-06 03:28:30 -07:00
2026-07-01 16:21:39 +05:30
2026-07-22 04:40:07 -07:00
2026-07-23 07:24:46 -07:00
2026-07-22 04:39:28 -07:00
2026-07-25 07:17:52 -07:00
2026-07-05 00:44:15 -07:00
2026-07-23 11:44:43 -07:00
2026-07-14 03:58:54 +05:30
2026-07-28 10:07:18 -07:00
2026-07-22 03:20:25 -07:00
2026-07-06 04:58:07 -07:00
2026-07-22 04:39:17 -07:00
2026-07-22 10:35:04 -07:00
2026-07-20 05:39:09 -07:00
2026-07-24 17:10:39 -07:00
2026-07-18 00:34:54 -04:00
2026-07-05 11:44:53 +05:30
2026-07-25 22:47:07 -07:00
2026-07-27 17:27:38 -07:00
2026-07-25 21:44:43 -07:00
2026-07-28 18:18:17 -07:00
2026-07-16 12:48:48 -07:00
2026-07-17 20:55:24 +00:00
2026-07-18 19:18:03 +05:30
2026-07-26 19:30:32 -07:00
2026-07-18 18:40:59 -04:00
2026-07-07 21:17:34 +07:00
2026-07-05 19:35:30 -07:00
2026-07-28 11:53:12 -07:00
2026-07-26 16:06:50 -05:00
2026-07-24 09:49:00 -07:00
2026-07-24 09:49:00 -07:00
2026-07-24 09:49:00 -07:00
2026-07-24 21:20:52 -05:00
2026-07-21 12:15:46 +05:30
2026-07-05 14:01:03 -07:00
2026-07-27 21:10:51 -07:00
2026-07-22 03:19:32 -07:00
2026-07-01 03:17:48 -07:00
2026-07-22 16:51:01 -04:00
2026-07-26 19:29:07 -07:00
2026-07-27 21:10:51 -07:00
2026-07-16 19:48:47 -04:00
2026-07-07 15:15:37 -07:00
2026-07-07 11:57:01 +05:30
2026-07-25 07:09:22 -07:00
2026-07-22 07:56:47 -07:00
2026-07-28 20:29:44 +05:30
2026-07-26 02:58:20 -05:00
2026-07-12 05:07:52 -04:00
2026-07-22 21:14:44 -07:00
2026-07-18 04:15:13 -07:00
2026-07-25 21:44:43 -07:00
2026-07-25 21:44:43 -07:00
2026-07-22 04:42:50 -07:00
2026-07-14 21:25:44 -07:00
2026-07-18 01:11:03 -07:00
2026-07-23 21:06:47 -07:00
2026-07-23 16:21:03 -07:00
2026-07-21 12:43:27 -07:00
2026-07-28 14:20:10 -07:00
2026-07-28 17:58:33 -07:00
2026-07-28 07:58:01 -07:00
2026-07-28 11:57:37 -07:00
2026-07-15 04:55:46 -07:00
2026-07-16 15:23:32 -04:00
2026-07-28 19:20:14 -05:00
2026-07-24 11:45:57 -07:00
2026-07-08 08:05:45 -07:00
2026-07-05 00:41:34 -07:00
2026-07-24 23:06:05 -07:00