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

Function remediation_availability

plugins/codex-security/scripts/workbench_db.py:3141–3155  ·  view source on GitHub ↗
(scan: sqlite3.Row)

Source from the content-addressed store, hash-verified

3139
3140
3141def remediation_availability(scan: sqlite3.Row) -> tuple[bool, str | None]:
3142 try:
3143 current_revision = git_revision(require_scan_target_identity(scan))
3144 except SystemExit as exc:
3145 return False, str(exc)
3146 expected_revision = scan["target_revision"]
3147 if current_revision == expected_revision:
3148 return True, None
3149 return (
3150 False,
3151 (
3152 "Remediation is unavailable because the selected checkout is not at the revision "
3153 "that was scanned. Check out the scanned revision or start a new scan."
3154 ),
3155 )
3156
3157
3158def finding_occurrence_rows(

Callers 1

scan_resultFunction · 0.85

Calls 2

git_revisionFunction · 0.90

Tested by

no test coverage detected