build-context
- •
Attribution
- •
Solved by Fauzi Ismail during the competition. These are rn’s study notes based on the teammate’s documented solve, not an independent rn solve.
- •
- •
What it asked
- •
Reconstruct release material from CI and DSSE provenance, derive the vault key, and decode the release vault.
- •
- •
Approach
- •
Decode the DSSE payload, then read the subject digest, builder ID, and release channel. Read the build ID from
ci_trace.log. - •
Take the first 20 digest characters and the last path component of the builder ID as the runner name.
- •
Serialize
build_id:digest_prefix:runner_name:release_channelexactly. Hash the UTF-8 bytes with SHA-256 and repeat that digest as the XOR keystream. - •
The byte equation is .
- •
- •
Solution
- •
import base64, hashlib, json from pathlib import Path root = Path(".") envelope = json.loads((root / "provenance/release_attestation.dsse.json").read_text()) payload = envelope["payload"] + "=" * (-len(envelope["payload"]) % 4) stmt = json.loads(base64.urlsafe_b64decode(payload)) digest = stmt["subject"][0]["digest"]["sha256"] predicate = stmt["predicate"] builder = predicate["runDetails"]["builder"]["id"] channel = predicate["buildDefinition"]["externalParameters"]["release_channel"] build_id = next(line.split("build_id=", 1)[1].strip() for line in (root / "ci_trace.log").read_text().splitlines() if "build_id=" in line) material = f"{build_id}:{digest[:20]}:{builder.rstrip('/').split('/')[-1]}:{channel}" key = hashlib.sha256(material.encode()).digest() ct = (root / "dist/release.vault").read_bytes() print(bytes(c ^ key[i % 32] for i, c in enumerate(ct)).decode())
- •
- •
Verification
- •
The document gives material
KMSB-DEVOPS-2026-09:fbe870d85dd28066cc25:devops-release-07:final-onsite. The original vault file was not separately attached for replay.
- •
- •
Concepts
- •
DSSE payload decoding; provenance metadata; exact serialization; SHA-256 key derivation; repeating-key XOR.
- •
- •