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

Function finding_occurrence_rows

plugins/codex-security/scripts/workbench_db.py:3158–3180  ·  view source on GitHub ↗
(
    connection: sqlite3.Connection, scan_id: str, *, offset: int, limit: int
)

Source from the content-addressed store, hash-verified

3156
3157
3158def finding_occurrence_rows(
3159 connection: sqlite3.Connection, scan_id: str, *, offset: int, limit: int
3160) -> list[sqlite3.Row]:
3161 return connection.execute(
3162 """
3163 SELECT id, finding_id, title, summary, severity, confidence, remediation, details_json, created_at
3164 FROM finding_occurrences
3165 WHERE scan_id = ?
3166 ORDER BY
3167 CASE severity
3168 WHEN 'critical' THEN 0
3169 WHEN 'high' THEN 1
3170 WHEN 'medium' THEN 2
3171 WHEN 'low' THEN 3
3172 WHEN 'informational' THEN 4
3173 ELSE 5
3174 END,
3175 created_at,
3176 id
3177 LIMIT ? OFFSET ?
3178 """,
3179 (scan_id, limit, offset),
3180 ).fetchall()
3181
3182
3183def backfill_legacy_finding_details(connection: sqlite3.Connection, scan: sqlite3.Row) -> None:

Callers 2

list_findingsFunction · 0.85
scan_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected