molecule-core/workspace-template/builtin_tools
Dev Lead Agent 1440bd732e fix(security): H3 github_pat_ redaction + M4 atomic token write (audit cycle 10)
H3 (compliance.py): GitHub fine-grained PATs use the github_pat_ prefix
with an 82-character alphanumeric+underscore suffix — different from
classic tokens (36 chars). Add the missing pattern to _PII_PATTERNS so
fine-grained PATs are redacted in compliance logs alongside classic tokens.

M4 (platform_auth.py): Replace write_text()+chmod() in save_token() with
os.open(O_WRONLY|O_CREAT|O_TRUNC, 0o600) + os.write(). The old approach
had a TOCTOU window where a concurrent reader could access the token file
before chmod restricted permissions. os.open with explicit mode creates the
file with 0600 permissions atomically in a single syscall.

H2 (a2a_client.py): Already fixed in commit bea0e96 (Cycle 5); no-op.

Tests: 1136 passed, 2 skipped (workspace-template pytest suite)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 09:34:27 +00:00
..
__init__.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
a2a_tools.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
approval.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
audit.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
awareness_client.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
compliance.py fix(security): H3 github_pat_ redaction + M4 atomic token write (audit cycle 10) 2026-04-14 09:34:27 +00:00
delegation.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
governance.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
hitl.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
medo.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
memory.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
sandbox.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
security_scan.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
telemetry.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
temporal_workflow.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00