MCPcopy Create free account
hub / github.com/openai/plugins / _target_scope_lines

Function _target_scope_lines

plugins/codex-security/scripts/report_projection.py:230–247  ·  view source on GitHub ↗
(target: dict[str, Any])

Source from the content-addressed store, hash-verified

228
229
230def _target_scope_lines(target: dict[str, Any]) -> list[str]:
231 lines = [
232 f"- Target kind: {_text(target.get('kind'), 'not recorded')}",
233 f"- Target ID: {_text(target.get('targetId'), 'not recorded')}",
234 ]
235 base_revision = _text(target.get("baseRevision"), "")
236 head_revision = _text(target.get("headRevision"), "")
237 if base_revision or head_revision:
238 lines.append(
239 f"- Revision range: {base_revision or 'unknown'}...{head_revision or 'unknown'}"
240 )
241 revision = _text(target.get("revision"), "")
242 if revision:
243 lines.append(f"- Revision: {revision}")
244 snapshot_digest = _text(target.get("snapshotDigest"), "")
245 if snapshot_digest:
246 lines.append(f"- Snapshot digest: {snapshot_digest}")
247 return lines
248
249
250def _surface_notes(surface: dict[str, Any]) -> str:

Callers 1

build_report_markdownFunction · 0.85

Calls 2

_textFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected