coldpin 0.0.0-stage → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ACCESSIBILITY.md +17 -0
- package/CHANGELOG.md +97 -0
- package/CONTRIBUTING.md +36 -0
- package/LICENSE +98 -0
- package/MAINTENANCE.md +33 -0
- package/README.md +142 -2
- package/SECURITY.md +34 -0
- package/TESTING.md +26 -0
- package/agents/coldpin-auditor.md +47 -0
- package/agents/coldpin-compliance.md +38 -0
- package/agents/coldpin-confusion-auditor.md +38 -0
- package/agents/coldpin-discoverer.md +37 -0
- package/agents/coldpin-forensics.md +38 -0
- package/agents/coldpin-inspector.md +37 -0
- package/agents/coldpin-manifest-auditor.md +38 -0
- package/assets/icon.svg +7 -0
- package/catalog/mcp-schema-pin.json +14 -0
- package/catalog/plugin.oms.sig +19 -0
- package/catalog/sigma/npx-suspicious-child-process-linux.yml +54 -0
- package/catalog/sigma/npx-suspicious-child-process.yml +49 -0
- package/catalog/triage-rules.json +104 -0
- package/docs/assets/readme-header.svg +21 -0
- package/docs/designs/SITEMAP.md +14 -0
- package/docs/designs/coldpin.md +68 -0
- package/docs/fact-ledger.md +36 -0
- package/docs/faq.md +31 -0
- package/docs/getting_started.md +62 -0
- package/docs/harnesses.md +45 -0
- package/docs/privacy.md +27 -0
- package/docs/verification/skill-inspector-self-audit.md +33 -0
- package/examples/.coldpin.policy.example.json +27 -0
- package/examples/.npmrc.example +8 -0
- package/examples/mcp_config.private-registry.example.json +42 -0
- package/hooks.json +47 -0
- package/lib/analysis/parity-and-bisect.mjs +1371 -0
- package/lib/analysis/static-triage.mjs +4572 -0
- package/lib/cache/sqlite-store.mjs +251 -0
- package/lib/cli.mjs +427 -0
- package/lib/compliance/audit-log.mjs +357 -0
- package/lib/config/policy.mjs +780 -0
- package/lib/core/path-confinement.mjs +289 -0
- package/lib/core/workflows.mjs +1205 -0
- package/lib/discovery/slopsquat-guard.mjs +289 -0
- package/lib/hook.mjs +1038 -0
- package/lib/intel/registry-osv.mjs +1681 -0
- package/lib/mcp/report-store.mjs +175 -0
- package/lib/mcp/server.mjs +1387 -0
- package/lib/mcp/stdio-transport.mjs +289 -0
- package/lib/mcp/tool-catalog.mjs +273 -0
- package/lib/mcp/types.mjs +95 -0
- package/lib/mcp.mjs +19 -0
- package/lib/quarantine/safe-unpack.mjs +568 -0
- package/lib/types.mjs +383 -0
- package/lib/verdict/engine-and-formatters.mjs +895 -0
- package/mcp_config.json +21 -0
- package/package.json +71 -3
- package/plugin.json +54 -0
- package/rules/AGENTS.md +18 -0
- package/rules/coldpin-incident-checklist.md +18 -0
- package/rules/coldpin-manifest-guard.md +14 -0
- package/server.json +38 -0
- package/skills/coldpin/BENCHMARK.md +166 -0
- package/skills/coldpin/SKILL.md +110 -0
- package/skills/coldpin/TEST.md +13 -0
- package/skills/coldpin/agents/openai.yaml +6 -0
- package/skills/coldpin/assets/icon.svg +7 -0
- package/skills/coldpin/assets/runtime-contract.yaml +105 -0
- package/skills/coldpin/evals/evals.json +60 -0
- package/skills/coldpin/references/aspect-compliance-audit.md +27 -0
- package/skills/coldpin/references/aspect-discovery.md +26 -0
- package/skills/coldpin/references/aspect-forensics-rea.md +26 -0
- package/skills/coldpin/references/aspect-inspection.md +26 -0
- package/skills/coldpin/references/aspect-manifest-confusion.md +26 -0
- package/skills/coldpin/references/enterprise-policy-schema.md +65 -0
- package/skills/coldpin/references/evidence-card-spec.md +27 -0
- package/skills/coldpin/references/rea-integration-playbook.md +34 -0
- package/skills/coldpin/references/threat-taxonomy.md +35 -0
- package/skills/coldpin/skill-card.md +62 -0
- package/skills/coldpin/skill.oms.sig +19 -0
- package/skills/coldpin/test_scenarios.yaml +61 -0
- package/skills/coldpin-audit/SKILL.md +39 -0
- package/skills/coldpin-incident/SKILL.md +37 -0
- package/src/analysis/parity-and-bisect.ts +1368 -0
- package/src/analysis/static-triage.ts +4569 -0
- package/src/cache/sqlite-store.ts +248 -0
- package/src/cli.ts +424 -0
- package/src/compliance/audit-log.ts +354 -0
- package/src/config/policy.ts +777 -0
- package/src/core/path-confinement.ts +286 -0
- package/src/core/workflows.ts +1202 -0
- package/src/discovery/slopsquat-guard.ts +286 -0
- package/src/hook.ts +1035 -0
- package/src/intel/registry-osv.ts +1678 -0
- package/src/mcp/report-store.ts +172 -0
- package/src/mcp/server.ts +1384 -0
- package/src/mcp/stdio-transport.ts +286 -0
- package/src/mcp/tool-catalog.ts +270 -0
- package/src/mcp/types.ts +92 -0
- package/src/mcp.ts +16 -0
- package/src/quarantine/safe-unpack.ts +565 -0
- package/src/types.ts +380 -0
- package/src/verdict/engine-and-formatters.ts +892 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coldpin-audit
|
|
3
|
+
description: >-
|
|
4
|
+
Run an end-to-end read-only workspace supply-chain audit using Coldpin's
|
|
5
|
+
aspect subagents: batch-screen package.json dependencies, audit .npmrc for
|
|
6
|
+
dependency confusion (T1195.001), verify policy posture and hash-chained
|
|
7
|
+
audit.jsonl logs, and cold-inspect any flagged packages without execution.
|
|
8
|
+
license: Apache-2.0
|
|
9
|
+
metadata:
|
|
10
|
+
version: "1.5.1"
|
|
11
|
+
author: "hynko431"
|
|
12
|
+
tags:
|
|
13
|
+
- npx
|
|
14
|
+
- npm
|
|
15
|
+
- supply-chain-audit
|
|
16
|
+
- dependency-confusion
|
|
17
|
+
- compliance
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Coldpin Workspace Supply-Chain Audit (`/coldpin-audit`)
|
|
21
|
+
|
|
22
|
+
Orchestrates a deterministic, strictly read-only audit of the current workspace's npm supply-chain posture without executing any package manager install or lifecycle script.
|
|
23
|
+
|
|
24
|
+
## Execution Workflow
|
|
25
|
+
|
|
26
|
+
1. **Read Policy Posture:** Query `coldpin://policy/active` to confirm active `policy_sha256`, `private_scopes`, `private_prefixes`, `denied_orgs`, and `offline_mode`.
|
|
27
|
+
2. **Run Parallel Read-Only Aspect Audits:**
|
|
28
|
+
- **Manifest & Lockfile Batch (`coldpin-manifest-auditor`):** Call `audit_manifest_batch` on workspace `package.json` (`<= 50` direct dependencies), check `truncated_at_cap`, and page flagged items via `get_artifact_report`.
|
|
29
|
+
- **Dependency Confusion (`coldpin-confusion-auditor`):** Call `verify_confusion` on workspace `package.json` and `.npmrc` to flag unpinned private scopes, unscoped internal prefixes (`T1195.001`), and 1-edit private-scope lookalikes.
|
|
30
|
+
- **Governance & Audit Trail (`coldpin-compliance`):** If a root-confined `audit.jsonl` exists, call `audit_verify` to confirm SHA-256 sequence integrity and capture policy/SBOM/SARIF readiness.
|
|
31
|
+
3. **Escalate Flagged Dependencies Cold (`coldpin-inspector`):** For every `MALICIOUS_OR_BLOCKED` or `FLAGGED_SUSPICIOUS` dependency returned above, run `inspect_package_artifact` cold in memory (`detail: "summary"`, paging with `get_artifact_report` if needed).
|
|
32
|
+
4. **Trigger Incident Recovery If Compromised:** If any dependency returns `MALICIOUS_INDICATORS_FOUND` or `local_workspace_compromised`, immediately hand off to `/coldpin-incident` (`coldpin-forensics`).
|
|
33
|
+
|
|
34
|
+
## Hard Invariants
|
|
35
|
+
- Strictly read-only: zero shell execution, zero file writes, zero `npm install` or unvetted `npx`.
|
|
36
|
+
- Never send private scopes or denied orgs to public `registry.npmjs.org` or `api.osv.dev`.
|
|
37
|
+
- Present unified `Title + Info + Evidence` summary with Observations, Inferences, Unknowns, defanged IOCs, and prioritized remediations.
|
|
38
|
+
|
|
39
|
+
*Engineering guidance, not legal, medical or financial advice; confirm decisions with qualified counsel.*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coldpin-incident
|
|
3
|
+
description: >-
|
|
4
|
+
Run a read-only npm supply-chain compromise response workflow with Coldpin:
|
|
5
|
+
halt unvetted execution, bisect Git history to locate patient-zero and a clean
|
|
6
|
+
rollback anchor or vetted alternative, guide lockfile containment and token
|
|
7
|
+
rotation, and prepare REA Tier-2 escalation without self-bootstrapping.
|
|
8
|
+
license: Apache-2.0
|
|
9
|
+
metadata:
|
|
10
|
+
version: "1.5.1"
|
|
11
|
+
author: "hynko431"
|
|
12
|
+
tags:
|
|
13
|
+
- incident-response
|
|
14
|
+
- supply-chain-security
|
|
15
|
+
- forensics
|
|
16
|
+
- safe-anchor
|
|
17
|
+
- rea
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Coldpin Supply-Chain Incident Response (`/coldpin-incident`)
|
|
21
|
+
|
|
22
|
+
Guides rapid, strictly read-only containment, root-cause bisect, clean-anchor recovery, and compliance evidence capture when Coldpin flags `MALICIOUS_INDICATORS_FOUND`, `local_workspace_compromised`, tarball-to-source drift, or tampered SLSA provenance.
|
|
23
|
+
|
|
24
|
+
## Execution Workflow
|
|
25
|
+
|
|
26
|
+
1. **Immediate Containment Gate:** Confirm zero execution of the affected package or lockfile. Keep every extracted URL, domain, IP, and webhook strictly defanged (`hxxp://`, `[.]`).
|
|
27
|
+
2. **Cold Artifact & Parity Evidence (`coldpin-inspector`):** If not already captured, run `inspect_package_artifact` (`detail: "summary"`, paging `observations`/`iocs`/`unknowns` via `get_artifact_report`) to preserve the deterministic verdict, SHA-512 digest, and `rea_escalation_plan`.
|
|
28
|
+
3. **Patient-Zero Bisect & Safe Anchor (`coldpin-forensics`):** Run `resolve_safe_anchor` against the package's local Git directory or HTTPS `repo_url` (`--first-parent`, `window <= 200`) to pinpoint the compromise commit and emit `ROLLBACK_TO_SAFE_ANCHOR`, `FORENSIC_COMMIT_ONLY`, `SWITCH_TO_ALTERNATIVE`, or `BLOCK_NO_SAFE_PATH`.
|
|
29
|
+
4. **Audit Trail & Regulatory Clocks (`coldpin-compliance`):** Verify local `audit.jsonl` integrity via `audit_verify`, export SARIF/SBOM evidence via `get_artifact_report`, and surface applicable notification windows (India CERT-In `6 h`, EU NIS2/CRA `24 h` / `72 h`, GDPR Art. 33 `72 h`) for legal/IR counsel.
|
|
30
|
+
5. **REA Tier-2 Escalation (Only When Pre-Installed):** If obfuscated JS, native `.node`, WASM, or drifted binaries require decompilation, invoke pre-registered `rea` / `rea-agents` only—never run `rea-agents` via `npx`.
|
|
31
|
+
|
|
32
|
+
## Hard Invariants
|
|
33
|
+
- Never recommend `@latest` or unvetted package execution during incident response.
|
|
34
|
+
- Never overwrite Coldpin verdicts or fabricate clean rollback versions when no verified tarball passes CVE/KEV gates.
|
|
35
|
+
- Advise immediate credential rotation and host IR review of shell startup profiles, scheduled tasks, OS launch entries, and `catalog/sigma/` EDR rules.
|
|
36
|
+
|
|
37
|
+
*Engineering guidance, not legal, medical or financial advice; confirm decisions with qualified counsel.*
|