MCPcopy Index your code
hub / github.com/openai/plugins / _require_dict

Function _require_dict

plugins/codex-security/scripts/finalize_scan_contract.py:123–127  ·  view source on GitHub ↗
(payload: dict[str, Any], key: str, context: str)

Source from the content-addressed store, hash-verified

121
122
123def _require_dict(payload: dict[str, Any], key: str, context: str) -> dict[str, Any]:
124 value = payload.get(key)
125 if not isinstance(value, dict):
126 raise ContractError(f"{context}.{key}: expected an object")
127 return value
128
129
130def _require_list(payload: dict[str, Any], key: str, context: str) -> list[Any]:

Callers 9

_fingerprintFunction · 0.85
_enrich_findingsFunction · 0.85
_validate_findingFunction · 0.85
_validate_coverageFunction · 0.85
_validate_manifestFunction · 0.85
_validate_findingsFunction · 0.85
write_sarif_projectionFunction · 0.85
finalize_scanFunction · 0.85

Calls 2

ContractErrorClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected