Files
felhom.eu/documentation/audits/SPIKE-cc-creds-2026-10-17/probes/put.py
T
adminandClaude Opus 5.5 b9c4f73bfa
gates / gates (push) Failing after 6m36s
SPIKE cc-creds: secret broker + CC transcript guards measured with canaries (R-1118..R-1122, 168 -> 173)
Mask PASS, PreToolUse refuse PASS, PostToolUse replace PARTIAL (crash and
large-output disk leaks, both with a measured fix), SOPS+age store PARTIAL
(private repo could not be created), transcript sweep PASS. Fake secrets
only; ~/.config/credentials not read; no CC settings changed. Files use
"creds": .gitignore *secret* ignores the brief's names. STATUS D10: the
store choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
2026-10-17 11:57:24 +02:00

10 lines
545 B
Python

#!/usr/bin/env python3
"""sec-put probe: stdin = decrypted YAML; adds/replaces NAME with the content of VALUEFILE; stdout = YAML.
The value never touches argv, a terminal or a temp file. put.py NAME VALUEFILE"""
import sys, json
name, path = sys.argv[1], sys.argv[2]
value = open(path).read().rstrip("\n")
lines = [l for l in sys.stdin.read().splitlines() if not l.startswith(name + ":")]
lines.append("%s: %s" % (name, json.dumps(value))) # JSON string is valid YAML
print("\n".join(l for l in lines if l.strip() and l.strip() != "{}"))