{
  "audit_id": "aud_20261126_7f35183",
  "commit_sha": "c799c8552b0f27b7a33a7b9233773da144dddcf5",
  "scanner_digests": {
    "trivy": "sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb",
    "osv_scanner": "sha256:a70ffffc2bfd33482953e5d6b64c6fcdb30239717a07b0f0d3ab2859ce3e4cde",
    "semgrep": "sha256:67518c174185a2043fdbed16c70631b79209499b3671178e7194379b48295a0d",
    "trufflehog": "sha256:8fd07ea46a3f59583c4d50f006d8cf150530141b28969c3c34cc455cb9165a6b"
  },
  "scanner_execution": {
    "cve": false,
    "sast": false,
    "secrets": true,
    "install_hooks": true,
    "prompt_injections": true,
    "supply_chain": true
  },
  "metrics": {
    "loc_total": 66217,
    "direct_dependencies": 4,
    "transitive_dependencies": 383,
    "has_lockfile": true,
    "lockfile_names": [
      "package-lock.json",
      "uv.lock"
    ],
    "unpinned_dependencies_count": 4,
    "floating_url_or_git_deps_count": 0,
    "pinning_posture": "FLOATING_UNSAFE",
    "has_test_files": true,
    "test_file_count": 202,
    "license_osi_approved": true
  },
  "findings": {
    "cve_critical": [],
    "cve_high": [],
    "secrets_verified": [],
    "secrets_production": [],
    "secrets_test_fixtures": [],
    "suspicious_install_hooks": [],
    "sast_blocking": [],
    "iac_misconfigs": [],
    "prompt_injections": [],
    "supply_chain_anomalies": []
  },
  "sanitized_excerpts": [
    {
      "excerpt_id": "EX-001",
      "file": "src/fetch/src/mcp_server_fetch/__main__.py",
      "lines": "1-5",
      "content": "# __main__.py\n\nfrom mcp_server_fetch import main\n\nmain()"
    },
    {
      "excerpt_id": "EX-002",
      "file": "src/git/src/mcp_server_git/__main__.py",
      "lines": "1-5",
      "content": "# __main__.py\n\nfrom mcp_server_git import main\n\nmain()"
    },
    {
      "excerpt_id": "EX-003",
      "file": "src/git/tests/test_automatic_maintenance.py",
      "lines": "1-80",
      "content": "\"\"\"No tool starts git's automatic maintenance in a repository it opens.\n\n`git merge` ends in `git maintenance run --auto`, which runs `git gc` when\nthe repository's own configuration says it is due (`gc.auto`,\n`gc.autoPackLimit`). That gc's cruft repack runs every command the\nrepository's `gc.recentObjectsHook` names, so a repository could run a\nprogram as the server's user through git_merge. `HARDENED_CONFIG` pins\n`maintenance.auto` and `gc.auto` off; these tests plant a repository that\nforces a gc on the next merge, with a hook that records its own run in a\ncanary file, and assert the canary is never written.\n\nThe hook is a POSIX shell script, so the tests that run it skip on Windows;\nthe check of the pinned values runs everywhere.\n\"\"\"\n\nimport os\nimport shlex\nimport stat\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nimport git\nimport pytest\nfrom conftest import connect, wire\n\nfrom mcp_server_git.server import harden_repo\n\nposix_only = pytest.mark.skipif(\n    sys.platform == \"win32\", reason=\"the hook is a POSIX shell script\"\n)\n# gc.recentObjectsHook arrived in git 2.42; an older git never runs it.\nneeds_hook = pytest.mark.skipif(\n    git.Git().version_info < (2, 42), reason=\"gc.recentObjectsHook needs git 2.42\"\n)\n\n\ndef root_of(repo: git.Repo) -> Path:\n    assert repo.working_dir is not None\n    return Path(repo.working_dir)\n\n\ndef commit_file(repo: git.Repo, name: str, content: str) -> None:\n    (root_of(repo) / name).write_text(content, newline=\"\\n\")\n    repo.git.add(name)\n    repo.git.commit(\"-m\", f\"write {name}\")\n\n\ndef plant_due_gc(repo: git.Repo, canary: Path, *, diverge: bool) -> None:\n    \"\"\"Make the next merge of `feature` run a gc that asks the hook.\n\n    Two packs make gc due under `gc.auto=1` and `gc.autoPackLimit=1`, and\n    their sizes (6 or 3 objects against 4) are within a factor of two, so a\n    git whose maintenance repacks geometrically finds them due too. An old\n    unreachable loose object makes the cruft repack consult\n    `gc.recentObjectsHook`. `diverge` adds a commit on `main`, so the merge\n    is not a fast-forward.\n    \"\"\"\n    # Each commit comes before the pack it lands in: a commit runs automatic\n    # maintenance too, which could consolidate packs already made.\n    repo.git.branch(\"feature\")\n    if diverge:\n        commit_file(repo, \"main.txt\", \"main\\n\")\n    repo.git.repack(\"-a\", \"-d\")\n    repo.git.checkout(\"feature\")\n    (root_of(repo) / \"feature-1.txt\").write_text(\"one\\n\", newline=\"\\n\")\n    (root_of(repo) / \"feature-2.txt\").write_text(\"two\\n\", newline=\"\\n\")\n    repo.git.add(\"feature-1.txt\", \"feature-2.txt\")\n    repo.git.commit(\"-m\", \"feature\")\n    repo.git.checkout(\"main\")\n    repo.git.repack(\"-d\")\n\n    hook = canary.parent / \"hook.sh\"\n    hook.write_text(f\"#!/bin/sh\\necho ran >> {shlex.quote(str(canary))}\\n\")\n    hook.chmod(hook.stat().st_mode | stat.S_IEXEC)\n    with repo.config_writer() as config:\n        config.set_value(\"gc\", \"auto\", \"1\")\n        config.set_value(\"gc\", \"autoPackLimit\", \"1\")\n        config.set_value(\"gc\", \"autoDetach\", \"false\")\n        config.set_value(\"gc\", \"recentObjectsHook\", shlex.quote(str(hook)))"
    },
    {
      "excerpt_id": "EX-004",
      "file": "src/time/src/mcp_server_time/__main__.py",
      "lines": "1-3",
      "content": "from mcp_server_time import main\n\nmain()"
    },
    {
      "excerpt_id": "ST-METRIC-LOC",
      "file": "METRICS",
      "lines": "LOC: 66217",
      "content": "Verified total codebase lines of code: 66217"
    },
    {
      "excerpt_id": "ST-METRIC-TESTS",
      "file": "METRICS",
      "lines": "TestFiles: 202",
      "content": "Verified automated test file count: 202 (has_test_files=True)"
    },
    {
      "excerpt_id": "ST-METRIC-DEPS",
      "file": "METRICS",
      "lines": "Dependencies: 4",
      "content": "Verified dependencies: direct=4, transitive=383"
    },
    {
      "excerpt_id": "ST-METRIC-LOCK",
      "file": "METRICS",
      "lines": "Pinning: FLOATING_UNSAFE",
      "content": "Lockfiles: ['package-lock.json', 'uv.lock'] | pinning_posture=FLOATING_UNSAFE | unpinned=4 | floating_git=0"
    }
  ]
}