(scan_dir: Path, manifest: dict[str, Any])
| 1701 | |
| 1702 | |
| 1703 | def published_manifest_digest(scan_dir: Path, manifest: dict[str, Any]) -> str: |
| 1704 | canonical = (json.dumps(manifest, allow_nan=False, indent=2, sort_keys=True) + "\n").encode() |
| 1705 | expected = f"sha256:{hashlib.sha256(canonical).hexdigest()}" |
| 1706 | actual = scan_local_file_digest(scan_dir, ARTIFACTS["manifest"]) |
| 1707 | if actual != expected: |
| 1708 | raise SystemExit("The sealed scan manifest changed while it was being published.") |
| 1709 | return expected |
| 1710 | |
| 1711 | |
| 1712 | def require_recorded_manifest_digest(scan: sqlite3.Row, scan_dir: Path) -> None: |
no test coverage detected