Skip to main content
The threat-feed endpoint returns threats added to or updated in the database within a rolling time window. Add unverified=1 to activate the Early Warning Feed, a stream of suspicious assets flagged by our automated detection engines in real time ahead of analyst verification.
Subscription Required: This is a paid endpoint. Check out our pricing and contact us for more info.
Use this endpoint to:
  • Keep blocklists current: Pull new and updated threats on a schedule and update your block rules without manual review.
  • Power automated alerting: Feed threats into your SIEM, SOAR, or internal alerting pipeline as they are verified.
  • Early warning on suspicious assets: Stream automated detection signals in real time to quarantine, isolate, or place temporary holds on suspicious assets before human analyst review completes.
  • Recover missed threats: Use a larger lookback (up to 24 hours) to catch up after a poller outage without re-ingesting your entire threat history.
Endpoint
Required header
Alternative: Pass API key as query parameter: ?apikey=osm_your_token
Paid Access Required This endpoint requires a Core or Enterprise API key. Standard API tokens will receive a 403 Forbidden response.

Query parameters

hours is the only supported window parameterDo not pass from, to, or days as query parameters. threat-feed is a rolling lookback poller, not an arbitrary historical search endpoint.
  • The from and to timestamps in the API response are output-only metadata showing the evaluated window; they cannot be passed as input filters.
  • If you pass unsupported parameters like days or from without hours, the endpoint defaults to hours=1.
  • To backfill missed data after poller downtime, set hours up to its maximum value of 24.
Valid ecosystem values:
  • Packages and developer tooling: npm, pypi, crates, nuget, maven, go, packagist, rubygems, vscode, openvsx, brew, and skills
  • Infrastructure assets: repositories and domains (must be plural)
  • Containers: dockerhub (container images are cataloged by registry identifier rather than container)
Most malicious AI components (skills, MCP servers, etc) are hosted in GitHub rather than a public registry. If you’re looking to consume intel on this class of threat, be sure to configure threat-feed to pull in repositories.
Infrastructure entities (ip, wallet, url): are not available for continuous feed polling. OpenSourceMalware tracks these as first-class threat records, but continuous infrastructure streaming is an Enterprise-only capability delivered via the threat-dataAPI. Contact us to upgrade to Enterprise.

How polling works

Polling frequency and lookback are separate settings

Polling frequency is how often you call the endpoint. The lookback (hours) is how far back each call reaches. You can poll as often as you need fresh data, and many teams poll far more often than hourly. Your lookback must always be longer than the time between calls. For example, polling every 15 minutes with hours=1 covers every record, with overlap. Polling every 2 hours with hours=1 silently misses an hour of records each time. To confirm you have no gaps, store each response’s to timestamp and check that it lines up with the from timestamp of your next call. If your poller goes down, call once with a lookback that covers the outage. The maximum lookback is 24 hours, so alert on poller failures well before that.

Records can appear more than once

A verified record can come back in threats for two reasons:
  • Polling window overlap: Normal and expected when running continuous polls.
  • Threat intelligence changed: New affected versions were identified, descriptions were refined, severity was re-assessed, or new IOCs/dependencies were linked. When intelligence changes, the record’s last_updated timestamp moves forward and it re-enters the feed.

Handling updates and deduplication

For verified records (threats), upsert on id and key change detection on last_updated:
  • If you already hold the record and last_updated is newer: Replace your local copy.
  • If last_updated is unchanged: It is an overlap duplicate; safe to skip.
  • The feed does not indicate which specific field changed, so compare against your stored copy if you need to audit diffs.
Use last_updated, not updated_at:
  • last_updated is the authoritative threat intelligence timestamp. It only advances when human analysts or curation pipelines modify the actual threat data (such as version_info, payload details, severity, or IOCs).
  • updated_at is an internal database row timestamp present on all records. It may advance during backend database maintenance, indexing, or counter syncs without any changes to threat intelligence. Do not use updated_at for feed change detection.
A change to version_info can have two impacts: Added versions can affect consumers who weren’t affected before, and removed versions were found to be false positives. Re-run any matching against your dependency inventories when it changes.
A blank or null version_info means every version of the package is malicious. This is the most common case since many packages are owned by threat actors.

Early Warning Feed (unverified findings)

Modern software supply-chain defense requires balancing speed and accuracy:
  • Verified threats (threats): Curated, human-verified intelligence. Zero false-positive tolerance for automated production blocking.
  • Early Warning Feed (unverified_scans): Real-time automated detections streamed the moment our engines flag suspicious behavior, delivered ahead of analyst review.
Adding unverified=1 to your query couples both streams into a single API call, giving you immediate early-warning visibility into emerging threats across open-source ecosystems.

How to use early warning signals

Early warning findings represent high-confidence automated flags—such as suspicious preinstall scripts, known exfiltration domains, or abnormal maintainer behavior—prior to human confirmation. Security and platform teams use the Early Warning Feed to:
  1. Enforce quarantine holds: Place a temporary time-based hold or download delay on suspicious assets in private package registries while analyst verification is underway.
  2. Alert SOC and IR teams: Flag developer pull requests or internal CI builds that pull in freshly flagged suspicious assets.
  3. Conduct proactive log hunting: Search internal dependency trees and developer environments for suspicious packages before public advisories drop.

Where they appear in the response

With unverified=1, one call returns both kinds of records. You don’t need a separate poll.
  • threats: verified records, counted in count
  • unverified_scans: unverified findings, counted in unverified_scans_count
Make sure your parser reads both arrays.

How unverified findings differ

Unverified findings come from automated analysis, so they carry less detail than verified records.

Deduplicating unverified findings

Unlike verified threats, do not deduplicate or upsert unverified_scans on id alone. In unverified_scans, each id represents an individual automated scan event (scan_results.id), not a persistent threat entity. Because our scanning pipeline re-evaluates suspicious packages over time, a single package version can be scanned multiple times, with each scan pass generating a brand new id and timestamp. If you deduplicate on id, every repeat scan will be treated as a separate finding. Recommended deduplication strategy:
  • Key on asset identity: Group or key unverified findings by:
    • Packages: registry + package_name + version_info
    • Repositories: report_type + resource_identifier
  • Resolve on latest timestamp: When multiple records match the same key within your lookback window, retain the record with the latest created_at (or first_seen) timestamp and discard the older scan passes.

Connecting an unverified finding to its verified record

Every unverified finding is eventually either verified or rejected as a false positive.
  • When it’s verified, it appears in threats on your next poll and no longer appears in unverified_scans.
  • When it’s rejected, it appears in the false-positive endpoint.
The id changes when a finding is verified. In unverified_scans, id identifies the scan. In threats, it identifies the verified threat record. Don’t use id to connect the two.
Instead, match on registry and package_name, then check whether the scanned version falls within the verified record’s version_info. Don’t compare version_info values as exact strings, since verified records often list several versions, a range, or every version. Unverified findings include an osm_url, but that page isn’t published until the finding is verified. Don’t display or link to it until the record appears in threats.

Response example

Success (200)

This example uses unverified=1, so it includes both arrays.
For a description of every field, see API response fields.

Error responses

API error responses

Click this card for the latest list of error responses.

cURL examples

Poll for npm threats in the last hour (default lookback):
Poll for verified and unverified npm threats in the last hour:
Get PyPI threats from the last 6 hours:
Get repository threats from the last 24 hours:

STIX format

The OpenSourceMalware API also supports returning threat feed data in STIX (Structured Threat Information Expression) format, making it compatible with threat intelligence platforms and SIEMs that consume STIX bundles. To request STIX output, contact us for access details.