Commit126d76aset docs/remote-mcp/threat-model-anchors.json generated_against_commit toe3fa3b26and left docs/remote-mcp/threat-model.md citinga143cd06, so the document and the fixture named different source revisions. tests/test_issue_956_threat_model.py asserts the fixture value appears in the document, and that assertion failed from126d76aonward. The mismatch was not cosmetic. Resolving all 58 anchors against each candidate revision shows 0 unresolved ate3fa3b26and 21 unresolved ata143cd06, so the document's own claim about where its file:line citations resolve was false. The fixture held the accurate value and the document held the stale one. The B2 fix inca5f078dinserted a net 16 lines into gitea_mcp_server.py at a single point, shifting 21 anchors below it. All 21 are re-derived here by that one uniform offset and each was verified against its recorded expect substring rather than assumed, so no anchor is guessed and none became ambiguous. Both artifacts now nameca5f078d, the commit those anchors were taken at, and the document's inline citations are shifted to match. The boundary table's claim about what the code enforces is restamped onto the same revision, because it described that same source tree. Verified: 58/58 anchors resolve at the declared generation commit, 58/58 at this head, no two anchors share a file:line location, fixture and document metadata agree, and tests/test_issue_956_threat_model.py passes 17/17. Refs #708 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
247 lines
6.3 KiB
JSON
247 lines
6.3 KiB
JSON
{
|
|
"_comment": [
|
|
"Machine-checkable anchor table for docs/remote-mcp/threat-model.md (#956).",
|
|
"Every file:line anchor cited in the threat model must appear here, and the",
|
|
"source line at that anchor must contain the 'expect' substring.",
|
|
"tests/test_issue_956_threat_model.py enforces both directions, so a refactor",
|
|
"that shifts a line number fails the suite instead of silently rotting the",
|
|
"document. #930's inventory had no such guard and its gitea_mcp_server.py",
|
|
"anchors drifted between 7bf4f125 and aad5c8b4."
|
|
],
|
|
"generated_against_commit": "ca5f078d8a575ea3e2991771f8b4ea85e3dcaaa0",
|
|
"anchors": [
|
|
{
|
|
"anchor": "gitea_mcp_server.py:24864",
|
|
"expect": "mcp_daemon_guard.bind_native_mcp_transport()"
|
|
},
|
|
{
|
|
"anchor": "mcp_daemon_guard.py:49",
|
|
"expect": "_PRODUCTION_TRANSPORTS = mcp_transport_config.SUPPORTED_TRANSPORTS"
|
|
},
|
|
{
|
|
"anchor": "mcp_daemon_guard.py:195",
|
|
"expect": "def bind_native_mcp_transport"
|
|
},
|
|
{
|
|
"anchor": "irrecoverable_provenance.py:497",
|
|
"expect": "def assess_transport_for_auth_mint"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:9191",
|
|
"expect": "assess_transport_for_auth_mint()"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:9440",
|
|
"expect": "assess_transport_for_auth_mint()"
|
|
},
|
|
{
|
|
"anchor": "mcp_server.py:4",
|
|
"expect": "The transport is selected by deployment configuration"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:15481",
|
|
"expect": "def _is_client_managed_process"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:15511",
|
|
"expect": "def _provenance_mutation_block"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:15519",
|
|
"expect": "unsupported_manual_launch"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19070",
|
|
"expect": "server_provenance"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:21581",
|
|
"expect": "def _check_mcp_runtimes_diagnostics"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:21601",
|
|
"expect": "\"ps\", \"-o\", \"pid,lstart,command\""
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:21645",
|
|
"expect": "\"ps\", \"eww\""
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:1172",
|
|
"expect": "RECOGNIZED_GITEA_ENV_KEYS"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:1233",
|
|
"expect": "GITEA_CLIENT_MANAGED"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:54",
|
|
"expect": "ENV_PROFILE = \"GITEA_MCP_PROFILE\""
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:97",
|
|
"expect": "_REVIEW_MERGE_OPS"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:499",
|
|
"expect": "repository authorization scope"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:956",
|
|
"expect": "def _keychain_token"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:974",
|
|
"expect": "def resolve_token"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:1015",
|
|
"expect": "def keychain_auth"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:294",
|
|
"expect": "def _validate_identity_auth"
|
|
},
|
|
{
|
|
"anchor": "mcp_daemon_guard.py:583",
|
|
"expect": "def assert_keychain_access_allowed"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19327",
|
|
"expect": "def gitea_list_profiles"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19378",
|
|
"expect": "gitea_config.resolve_token(p)"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19691",
|
|
"expect": "def gitea_audit_config"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19713",
|
|
"expect": "service_summaries(config)"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:704",
|
|
"expect": "def resolve_service"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:837",
|
|
"expect": "def service_summaries"
|
|
},
|
|
{
|
|
"anchor": "gitea_config.py:851",
|
|
"expect": "_keychain_token(auth.get(\"id\"))"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:17776",
|
|
"expect": "\"jenkins-mcp\""
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:17782",
|
|
"expect": "external-mcp"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:17803",
|
|
"expect": "\"glitchtip-mcp\""
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:17808",
|
|
"expect": "external-mcp"
|
|
},
|
|
{
|
|
"anchor": "mcp_discoverability.py:9",
|
|
"expect": "EXPECTED_JENKINS_TOOLS"
|
|
},
|
|
{
|
|
"anchor": "mcp_discoverability.py:17",
|
|
"expect": "EXPECTED_GLITCHTIP_TOOLS"
|
|
},
|
|
{
|
|
"anchor": "sentry_incident_bridge.py:36",
|
|
"expect": "SENTRY_AUTH_TOKEN"
|
|
},
|
|
{
|
|
"anchor": "sentry_incident_bridge.py:190",
|
|
"expect": "def resolve_token"
|
|
},
|
|
{
|
|
"anchor": "sentry_incident_bridge.py:289",
|
|
"expect": "Authorization"
|
|
},
|
|
{
|
|
"anchor": "sentry_observability.py:55",
|
|
"expect": "SENTRY_DSN"
|
|
},
|
|
{
|
|
"anchor": "master_parity_gate.py:168",
|
|
"expect": "def capture_startup_parity"
|
|
},
|
|
{
|
|
"anchor": "master_parity_gate.py:255",
|
|
"expect": "mutation_safe"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:19171",
|
|
"expect": "def gitea_assess_master_parity"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:193",
|
|
"expect": "ACTIVE_WORKTREE_ENV"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:194",
|
|
"expect": "AUTHOR_WORKTREE_ENV"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:2351",
|
|
"expect": "/tmp/gitea_issue_lock.json"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:10956",
|
|
"expect": "def gitea_bootstrap_author_issue_worktree"
|
|
},
|
|
{
|
|
"anchor": "mcp_server.py:13",
|
|
"expect": "/tmp/mcp_server_stderr.log"
|
|
},
|
|
{
|
|
"anchor": "issue_lock_store.py:26",
|
|
"expect": "DEFAULT_LOCK_DIR"
|
|
},
|
|
{
|
|
"anchor": "issue_lock_store.py:83",
|
|
"expect": "def session_pointer_path"
|
|
},
|
|
{
|
|
"anchor": "issue_lock_store.py:98",
|
|
"expect": "def is_process_alive"
|
|
},
|
|
{
|
|
"anchor": "mcp_session_state.py:27",
|
|
"expect": "DEFAULT_STATE_DIR"
|
|
},
|
|
{
|
|
"anchor": "control_plane_db.py:47",
|
|
"expect": "DEFAULT_DB_PATH"
|
|
},
|
|
{
|
|
"anchor": "control_plane_db.py:380",
|
|
"expect": "mode=0o700"
|
|
},
|
|
{
|
|
"anchor": "control_plane_db.py:386",
|
|
"expect": "sqlite3.connect"
|
|
},
|
|
{
|
|
"anchor": "control_plane_db.py:1145",
|
|
"expect": "os.getpid()"
|
|
},
|
|
{
|
|
"anchor": "gitea_mcp_server.py:12870",
|
|
"expect": "owner_pid_alive"
|
|
}
|
|
]
|
|
}
|