Skip to main content
Glama

Audit a GitHub repository's npm dependencies

audit_github_repository
Read-only

Audit a GitHub repository's npm dependencies from its URL — no pasted files needed. Fetches package.json plus the first lockfile found (pnpm-lock.yaml, then package-lock.json, then yarn.lock) from the default branch (or ref), and detects monorepos (package.json workspaces, pnpm-workspace.yaml), merging member dependencies (up to 50 members).

What it checks:

  • Every lockfile entry (up to 3,000; the repo's own workspace/link entries skipped) against OSV.dev, so vulnerablePackageCount covers the whole dependency set.

  • Up to 100 packages, vulnerable ones first, also get a license verdict (same default policy as check_license_compliance, or pass policy) and an install-script signal; up to 10 with lifecycle scripts get the deep tarball scan (installScriptScanScope).

  • Up to 5 high-risk packages (critical/high vulnerability, possible typosquat, deprecated) get the maintainer-change and provenance checks; others are named in ownershipCheckNote.

Read coverage and the summary before calling a repo clean: a summary starting PARTIAL AUDIT (coverage.complete: false) means not every package got every check. findings has full detail only for packages with something to report; the other detailed packages are listed compactly in cleanFindings. Vulnerable packages past the 100-package detail cap are in overflowVulnerablePackages. peerDependencies are skipped unless includePeerDependencies: true. This is the most expensive tool here — do not call it in a loop across many repos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or commit SHA to audit. Omit to use the repository's default branch.
urlYesGitHub repository URL, e.g. "https://github.com/owner/repo".
policyNoLicense allow/deny policy, same shape as check_license_compliance. Omit for the default policy (only copyleft/network-copyleft/proprietary are violations).
includeDevDependenciesNoInclude package.json devDependencies in the audit. Default false. Ignored when a lockfile is used instead (its own format decides direct-dependency scope), and yarn.lock can never distinguish dev from production dependencies regardless of this flag.
includePeerDependenciesNoInclude package.json peerDependencies (root and, for a monorepo, each workspace member) in the audit. Default false — a peer is often intentionally left unresolved by the consumer. See warnings for which peers were excluded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
ownerYes
policyYes
summaryYes
coverageYesHow much of the dependency set was actually checked — read this before calling a repo clean.
findingsYesDetailed packages with something to report (vulnerable, unchecked, license issue, install-script/ownership signal, typosquat, deprecated).
repoNameYes
warningsYes
isMonorepoYes
inputFormatYes
deepScanNoteYes
lockfilePathYes
manifestPathYes
cleanFindingsYesDetailed packages with nothing flagged, listed compactly. Together with `findings` these are the `totalPackages` packages that got full detail.
totalPackagesYes
workspaceNoteYes
truncationNoteYes
deepScannedCountYes
overflowPackagesYes
defaultBranchUsedYes
workspacePatternsYes
ownershipCheckNoteYes
overflowPackageCountYes
licenseViolationCountYes
ownershipCheckedCountYes
workspacePackageCountYes
vulnerablePackageCountYesVulnerable packages across every vulnerability-checked entry, not just `findings`.
installScriptFlaggedCountYes
ownershipRiskFlaggedCountYes
overflowVulnerablePackagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / cleanFindings
      Added value: +{
      +  "description": "Detailed packages with nothing flagged, listed compactly. Together with `findings` these are the `totalPackages` packages that got full detail.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "license": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "version": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "version",
      +      "license"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / findings / description
      Added value: +"Detailed packages with something to report (vulnerable, unchecked, license issue, install-script/ownership signal, typosquat, deprecated)."
    • changedOutput schema / required
      Previous value: -[
      -  "summary",
      -  "owner",
      -  "repoName",
      -  "ref",
      -  "defaultBranchUsed",
      -  "manifestPath",
      -  "lockfilePath",
      -  "inputFormat",
      -  "isMonorepo",
      -  "workspacePatterns",
      -  "workspacePackageCount",
      -  "workspaceNote",
      -  "policy",
      -  "findings",
      -  "coverage",
      -  "overflowPackages",
      -  "overflowPackageCount",
      -  "overflowVulnerablePackages",
      -  "totalPackages",
      -  "vulnerablePackageCount",
      -  "licenseViolationCount",
      -  "installScriptFlaggedCount",
      -  "deepScannedCount",
      -  "ownershipCheckedCount",
      -  "ownershipRiskFlaggedCount",
      -  "warnings",
      -  "truncationNote",
      -  "deepScanNote",
      -  "ownershipCheckNote"
      -]New value: +[
      +  "summary",
      +  "owner",
      +  "repoName",
      +  "ref",
      +  "defaultBranchUsed",
      +  "manifestPath",
      +  "lockfilePath",
      +  "inputFormat",
      +  "isMonorepo",
      +  "workspacePatterns",
      +  "workspacePackageCount",
      +  "workspaceNote",
      +  "policy",
      +  "findings",
      +  "cleanFindings",
      +  "coverage",
      +  "overflowPackages",
      +  "overflowPackageCount",
      +  "overflowVulnerablePackages",
      +  "totalPackages",
      +  "vulnerablePackageCount",
      +  "licenseViolationCount",
      +  "installScriptFlaggedCount",
      +  "deepScannedCount",
      +  "ownershipCheckedCount",
      +  "ownershipRiskFlaggedCount",
      +  "warnings",
      +  "truncationNote",
      +  "deepScanNote",
      +  "ownershipCheckNote"
      +]
  2. Changed7 schema fields changed
    • addedOutput schema / properties / coverage
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "How much of the dependency set was actually checked — read this before calling a repo clean.",
      +  "properties": {
      +    "complete": {
      +      "type": "boolean"
      +    },
      +    "detailedCount": {
      +      "type": "number"
      +    },
      +    "localPackagesSkipped": {
      +      "type": "number"
      +    },
      +    "totalPackages": {
      +      "type": "number"
      +    },
      +    "vulnerabilityCheckedCount": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "totalPackages",
      +    "detailedCount",
      +    "vulnerabilityCheckedCount",
      +    "localPackagesSkipped",
      +    "complete"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / findings / items / properties / vulnerabilities / items / properties / isMalware
      Added value: +{
      +  "description": "Confirmed-malicious package (MAL-* id/alias or CWE-506), not an ordinary vulnerability: remove it, do not patch.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / findings / items / properties / vulnerabilities / items / required
      Previous value: -[
      -  "id",
      -  "summary",
      -  "severity",
      -  "aliases",
      -  "publishedAt",
      -  "fixedVersion",
      -  "npmscanUrl"
      -]New value: +[
      +  "id",
      +  "summary",
      +  "severity",
      +  "aliases",
      +  "publishedAt",
      +  "fixedVersion",
      +  "isMalware",
      +  "npmscanUrl"
      +]
    • addedOutput schema / properties / overflowPackageCount
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / overflowVulnerablePackages
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "highestSeverity": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "isMalware": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "version": {
      +        "type": "string"
      +      },
      +      "vulnerabilityIds": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "version",
      +      "highestSeverity",
      +      "isMalware",
      +      "vulnerabilityIds"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / vulnerablePackageCount / description
      Added value: +"Vulnerable packages across every vulnerability-checked entry, not just `findings`."
    • changedOutput schema / required
      Previous value: -[
      -  "summary",
      -  "owner",
      -  "repoName",
      -  "ref",
      -  "defaultBranchUsed",
      -  "manifestPath",
      -  "lockfilePath",
      -  "inputFormat",
      -  "isMonorepo",
      -  "workspacePatterns",
      -  "workspacePackageCount",
      -  "workspaceNote",
      -  "policy",
      -  "findings",
      -  "overflowPackages",
      -  "totalPackages",
      -  "vulnerablePackageCount",
      -  "licenseViolationCount",
      -  "installScriptFlaggedCount",
      -  "deepScannedCount",
      -  "ownershipCheckedCount",
      -  "ownershipRiskFlaggedCount",
      -  "warnings",
      -  "truncationNote",
      -  "deepScanNote",
      -  "ownershipCheckNote"
      -]New value: +[
      +  "summary",
      +  "owner",
      +  "repoName",
      +  "ref",
      +  "defaultBranchUsed",
      +  "manifestPath",
      +  "lockfilePath",
      +  "inputFormat",
      +  "isMonorepo",
      +  "workspacePatterns",
      +  "workspacePackageCount",
      +  "workspaceNote",
      +  "policy",
      +  "findings",
      +  "coverage",
      +  "overflowPackages",
      +  "overflowPackageCount",
      +  "overflowVulnerablePackages",
      +  "totalPackages",
      +  "vulnerablePackageCount",
      +  "licenseViolationCount",
      +  "installScriptFlaggedCount",
      +  "deepScannedCount",
      +  "ownershipCheckedCount",
      +  "ownershipRiskFlaggedCount",
      +  "warnings",
      +  "truncationNote",
      +  "deepScanNote",
      +  "ownershipCheckNote"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / includePeerDependencies
      Added value: +{
      +  "description": "Include package.json peerDependencies (root and, for a monorepo, each workspace member) in the audit. Default false — a peer is often intentionally left unresolved by the consumer. See warnings for which peers were excluded.",
      +  "type": "boolean"
      +}
  4. Changed12 schema fields changed
    • addedOutput schema / properties / findings / items / properties / maintainerFindings
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "$ref": "#/properties/findings/items/properties/installScriptFindings/anyOf/0/items"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / findings / items / properties / maintainerRiskTier
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/properties/findings/items/properties/installScriptRiskTier/anyOf/0"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / findings / items / properties / ownershipRiskChecked
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / findings / items / properties / ownershipRiskEligible
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / findings / items / properties / ownershipRiskReason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "critical-or-high-severity-vulnerability",
      +        "possible-typosquat",
      +        "deprecated"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / findings / items / properties / provenanceFindings
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "$ref": "#/properties/findings/items/properties/installScriptFindings/anyOf/0/items"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / findings / items / properties / provenanceRiskTier
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/properties/findings/items/properties/installScriptRiskTier/anyOf/0"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / findings / items / required
      Previous value: -[
      -  "name",
      -  "requestedVersion",
      -  "resolvedVersion",
      -  "npmscanUrl",
      -  "deprecated",
      -  "possibleTyposquatOf",
      -  "isVulnerable",
      -  "highestSeverity",
      -  "vulnerabilities",
      -  "rawLicense",
      -  "licenseCategory",
      -  "isLicenseCompliant",
      -  "licenseNeedsReview",
      -  "licenseViolation",
      -  "hasLifecycleScripts",
      -  "installScriptRiskTier",
      -  "installScriptScore",
      -  "installScriptScanScope",
      -  "installScriptFindings",
      -  "resolutionError"
      -]New value: +[
      +  "name",
      +  "requestedVersion",
      +  "resolvedVersion",
      +  "npmscanUrl",
      +  "deprecated",
      +  "possibleTyposquatOf",
      +  "isVulnerable",
      +  "highestSeverity",
      +  "vulnerabilities",
      +  "rawLicense",
      +  "licenseCategory",
      +  "isLicenseCompliant",
      +  "licenseNeedsReview",
      +  "licenseViolation",
      +  "hasLifecycleScripts",
      +  "installScriptRiskTier",
      +  "installScriptScore",
      +  "installScriptScanScope",
      +  "installScriptFindings",
      +  "resolutionError",
      +  "ownershipRiskEligible",
      +  "ownershipRiskReason",
      +  "ownershipRiskChecked",
      +  "maintainerRiskTier",
      +  "maintainerFindings",
      +  "provenanceRiskTier",
      +  "provenanceFindings"
      +]
    • addedOutput schema / properties / ownershipCheckNote
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / ownershipCheckedCount
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / ownershipRiskFlaggedCount
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "summary",
      -  "owner",
      -  "repoName",
      -  "ref",
      -  "defaultBranchUsed",
      -  "manifestPath",
      -  "lockfilePath",
      -  "inputFormat",
      -  "isMonorepo",
      -  "workspacePatterns",
      -  "workspacePackageCount",
      -  "workspaceNote",
      -  "policy",
      -  "findings",
      -  "overflowPackages",
      -  "totalPackages",
      -  "vulnerablePackageCount",
      -  "licenseViolationCount",
      -  "installScriptFlaggedCount",
      -  "deepScannedCount",
      -  "warnings",
      -  "truncationNote",
      -  "deepScanNote"
      -]New value: +[
      +  "summary",
      +  "owner",
      +  "repoName",
      +  "ref",
      +  "defaultBranchUsed",
      +  "manifestPath",
      +  "lockfilePath",
      +  "inputFormat",
      +  "isMonorepo",
      +  "workspacePatterns",
      +  "workspacePackageCount",
      +  "workspaceNote",
      +  "policy",
      +  "findings",
      +  "overflowPackages",
      +  "totalPackages",
      +  "vulnerablePackageCount",
      +  "licenseViolationCount",
      +  "installScriptFlaggedCount",
      +  "deepScannedCount",
      +  "ownershipCheckedCount",
      +  "ownershipRiskFlaggedCount",
      +  "warnings",
      +  "truncationNote",
      +  "deepScanNote",
      +  "ownershipCheckNote"
      +]
  5. Changed5 schema fields changed
    • addedOutput schema / properties / isMonorepo
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / workspaceNote
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / workspacePackageCount
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / workspacePatterns
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "summary",
      -  "owner",
      -  "repoName",
      -  "ref",
      -  "defaultBranchUsed",
      -  "manifestPath",
      -  "lockfilePath",
      -  "inputFormat",
      -  "policy",
      -  "findings",
      -  "overflowPackages",
      -  "totalPackages",
      -  "vulnerablePackageCount",
      -  "licenseViolationCount",
      -  "installScriptFlaggedCount",
      -  "deepScannedCount",
      -  "warnings",
      -  "truncationNote",
      -  "deepScanNote"
      -]New value: +[
      +  "summary",
      +  "owner",
      +  "repoName",
      +  "ref",
      +  "defaultBranchUsed",
      +  "manifestPath",
      +  "lockfilePath",
      +  "inputFormat",
      +  "isMonorepo",
      +  "workspacePatterns",
      +  "workspacePackageCount",
      +  "workspaceNote",
      +  "policy",
      +  "findings",
      +  "overflowPackages",
      +  "totalPackages",
      +  "vulnerablePackageCount",
      +  "licenseViolationCount",
      +  "installScriptFlaggedCount",
      +  "deepScannedCount",
      +  "warnings",
      +  "truncationNote",
      +  "deepScanNote"
      +]
  6. Added

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly/openWorld/non-destructive), and the description adds substantial behavior beyond them: fetch order and lockfile fallback, monorepo merging (up to 50 members), concrete caps (3,000 entries, 100 detail packages, 10 tarball scans, 5 high-risk), how 'coverage.complete: false' / 'PARTIAL AUDIT' should be interpreted, and escalation/cost warnings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long, but the first sentence front-loads the purpose and the key architectural fact, and the remaining detail is organized under a 'What it checks' heading. The density is justified by the tool's complexity, though a few clauses about output fields could be trimmed since an output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity, multi-parameter tool with a nested policy object and an output schema, the description is complete: it explains coverage semantics, cap behavior, overflow handling, and cost so an agent can call it and interpret results responsibly even though return structure itself is delegated to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents ref, policy, includeDevDependencies and includePeerDependencies in detail. The description largely restates these (default branch vs ref, peer skip, default policy), adding only a small amount of meaning such as the pointer to warnings for excluded peers, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (audit) and resource (a GitHub repository's npm dependencies) with a defining constraint — it works from a URL with 'no pasted files needed'. This clearly distinguishes it from file-based and lower-level sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives strong usage context ('no pasted files needed', use a repo URL) and an explicit when-not ('the most expensive tool here — do not call it in a loop across many repos'). It references check_license_compliance for policy shape but never names an alternative tool for narrower single-concern queries, so routing guidance is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources