# 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Open Source Vulnerability Monitor",
        "description": "OSV vulnerability monitor for public open-source package advisory changes, severity filters, and fix-aware alerts.",
        "version": "0.1",
        "x-build-id": "jEf68vTHHUTgg9pl5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/silicon1235~open-source-vulnerability-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-silicon1235-open-source-vulnerability-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/silicon1235~open-source-vulnerability-monitor/runs": {
            "post": {
                "operationId": "runs-sync-silicon1235-open-source-vulnerability-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/silicon1235~open-source-vulnerability-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-silicon1235-open-source-vulnerability-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "packages"
                ],
                "properties": {
                    "packages": {
                        "title": "Packages",
                        "type": "array",
                        "description": "Open-source packages to check in OSV. Use ecosystem values such as npm, PyPI, Maven, Go, crates.io, NuGet, Packagist, RubyGems, or Debian."
                    },
                    "minimumSeverity": {
                        "title": "Minimum severity",
                        "enum": [
                            "UNKNOWN",
                            "LOW",
                            "MEDIUM",
                            "HIGH",
                            "CRITICAL"
                        ],
                        "type": "string",
                        "description": "Only create alerts at or above this severity when severity can be inferred.",
                        "default": "MEDIUM"
                    },
                    "previousSnapshots": {
                        "title": "Previous snapshots",
                        "type": "array",
                        "description": "Optional snapshots from a prior run for change detection."
                    },
                    "snapshotKey": {
                        "title": "Snapshot key",
                        "type": "string",
                        "description": "Optional key-value store record name used to load and save snapshots between runs.",
                        "default": "OPEN_SOURCE_VULN_SNAPSHOT"
                    },
                    "saveSnapshot": {
                        "title": "Save snapshot",
                        "type": "boolean",
                        "description": "Save current advisory snapshots to the key-value store.",
                        "default": true
                    },
                    "timeoutMs": {
                        "title": "Request timeout",
                        "minimum": 5000,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "Timeout for OSV HTTP requests.",
                        "default": 20000
                    },
                    "maxAdvisoriesPerPackage": {
                        "title": "Max advisories per package",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum advisories emitted for each package after sorting by severity and modification time.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
