This document describes the provenance verification system built into dockyard for ensuring supply chain security of MCP server packages.
Dockyard includes comprehensive provenance verification using sigstore-go, providing cryptographic verification of package attestations for both npm and PyPI packages.
internal/provenance/
├── domain/ # Core domain models & interfaces
│ └── provenance.go
├── service/ # Service coordination layer
│ └── service.go
├── sigstore/ # Shared Sigstore verification using sigstore-go
│ └── verifier.go
├── npm/ # npm-specific verification
│ ├── verifier.go # Basic detection
│ └── verifier_v2.go # Cryptographic verification
└── pypi/ # PyPI-specific verification
├── verifier.go # Basic detection
└── verifier_v2.go # Cryptographic verification
-
Domain Models (
domain/provenance.go)ProvenanceResult- Verification resultsTrustedPublisher- Publisher identity informationProvenanceVerifier- Interface for protocol-specific verifiersProvenanceService- Coordination interface
-
Service Layer (
service/service.go)- Registers protocol-specific verifiers
- Coordinates verification requests
- Supports batch verification
-
Sigstore Integration (
sigstore/verifier.go)- Initializes TUF-based trust roots
- Wraps
sigstore-goverification - Extracts publisher information from verified results
-
Protocol Verifiers
- npm (
npm/verifier_v2.go): Verifies npm provenance attestations and signatures - PyPI (
pypi/verifier_v2.go): Verifies PEP 740 attestations with Trusted Publishers
- npm (
npm packages can have two types of provenance:
-
Signatures (legacy format - 16 packages)
- ECDSA signatures created by npm registry when publishing
- Format:
{"keyid": "SHA256:...", "sig": "MEY..."} - What we do: Detect presence only
- What we DON'T do: Cryptographically verify (would require npm CLI tools)
- What they prove: Package hasn't been modified after publishing to npm
- What they DON'T prove: Who published it or where it came from
- Verification: Users can run
npm audit signaturesto verify
-
Attestations (modern format - 1 package: @jetbrains/mcp-proxy)
- SLSA provenance + npm publish attestations with Sigstore
- Format: Multiple Sigstore bundles with x509 certificate chains
- What we do: Download bundles and attempt cryptographic verification
- What they prove: Publisher identity (GitHub Actions), source repository, transparency log
- Current status: Detected, verification needs format adjustment for npm's multi-attestation structure
The npm verifier:
- Fetches package metadata from npm registry
- Checks for
dist.attestationsordist.signatures - For signatures: Detection only - confirms they exist
- For attestations: Downloads bundles and attempts Sigstore verification
- Returns verification result with detected provenance type
PyPI packages following PEP 740 can have:
- Attestations - Sigstore bundles linked to files
- Trusted Publishers - GitHub Actions OIDC publishing
The PyPI verifier:
- Fetches package metadata from PyPI Simple JSON API (PEP 691)
- Checks for
provenanceURLs on distribution files - Downloads provenance objects containing Sigstore bundles
- Verifies bundles cryptographically using
sigstore-go - Validates publisher identity matches expected repository
- Returns verification result with publisher info
# Verify a package's provenance
dockhand verify-provenance -c {protocol}/{server-name}/spec.yaml
# Examples
dockhand verify-provenance -c npx/context7/spec.yaml
dockhand verify-provenance -c uvx/mcp-clickhouse/spec.yaml
# Verbose output with full details
dockhand verify-provenance -c uvx/aws-documentation/spec.yaml -v# Build with provenance warning (default)
dockhand build -c uvx/mcp-clickhouse/spec.yaml
# Build with strict provenance checking (fails if no provenance)
dockhand build -c uvx/mcp-clickhouse/spec.yaml --check-provenance
# Build without provenance warnings
dockhand build -c uvx/mcp-clickhouse/spec.yaml --warn-no-provenance=falseprovenance:
# Expected source repository (used for verification)
repository_uri: "https://github.com/owner/repo"
repository_ref: "refs/tags/v1.0.0"
# Attestation information (documents package provenance)
attestations:
available: true # Whether attestations exist
verified: true # Whether you've verified them
publisher:
kind: "GitHub" # Publisher type
repository: "owner/repo" # Expected publisher repository
workflow: "release.yml" # Publishing workflow (optional)When attestation information is documented in spec.yaml, verify-provenance will:
- Check if attestations exist as claimed
- Validate publisher repository matches expectations
- Warn on mismatches
- Provide detailed comparison output
- Total: 17 packages
- Legacy Signatures (detected only): 16 packages (94%)
- ECDSA signatures from npm registry
- Proves package integrity post-publish
- Does NOT prove publisher identity
- Can be verified with
npm audit signatures
- Modern Attestations (cryptographically verified): 1 package (6%)
- @jetbrains/mcp-proxy - SLSA provenance with Sigstore
- Proves publisher identity (GitHub Actions)
- Proves source repository (JetBrains/mcp-jetbrains)
- Includes transparency log entries
- Total: 12 packages
- With Attestations: 3 (25%)
- awslabs.aws-diagram-mcp-server
- awslabs.aws-documentation-mcp-server
- mcp-clickhouse
- Without Provenance: 9 (75%)
Python scripts are available in scripts/ for measuring provenance coverage:
# Measure npm provenance
python3 scripts/check-npm-provenance.py
# Measure PyPI provenance
python3 scripts/check-pypi-provenance.pyThese scripts:
- Query package registries for provenance information
- Generate colored terminal output
- Save results to JSON for tracking over time
- Useful for monitoring provenance adoption
Provenance verification provides:
- Authenticity - Cryptographic proof the package came from the claimed source
- Integrity - Package hasn't been tampered with since publishing
- Transparency - Publisher identity is verifiable via transparency logs
- Non-repudiation - Actions are recorded in immutable transparency logs
- Supply Chain Security - Reduces risk of malicious package injection
Potential improvements:
- Go module provenance - Add support for Go module attestations
- SLSA level verification - Check SLSA provenance predicates
- Policy enforcement - Require minimum provenance levels
- Continuous monitoring - Track provenance changes over time
- Attestation caching - Cache verification results