# GitHub Security Advisories Scraper (`w3crawler/github-security-advisories-scraper`) Actor

Reads public GitHub Security Advisory Database pages by GHSA/CVE/filter query and emits flat advisory records.

- **URL**: https://apify.com/w3crawler/github-security-advisories-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 security advisories

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## GitHub Security Advisories Scraper

Read public GitHub Security Advisory Database list and detail pages and emit one flat row per unique advisory. The Actor uses ordinary HTTPS requests to `github.com/advisories`; it does not require a GitHub token or login.

### Public source behavior

Public advisory pages expose the GHSA/CVE identifiers, title, severity, CVSS score/vector, EPSS percentage, CWE IDs, affected and patched version text, references, publication/update timestamps, advisory type, and withdrawn state. The parser omits UI placeholders such as “Unknown” and “No package listed” instead of fabricating values.

### Input

```json
{
  "query": "severity:high ecosystem:npm",
  "maxItems": 5
}
```

You can also provide `ghsaId`/`ghsaIds` for direct public detail lookups, or use convenience filters for CVE, ecosystem, severity, CWE, affected package, type, publication/update dates, and withdrawn advisories. `maxItems` is bounded to 1–1,000. `fixtureFile` accepts a repository-relative HTML fixture for deterministic local validation; `proxyConfiguration` is accepted for compatibility but this implementation uses direct public GitHub pages.

### Dataset output

Normal rows contain public advisory identity, description, severity/CVSS/EPSS data, affected package/version text, references, timestamps, canonical advisory URL, query/source URL, and `scrapedAt`. Internal record IDs/types, status/data flags, source-website markers, and request metadata are not emitted. Request/no-result failures are minimal diagnostics containing only `url`, `error`, `errorCode`, and `scrapedAt`. Run status and counts are stored in the `OUTPUT` key-value record.

```json
{
  "advisoryId": "GHSA-RHX5-89FH-523V",
  "ghsaId": "GHSA-RHX5-89FH-523V",
  "cveId": "CVE-2026-19883",
  "title": "A public advisory title",
  "severity": "high",
  "cvssScore": 8.8,
  "cwes": ["CWE-269"],
  "url": "https://github.com/advisories/GHSA-RHX5-89FH-523V",
  "sourceUrl": "https://github.com/advisories?query=severity%3Ahigh",
  "scrapedAt": "2026-09-08T00:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Local run and validation

```bash
npm ci
npm test
npm run lint
apify validate-schema
apify run --purge --input-file .actor/input.json
apify run --purge --input-file test/inputs/live-smoke.json
npm run validate
```

The Actor follows bounded pagination and retries, fails closed on redirects outside the public GitHub advisories host, and does not bypass CAPTCHA, login, rate limits, or access controls. Respect GitHub's terms and public-service limits.

# Actor input Schema

## `ghsaId` (type: `string`):

Direct GHSA lookup, such as GHSA-rhx5-89fh-523v.

## `ghsaIds` (type: `array`):

Batch direct GHSA lookups, up to 100 IDs.

## `query` (type: `string`):

Raw GitHub Advisory Database search syntax. If set, it takes precedence over the individual filter fields.

## `cveId` (type: `string`):

CVE identifier filter.

## `ecosystem` (type: `string`):

Package ecosystem such as npm, Maven, pip, Go, Rust, or NuGet.

## `severity` (type: `string`):

CVSS severity tier.

## `cwes` (type: `string`):

Comma-separated CWE numbers.

## `affects` (type: `string`):

Affected package name, optionally including a version.

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

Reviewed, unreviewed, or malware advisory filter.

## `published` (type: `string`):

ISO date or inclusive ISO date range.

## `updated` (type: `string`):

ISO date or inclusive ISO date range.

## `modifiedAfter` (type: `string`):

ISO date or range start used as a modified-at lower bound.

## `isWithdrawn` (type: `boolean`):

Return only withdrawn advisories when true.

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

Maximum number of unique advisory records to emit.

## `proxyConfiguration` (type: `object`):

Accepted for Store compatibility. This local implementation uses direct public GitHub pages and does not configure a proxy.

## `fixtureFile` (type: `string`):

Optional repository-relative HTML fixture used for deterministic local validation.

## Actor input object example

```json
{
  "query": "",
  "isWithdrawn": false,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `output` (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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/github-security-advisories-scraper").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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/github-security-advisories-scraper").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 '{
  "maxItems": 10
}' |
apify call w3crawler/github-security-advisories-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/github-security-advisories-scraper"
        }
    }
}
```

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/r7ZJCqdaCQI0pxvKc/builds/UbRr0Rch95uc8EBCY/openapi.json
