MCPcopy
hub / github.com/openai/plugins / require_sha256_digest

Function require_sha256_digest

plugins/codex-security/scripts/workbench_db.py:2763–2774  ·  view source on GitHub ↗
(value: str, label: str)

Source from the content-addressed store, hash-verified

2761
2762
2763def require_sha256_digest(value: str, label: str) -> str:
2764 normalized = optional_text(value, maximum=71)
2765 if (
2766 normalized is None
2767 or not normalized.startswith("sha256:")
2768 or len(normalized) != 71
2769 or any(
2770 character not in "0123456789abcdef" for character in normalized.removeprefix("sha256:")
2771 )
2772 ):
2773 raise SystemExit(f"{label} must use sha256:<64 lowercase hex characters>.")
2774 return normalized
2775
2776
2777def require_scan_relative_file(scan: sqlite3.Row, value: str) -> str:

Callers 1

set_finding_remediationFunction · 0.85

Calls 1

optional_textFunction · 0.90

Tested by

no test coverage detected