Stop. Check Every Package.
Before You Install It.

Every AI coding agent - Claude Code, Cursor, Copilot, Windsurf installs packages blindly. A single npm install can compromise your environment. You need threat intelligence.

safedep · pre-install security check
live
checking

$ lodash@4.17.21

ecosystem: npm

inference.isMalware
false
verified.isMalware
false
confidence
HIGH

✓ safe · proceed with install

checking

$ event-stream@3.3.6

ecosystem: npm

inference.isMalware
true
verified.isMalware
true
confidence
HIGH

⊘ blocked · malicious package

Packages Scanned
20M+
Components Analysed
500K+
Projects Secured
5000+
Threats Blocked
80%
Risk Context

Why Agent Dependency Decisions Need Guardrails

  1. Fast Code, Fast Risk

    Agents generate and run commands quickly. Bad dependency suggestions propagate just as quickly.

  2. Install Is an Execution Step

    npm install and pip install execute untrusted third-party code paths.

  3. One Bad Package Is Enough

    A single compromised package can exfiltrate secrets, tamper builds, or persist in CI and developer hosts.

Threat Intelligence Built forAutomated Decisions

Query any package before install. SafeDep returns machine inference plus human verification signals so agents can make safe decisions automatically.

safedep-check · lodash@4.17.21

# agent pre-install hook

POST api.safedep.io/QueryPackageAnalysis

"ecosystem": "ECOSYSTEM_NPM"

"name": "lodash"

"version": "4.17.21"

→ 200 OK · 42ms

Step 01 · How it works

Query SafeDepBefore Every Install

Before running npm install, pip install, or any lockfile update, your agent calls the SafeDep API. One POST. Milliseconds. No workflow change.

signal evaluation · event-stream@3.3.6
report.inference.isMalware
true
report.inference.confidence
HIGH
verificationRecord.isMalware
true
⊘ BLOCK INSTALL
both signals positive
Step 02 · How it works

Dual-Signal EvaluationMachine + Human

SafeDep returns two independent signals: AI inference over the package source, and a human-verified record. Your agent reads both. Neither alone is enough to clear an install.

decision contract
  1. Block if inference.isMalware === true
  2. Block if verificationRecord.isMalware === true
  3. Block if API fails, times out, or returns invalid JSON
  4. Proceed only when both signals are explicitly false
Step 03 · How it works

Fail Closed.Always.

Proceed only when both signals are explicitly false. If SafeDep is unreachable, times out, or returns partial data — block and ask the human. Unknown is not safe.

Agent Setup

Configure SafeDep Access

  1. Ask your human to sign up

    app.safedep.io(opens in new tab)
    Your human creates the SafeDep account and tenant.

  2. Human admin generates credentials

    Human admin provides SAFEDEP_TENANT_ID and SAFEDEP_API_KEY to agent config.

  3. Add SafeDep to your client

    Use SKILL.md or MCP Config, then enforce decision contract before installs.

Required Credentials

SAFEDEP_TENANT_ID
from your human
SAFEDEP_API_KEY
from your human

Credentials must come from your human via app.safedep.io(opens in new tab).

markdown
---
name: safedep-security
description: Query SafeDep before adding or installing dependencies.
---

# SafeDep Security Policy

Before install or lockfile updates, call:
POST https://api.safedep.io/safedep.services.malysis.v1.MalwareAnalysisService/QueryPackageAnalysis

Headers:
  Authorization: $SAFEDEP_API_KEY
  X-Tenant-ID: $SAFEDEP_TENANT_ID
  Content-Type: application/json

Decision contract:
- If report.inference.isMalware == true: take confirmation from human before install
- If verificationRecord.isMalware == true: block install and notify human
- If SafeDep request fails, times out, or returns invalid response: block install and ask human
- Proceed only when both malware signals are explicitly false
API Integration

API Quickstart

Call SafeDep before install actions. Apply the decision contract directly in your agent runtime.

  • Simple REST API
  • API key authentication
  • JSON request/response
typescript
const response = await fetch(
  'https://api.safedep.io/safedep.services.malysis.v1.MalwareAnalysisService/QueryPackageAnalysis',
  {
    method: 'POST',
    headers: {
      Authorization: process.env.SAFEDEP_API_KEY!,
      'X-Tenant-ID': process.env.SAFEDEP_TENANT_ID!,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      target: {
        package_version: {
          package: { ecosystem: 'ECOSYSTEM_NPM', name: 'lodash' },
          version: '4.17.21',
        },
      },
    }),
  }
);

if (!response.ok) {
  throw new Error('SafeDep unavailable: block install and ask human');
}

const result = await response.json();
const inferred = result.report?.inference?.isMalware === true;
const verified = result.verificationRecord?.isMalware === true;

if (inferred || verified) {
  throw new Error('Malicious package detected: do not install');
}

// Safe to proceed when both checks are explicitly false.

Open Source by Default

Core SafeDep tooling is public. Teams can inspect behaviour and validate integrations independently.

Inspectable Security Decisions

Agent policy is explicit: evaluate inference and verification signals before install, fail closed on uncertainty.

Portable, Not Opaque

Use SafeDep APIs with OSS tools in your own workflows. Reproduce and verify checks independently.

Adopt Safe Defaults
For Agent Installs

Query, evaluate both signals, and fail closed when uncertain. Start free — no credit card required.