The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(security): make tirith's release-provenance check public
ethernet31d8ba29cc4d
diff --git a/pm/security_packages.py b/pm/security_packages.pyindex 45057efcfc8..6b6110961d9 100644--- a/pm/security_packages.py+++ b/pm/security_packages.py@@ -94,9 +94,9 @@ class Tirith(_SignedBinary):return [archive, *[f"{base}/{name}" for name in ("checksums.txt", "checksums.txt.sig", "checksums.txt.pem")]]def verify_provenance(self, directory: Path) -> None:- from tools.tirith_security import _verify_release_provenance+ from tools.tirith_security import verify_release_provenance- _, reason = _verify_release_provenance(directory, logging.getLogger(__name__).warning)+ _, reason = verify_release_provenance(directory, logging.getLogger(__name__).warning)if reason:raise InstallError(self.name, reason)diff --git a/tools/tirith_security.py b/tools/tirith_security.pyindex 07613e5b093..8d3e8cc6fc8 100644--- a/tools/tirith_security.py+++ b/tools/tirith_security.py@@ -107,7 +107,7 @@ def _verify_cosign(checksums_path: str, sig_path: str, cert_path: str) -> bool |return True-def _verify_release_provenance(directory: Path, log) -> tuple[bool, str]:+def verify_release_provenance(directory: Path, log) -> tuple[bool, str]:"""Verify PM-acquired checksum provenance; this function never downloads.Missing/broken cosign is optional; an explicit rejection is fatal.