Skip to the content.

Admin runbook

Operational guide for running pullthrough-security in production: startup, health, monitoring, the admin surface, routine tasks, and incident response. For deployment mechanics (Docker/Helm/k8s) see ../deploy/README.md.

The binary

pullthrough -config /etc/pullthrough/config.yaml

Command-line flags:

Flag Purpose
-config <path> Path to the YAML config file.
-version Print the version and exit.
-verify-audit <path> Verify the tamper-evidence of an audit log and exit (see Audit).
-audit-key <string> HMAC key for -verify-audit (defaults to $PTS_AUDIT_HMAC_KEY).

Configuration is validated at startup; on a config error the process exits non-zero with a descriptive message and serves nothing. Use this for a pre-deploy config check.

Startup checklist

Health & readiness

Always served at the root, regardless of observability:

Endpoint Behavior Use
GET /healthz 200 ok always (process is up). Liveness probe.
GET /readyz 200 ready when ≥1 backend is registered; 503 no backends registered otherwise. Readiness/rollout gate.
curl -fsS localhost:8080/healthz
curl -fsS localhost:8080/readyz

Metrics

Prometheus exposition at observability.metricsPath (default /metrics). The full metric reference, the four shipped Grafana dashboards, and the 24 Prometheus alerting rules (with import/deploy instructions for Compose, Helm, and kustomize) are documented in observability.md; the bundle lives in ../deploy/observability/. The highlights below are the metrics operators reach for most.

Request / upstream:

Cache:

Scanning:

Suggested alerts

A ready-to-deploy rule file with 36 alerts (availability, cache/S3 errors, supply-chain, rate-limit, notify) ships in ../deploy/observability/prometheus/alerts.yaml — see the alert catalogue. The table below is the at-a-glance subset.

Condition Signal Likely cause
Upstream failing rate(pullthrough_upstream_errors_total[5m]) > 0 sustained Upstream down, creds expired, egress blocked.
Blocks spiking rate(pullthrough_policy_decisions_total{action="block"}[5m]) jump Malicious dependency surge, or policy too strict.
Scan backlog pullthrough_scan_pending climbing LLM throttling/outage, too few commit.workers.
Cache thrash pullthrough_cache_hit_ratio dropping Cache too small (maxSizeBytes) or TTL too low.
Readiness flapping /readyz 503 No backends registered → config/wiring error.

Admin dashboard & API

Mounted under observability.adminPathPrefix (default /admin); the browser dashboard is at <prefix>/, the JSON API under <prefix>/api/. Guard it with observability.adminToken (Bearer) and/or network policy — the dashboard shell loads unauthenticated so a browser can prompt, but the API requires the token.

Endpoint Purpose
GET <prefix>/api/overview Config summary, cache stats, scan/provenance counters.
GET <prefix>/api/policy Effective policy configuration.
GET <prefix>/api/cache List cache entries (q search, limit).
GET <prefix>/api/cache/entry?key= Single cache entry metadata.
DELETE <prefix>/api/cache/entry?key= Evict a cache entry.
GET <prefix>/api/scans Verdicts (highest risk first) + queue depth.
GET <prefix>/api/scans/entry?sha= Single commit verdict.
GET <prefix>/api/provenance?ecosystem=&name=&version=&digest= Resolve an artifact’s provenance.
GET <prefix>/api/provenance/links Established package→commit links with verdicts.
curl -fsS -H "Authorization: Bearer $PTS_ADMIN_TOKEN" \
  localhost:8080/admin/api/overview | jq .

The dashboard shows cache stats (hit ratio, evictions), scan verdicts (SHA, risk score, malicious flag, findings), and provenance links (package, version, commit, repo, confidence).

Audit log

When audit.enabled, every pull (with cache HIT/MISS/BYPASS, status, bytes) and every authz/quota/policy decision is appended to a keyed hash chain at audit.file. Verify integrity any time — runnable from cron/CI:

pullthrough -verify-audit /var/lib/pullthrough/audit/audit.log \
  -audit-key "$PTS_AUDIT_HMAC_KEY"
# verify-audit: OK — 12345 records form an intact tamper-evident chain

It exits non-zero and names the first broken record on tampering. The chain resumes across restarts. The log is integrity-protected, not encrypted, and contains no secrets. See access-control-and-audit.md.

Routine operations

Rotating secrets

Cache management

Forcing re-scan of a commit

Verdicts are cached by SHA in commit.storeDir. To re-evaluate after a model or policy change, remove that commit’s verdict from the store (or clear the store to re-scan all on next pull). A commit with no stored verdict is treated per policy … onMissingScan until the async scan completes.

Upgrades & rollback

Images are immutable-tagged. With Helm: helm upgrade for a rolling update (maxUnavailable: 0, PDB, config-checksum-triggered restart), helm rollback to revert. Cache/state persist across upgrades on the PVC. See ../deploy/README.md.

Scaling

For horizontal, multi-node scaling the recommended approach is the shared object-storage cache (cache.backend: s3): all replicas share one cache in an S3/MinIO/GCS bucket, so they are stateless with respect to the cache and you can raise replicaCount/the HPA without a ReadWriteMany volume. See ha-shared-cache.md for the full guide; manage cache retention with a bucket lifecycle policy (leave maxSizeBytes: 0).

Without the shared backend, the default ReadWriteOnce cache PVC can’t be shared across nodes — use a ReadWriteMany StorageClass or accept node-pinned replicas (each maintains an independent cache). Optionally set auth.cacheNamespacing: true to partition cache by tenant. The Git SSH gateway needs its own Service (it can’t share the HTTP ingress).

Incident response

For the full, step-by-step incident procedures — responding to a quarantine/break-glass event, engaging and clearing the emergency lockdown kill-switch, interpreting the risk verdict and compliance scorecard, DR backup/restore, rotating signing keys and OIDC secrets, and handling a malware-feed hit — each with decision trees and the RBAC role required per action, see the operator runbook & incident-response playbook. The quick responses below cover the most common cases.

A malicious package is being pulled

  1. Confirm via the admin API: GET /admin/api/scans (high risk / malicious) and GET /admin/api/provenance/links for affected artifacts.
  2. Block immediately: add the name to policy.ecosystems.<eco>.denylist (or raise enforcement) and roll out — denied pulls return 403 and never cache/fetch.
  3. Evict any already-cached copy: DELETE /admin/api/cache/entry?key=.
  4. Audit the blast radius from the audit log (who pulled it, when).

Upstream is down or rate-limiting

Suspected tampering

Policy is too strict (false positives blocking builds)

Quick reference

# Health
curl -fsS localhost:8080/healthz && curl -fsS localhost:8080/readyz
# Smoke test a backend
curl -fsS localhost:8080/v1/npm/lodash | head
# Overview (admin)
curl -fsS -H "Authorization: Bearer $PTS_ADMIN_TOKEN" localhost:8080/admin/api/overview | jq .
# Verify audit chain
pullthrough -verify-audit "$AUDIT_LOG" -audit-key "$PTS_AUDIT_HMAC_KEY"