# Open Source Vulnerability Monitor (`silicon1235/open-source-vulnerability-monitor`) Actor

OSV vulnerability monitor for public open-source package advisory changes, severity filters, and fix-aware alerts.

- **URL**: https://apify.com/silicon1235/open-source-vulnerability-monitor.md
- **Developed by:** [X L](https://apify.com/silicon1235) (community)
- **Categories:** Developer tools, Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Open Source Vulnerability Monitor

Monitor public OSV vulnerability advisories for open-source packages and emit only meaningful new or modified advisory alerts.

### What it does

- Checks package names across ecosystems such as npm, PyPI, Maven, Go, crates.io, NuGet, Packagist, RubyGems, and Debian.
- Uses the public OSV API; no GitHub token or vendor account is required for the core workflow.
- Provides public OSV package advisory monitoring only, using public OSV advisory data; it does not scan private repositories or read private dependency manifests.
- Hydrates advisory details, severity, aliases, references, affected ranges, affected versions, fixed versions, published time, and modified time.
- Carries the watched package version when provided, so alerts can show whether a specific deployed version is being checked.
- Compares against prior snapshots to separate `new`, `modified`, and `unchanged` advisories.
- Writes dataset rows plus `SUMMARY`, `ALERTS`, `SNAPSHOTS`, and a Markdown `REPORT`.
- Adds commercial review fields such as `monetizationFit`, `paidEventCandidate`, `supportRisk`, and `suggestedPricingModel` for later PPE review.

### Good use cases

- Security teams tracking vulnerable open-source dependencies.
- Developer-platform teams watching critical packages in templates and SDKs.
- Agencies monitoring dependency risk for multiple clients.
- Compliance teams needing repeatable public-source advisory evidence.

### Monetization boundary

First release should be free or usage-cost-only. Future PPE should charge only for completed `matched-vulnerability-advisory` events where an advisory is new or modified and meets the configured severity threshold. Rows include `fixAvailable` and `fixedVersions`, which makes the alert more actionable without claiming to replace a full SCA or remediation workflow.

Do not charge for baseline unchanged rows, packages with no matching advisories, invalid inputs, API errors, or snapshot-only persistence.

The commercial fields are advisory only. They do not enable PPE, billing, payout, rental pricing, or paid events.

### Example input

```json
{
  "packages": [
    { "ecosystem": "npm", "name": "lodash", "version": "4.17.20", "label": "lodash" },
    { "ecosystem": "PyPI", "name": "django", "version": "3.2.0", "label": "Django" }
  ],
  "minimumSeverity": "MEDIUM",
  "snapshotKey": "OPEN_SOURCE_VULN_SNAPSHOT",
  "saveSnapshot": true
}
```

### Quick-Start Presets

Copy one of these low-cost JSON inputs into the Apify input editor and replace the package list with the dependencies you actually ship:

- `examples/presets/npm-production-risk-watch.json`: three common npm production dependencies, `HIGH` threshold, saved snapshots, and a small advisory cap.
- `examples/presets/python-web-stack-watch.json`: three Python web-stack dependencies, `HIGH` threshold, saved snapshots, and a small advisory cap.
- `examples/presets/cross-ecosystem-sbom-sample.json`: a compact npm/PyPI/Maven sample for teams that want to test cross-ecosystem SBOM-style monitoring before expanding the list.

Each preset keeps the first run to 3 packages or fewer and enables `saveSnapshot` so scheduled runs can separate new or modified advisories from baseline rows.

### Local validation

```powershell
npm install
npm test
npm run sample
npx apify-cli validate-schema .actor/input_schema.json
npm pack --dry-run --json
```

# Actor input Schema

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

Open-source packages to check in OSV. Use ecosystem values such as npm, PyPI, Maven, Go, crates.io, NuGet, Packagist, RubyGems, or Debian.

## `minimumSeverity` (type: `string`):

Only create alerts at or above this severity when severity can be inferred.

## `previousSnapshots` (type: `array`):

Optional snapshots from a prior run for change detection.

## `snapshotKey` (type: `string`):

Optional key-value store record name used to load and save snapshots between runs.

## `saveSnapshot` (type: `boolean`):

Save current advisory snapshots to the key-value store.

## `timeoutMs` (type: `integer`):

Timeout for OSV HTTP requests.

## `maxAdvisoriesPerPackage` (type: `integer`):

Maximum advisories emitted for each package after sorting by severity and modification time.

## Actor input object example

```json
{
  "packages": [
    {
      "ecosystem": "npm",
      "name": "lodash",
      "version": "4.17.20",
      "label": "lodash"
    },
    {
      "ecosystem": "PyPI",
      "name": "django",
      "version": "3.2.0",
      "label": "Django"
    }
  ],
  "minimumSeverity": "MEDIUM",
  "snapshotKey": "OPEN_SOURCE_VULN_SNAPSHOT",
  "saveSnapshot": true,
  "timeoutMs": 20000,
  "maxAdvisoriesPerPackage": 25
}
```

# 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": [
        {
            "ecosystem": "npm",
            "name": "lodash",
            "version": "4.17.20",
            "label": "lodash"
        },
        {
            "ecosystem": "PyPI",
            "name": "django",
            "version": "3.2.0",
            "label": "Django"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("silicon1235/open-source-vulnerability-monitor").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": [
        {
            "ecosystem": "npm",
            "name": "lodash",
            "version": "4.17.20",
            "label": "lodash",
        },
        {
            "ecosystem": "PyPI",
            "name": "django",
            "version": "3.2.0",
            "label": "Django",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("silicon1235/open-source-vulnerability-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    {
      "ecosystem": "npm",
      "name": "lodash",
      "version": "4.17.20",
      "label": "lodash"
    },
    {
      "ecosystem": "PyPI",
      "name": "django",
      "version": "3.2.0",
      "label": "Django"
    }
  ]
}' |
apify call silicon1235/open-source-vulnerability-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=silicon1235/open-source-vulnerability-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4adFjR5TyWOD27d0J/builds/jEf68vTHHUTgg9pl5/openapi.json
