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

Function require_occurrence

plugins/codex-security/scripts/workbench_db.py:1135–1144  ·  view source on GitHub ↗
(connection: sqlite3.Connection, occurrence_id: str)

Source from the content-addressed store, hash-verified

1133
1134
1135def require_occurrence(connection: sqlite3.Connection, occurrence_id: str) -> sqlite3.Row:
1136 occurrence_id = optional_text(occurrence_id, maximum=256)
1137 if occurrence_id is None:
1138 raise SystemExit("occurrence-id is required.")
1139 row = connection.execute(
1140 "SELECT * FROM finding_occurrences WHERE id = ?", (occurrence_id,)
1141 ).fetchone()
1142 if row is None:
1143 raise SystemExit("Codex Security finding occurrence not found.")
1144 return row
1145
1146
1147def create_workspace(connection: sqlite3.Connection, args: argparse.Namespace) -> dict[str, Any]:

Calls 1

optional_textFunction · 0.90

Tested by

no test coverage detected