# npm & PyPI Vulnerability Scanner – Dependency Risk Audit (`lokieee0/package-intel`) Actor

For developers, security & compliance teams: paste a package.json, requirements.txt or Cargo.toml and get known CVEs (OSV) at your exact pinned versions with CVSS scores, malware advisories, licenses, maintainer & abandonment risk for every npm, PyPI and crates.io dependency.

- **URL**: https://apify.com/lokieee0/package-intel.md
- **Developed by:** [maraa k](https://apify.com/lokieee0) (community)
- **Categories:** Developer tools, Automation, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 package analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Package Intel: npm, PyPI & crates.io metadata, vulnerabilities and supply-chain risk

Check any open-source package, or **paste a whole `package.json`, `requirements.txt` or `Cargo.toml`**, and get a risk report for every dependency: **known vulnerabilities at your exact pinned version**, malware advisories, maintenance health, license and adoption.

For developers and DevSecOps teams checking dependencies before adoption, security reviews, M\&A or vendor due diligence, and open-source researchers.

### What you get per package

- **Vulnerabilities** from [OSV.dev](https://osv.dev) (GitHub Advisories, PyPA, RustSec…) **for the exact version you use**, with severity, CVSS score, CVE aliases, the versions that fix them, and links.
- **Known malware**: versions flagged by OSV `MAL-` advisories (e.g. the flatmap-stream backdoor) are rated **critical**.
- **Supply-chain flags**: install scripts (`preinstall`/`postinstall`), brand-new packages (typosquat risk), single maintainer, deprecated, yanked versions, no license or a copyleft license, no source repo, unmaintained (no release in 2+ years), low adoption.
- **Metadata**: latest version, weekly/monthly downloads, maintainers, license, release dates, repository, homepage.
- A **risk score (0–100)** and a **risk level** (low / medium / high / critical).

### Accurate counts and severities

- **Duplicates merged.** OSV often lists the same issue as both `GHSA-…` and `PYSEC-…`. Advisories sharing a CVE or alias are merged, so *5 vulnerabilities* really means 5.
- **Severity always filled in.** When an advisory has only a CVSS vector, the actor computes the score with the official CVSS 3.1 formula (validated against reference scores).
- **No false malware alarms.** Ordinary advisories that say "a malicious user can…" are *not* flagged as malware.

### Input

```json
{ "packages": ["npm:lodash@4.17.15", "pypi:requests==2.19.0", "crates:serde", "react"] }
```

or

```json
{ "dependencyFile": "{ \"dependencies\": { \"express\": \"4.17.1\", \"axios\": \"0.21.0\" } }" }
```

Exact pins are checked at that version. Ranges like `^1.2.0` or `>=2` are checked at the latest version (`requestedVersion: null`).

### Output (abridged)

```json
{
  "ecosystem": "npm", "name": "axios", "checkedVersion": "0.21.0", "latestVersion": "1.13.2",
  "riskLevel": "high", "riskScore": 100, "vulnerabilityCount": 25, "suggestedUpgrade": "1.13.2",
  "vulnerabilities": [{ "id": "GHSA-…", "severity": "HIGH", "cvssScore": 7.5, "aliases": ["CVE-…"], "fixedIn": ["0.21.1"], "url": "https://osv.dev/vulnerability/GHSA-…" }],
  "flags": [{ "flag": "high-vulnerability", "severity": "high", "detail": "…" }],
  "weeklyDownloads": 147349771, "license": "MIT", "maintainers": ["…"], "daysSinceLastRelease": 12
}
```

Use the **"One row per vulnerability"** view for a flat CVE list. Add `onlyRisky: true` to fail CI or alert only when something matters.

### How to use it

1. Either list packages (`npm:lodash@4.17.15`, `pypi:requests==2.19.0`, `crates:serde`) or paste a whole `package.json`, `requirements.txt` or `Cargo.toml` into **Dependency file**.
2. Turn on **Only risky** if you just want what needs action.
3. Click **Start**.
4. Open **Overview** for a risk level per package, or **Vulnerabilities** for one row per CVE with the fixed version.

### How much does it cost?

You pay **$2 per 1,000 packages** returned, with no subscription and no separate compute charges. Filters that drop rows mean you don't pay for those rows.

| You process | Typical use | Cost |
|---|---|---|
| 100 packages | one project's dependencies | **$0.20** |
| 1,000 packages | a monorepo or a security review | **$2** |
| 10,000 packages | a portfolio-wide audit | **$20** |

Apify's free plan includes monthly credit, which is enough to try this actor on a real list before you pay anything.

### Use it from code or your tools

Run it from **Make, Zapier, n8n, Google Sheets, Slack, webhooks** or any language through the [Apify API](https://docs.apify.com/api/v2).

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("lokieee0/package-intel").call(run_input={
    "dependencyFile": "{\"dependencies\":{\"express\":\"4.17.1\",\"axios\":\"0.21.0\"}}",
    "onlyRisky": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('lokieee0/package-intel').call({"dependencyFile": "{\"dependencies\":{\"express\":\"4.17.1\",\"axios\":\"0.21.0\"}}", "onlyRisky": true});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**cURL** (run and get results in one request)

```bash
curl -X POST "https://api.apify.com/v2/acts/lokieee0~package-intel/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"dependencyFile": "{\"dependencies\":{\"express\":\"4.17.1\",\"axios\":\"0.21.0\"}}", "onlyRisky": true}'
```

### FAQ

**Where does the vulnerability data come from?**
OSV.dev, which combines GitHub Security Advisories, PyPA, RustSec and more. Duplicate advisories are merged, and missing CVSS scores are calculated from the vector.

**Can I use it in CI?**
Yes. Call it from GitHub Actions or any CI through the API with `onlyRisky: true`, and fail the build if the dataset isn't empty.

**Does it detect malicious packages?**
Yes. Versions flagged by OSV malware (`MAL-`) advisories are rated critical, along with install scripts, typosquat-age packages and single-maintainer risk.

**Can I schedule it or connect it to other apps?**
Yes. Use Apify **Schedules** for recurring runs, and **Integrations** to send results to Google Sheets, Slack, email, Zapier, Make, n8n or a webhook.

**Something didn't work or a field is missing?**
Open an issue on the **Issues** tab. Reports are usually fixed within a few days, and feature requests are welcome.

### More tools from the same developer

- [SPF, DKIM & DMARC checker with a 0–100 score and exact DNS fixes](https://apify.com/lokieee0/email-auth-auditor)
- [Find businesses with outdated websites, with a ready-to-send pitch](https://apify.com/lokieee0/website-redesign-auditor)
- [Jobs from Greenhouse, Lever, Ashby & 4 more ATS in one format](https://apify.com/lokieee0/ats-jobs-scraper)
- [Bulk SSL expiry & security headers scanner with A–F grades](https://apify.com/lokieee0/ssl-security-scanner)
- [Emails, phones & social profiles from any list of websites](https://apify.com/lokieee0/website-contact-extractor)
- [Detect 130+ technologies (CMS, Shopify, analytics, hosting) on any site](https://apify.com/lokieee0/tech-stack-detector)
- [Bulk GitHub repo stats with a 0–100 health score](https://apify.com/lokieee0/github-repo-intel)
- [Search, scrape & monitor Hacker News without the 1,000-result limit](https://apify.com/lokieee0/hacker-news-scraper)
- [Crawl a website for broken links, meta tag, redirect & sitemap issues](https://apify.com/lokieee0/seo-site-auditor)

# Actor input Schema

## `packages` (type: `array`):

One per line: name, name@version (npm) or name==version (pip). Prefix with npm:, pypi: or crates: to choose the registry, e.g. npm:lodash@4.17.15, pypi:requests==2.19.0, crates:serde. Without a version, the latest is checked.

## `dependencyFile` (type: `string`):

Paste a package.json, requirements.txt or Cargo.toml. Every dependency is audited. Exact pins (4.17.1, ==2.19.0) are checked at that version; ranges (^1.2, >=2) are checked at the latest version.

## `defaultEcosystem` (type: `string`):

Used for package names without an npm:/pypi:/crates: prefix.

## `onlyRisky` (type: `boolean`):

Skip packages with low risk. Good for CI and monitoring.

## `concurrency` (type: `integer`):

Packages analyzed in parallel.

## `maxItems` (type: `integer`):

Stop after this many results, which caps the cost of the run.

## Actor input object example

```json
{
  "packages": [
    "npm:lodash@4.17.15",
    "pypi:requests==2.19.0",
    "crates:serde"
  ],
  "defaultEcosystem": "npm",
  "onlyRisky": false,
  "concurrency": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `vulnerabilities` (type: `string`):

No description

## `allResults` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "packages": [
        "npm:lodash@4.17.15",
        "pypi:requests==2.19.0",
        "crates:serde"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lokieee0/package-intel").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "packages": [
        "npm:lodash@4.17.15",
        "pypi:requests==2.19.0",
        "crates:serde",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lokieee0/package-intel").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "packages": [
    "npm:lodash@4.17.15",
    "pypi:requests==2.19.0",
    "crates:serde"
  ]
}' |
apify call lokieee0/package-intel --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lokieee0/package-intel"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gqZeucz5tJQUd5ibb/builds/geTwTVWNcjjzSGfbh/openapi.json
