# OSS Trust Intelligence (`pihi/oss-trust-intelligence`) Actor

Analyze exact npm, PyPI, Maven, and Cargo package versions for vulnerabilities, exploitation risk, maintenance health, dependency exposure, licensing, and provenance. Get deterministic, explainable risk scores designed for software supply-chain decisions.

- **URL**: https://apify.com/pihi/oss-trust-intelligence.md
- **Developed by:** [Marek Mihok](https://apify.com/pihi) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 quick package analyses

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

## OSS Trust Intelligence

Deterministic security and supply-chain risk intelligence for exact open-source package versions.

Analyze packages from **npm, PyPI, Maven, and Cargo** using vulnerability, exploitability, maintenance, dependency, licensing, provenance, and project-health signals.

OSS Trust Intelligence is designed to answer a practical question:

> **Should I trust and adopt this exact package version?**

### What it analyzes

For each exact package version, the Actor can evaluate:

- Known vulnerabilities
- CVSS severity
- EPSS exploit probability
- CISA Known Exploited Vulnerabilities
- Package and project metadata
- OpenSSF Scorecard signals when available
- Maintenance and project health
- License information
- Dependency exposure
- Dependency vulnerabilities in full mode
- Provenance and source mapping signals

Results are deterministic and explainable. Missing upstream evidence lowers confidence instead of being treated as zero risk.

### Supported ecosystems

| Ecosystem | Quick analysis | Full dependency analysis |
| --------- | -------------- | ------------------------ |
| npm       | Supported      | Supported                |
| PyPI      | Supported      | Supported                |
| Maven     | Supported      | Supported                |
| Cargo     | Supported      | Best effort / preview    |

Cargo package and vulnerability analysis is fully supported. Dependency graph resolution for Cargo is best effort because upstream graph data can be unavailable or incomplete for some package versions.

### Analysis modes

#### Quick

Fast package-level security and trust analysis.

Use it when you need:

- vulnerability intelligence
- exploitability signals
- maintenance and project health
- licensing
- provenance and source mapping
- a fast trust decision

Price:

`$0.005 per successfully analyzed package`

#### Full

Includes everything from quick mode plus dependency graph analysis and dependency vulnerability assessment.

Price:

`$0.03 per successfully analyzed package`

If a required dependency graph cannot be reliably resolved, the result is returned as `partial` and the full-analysis event is not charged.

### Input

The Actor requires exact package versions.

Example:

```json
{
  "mode": "quick",
  "targets": [
    {
      "ecosystem": "npm",
      "name": "lodash",
      "version": "4.17.21"
    }
  ]
}
```

Full analysis:

```json
{
  "mode": "full",
  "targets": [
    {
      "ecosystem": "maven",
      "name": "org.apache.commons:commons-lang3",
      "version": "3.17.0"
    }
  ]
}
```

Batch requests are supported:

```json
{
  "mode": "quick",
  "targets": [
    {
      "ecosystem": "npm",
      "name": "lodash",
      "version": "4.17.21"
    },
    {
      "ecosystem": "pypi",
      "name": "requests",
      "version": "2.32.3"
    }
  ]
}
```

Floating tags and version ranges are intentionally not supported. Analysis always targets an exact package version.

### Output

Each analyzed target produces one structured dataset item.

Example:

```json
{
  "schemaVersion": "oss.trust.analysis.v1",
  "status": "complete",
  "mode": "quick",
  "target": {
    "ecosystem": "npm",
    "name": "lodash",
    "version": "4.17.21"
  },
  "risk": {
    "score": 56,
    "level": "high",
    "recommendation": "review",
    "confidence": 1.0,
    "scoringVersion": "oss-risk-v1"
  },
  "vulnerabilities": {
    "total": 3,
    "knownExploited": 0
  }
}
```

Risk scores range from `0` to `100`.

Higher scores mean higher observed supply-chain risk.

Recommendations are:

- `accept`
- `review`
- `avoid`

### Partial results

OSS Trust Intelligence does not hide missing upstream evidence.

For example:

```json
{
  "status": "partial",
  "risk": {
    "score": null,
    "level": "unknown",
    "recommendation": "review",
    "confidence": 0.65
  },
  "errors": [
    {
      "code": "GRAPH_NOT_INDEXED",
      "provider": "deps.dev",
      "message": "dependency graph is not indexed for the requested exact version"
    }
  ]
}
```

Important result codes include:

- `GRAPH_NOT_INDEXED` — upstream dependency graph is not indexed yet
- `GRAPH_RESOLUTION_FAILED` — upstream dependency resolver could not construct a reliable graph
- `PROJECT_ENRICHMENT_UNAVAILABLE` — optional project-health enrichment could not be retrieved

Graph failures are not interpreted as package vulnerabilities.

### Scoring

The current scoring policy combines five dimensions:

- Vulnerability risk — 45%
- Project hygiene — 20%
- Maintenance health — 15%
- Dependency surface — 10%
- Provenance and licensing — 10%

Known exploited vulnerabilities can trigger a critical hard gate.

CVSS and EPSS are treated as different signals. The scorer uses the stronger vulnerability signal conservatively rather than averaging away high severity or high exploit probability.

Current weights and thresholds are launch policy hypotheses, not calibrated probabilities of compromise.

### Data sources

The Actor combines independent public security and ecosystem signals including:

- deps.dev
- OSV
- FIRST EPSS
- CISA Known Exploited Vulnerabilities
- OpenSSF Scorecard data when available

Upstream availability and coverage can differ by ecosystem and package version.

### Billing behavior

The Actor uses pay-per-event pricing.

Only successfully completed billable analyses emit paid analysis events.

Partial or failed analyses caused by missing required upstream dependency evidence are not charged as successful full analyses.

The Actor also respects the maximum cost per run configured by the user. Batch processing stops before exceeding the available event budget.

### Security model

OSS Trust Intelligence analyzes public package and ecosystem metadata.

It does **not** install or execute analyzed package code and does not clone arbitrary repositories as part of the current analysis pipeline.

This reduces the attack surface of analyzing untrusted open-source packages.

### Recommended use cases

OSS Trust Intelligence is useful for:

- dependency adoption reviews
- software supply-chain security
- CI/CD security gates
- AI agents selecting dependencies
- security research
- package portfolio review
- automated dependency trust workflows

### Known limitations

Security intelligence is constrained by the freshness and coverage of upstream public data.

A low score does not prove that software is secure.

An absence of known vulnerabilities does not prove that vulnerabilities do not exist.

Cargo dependency graph analysis is currently best effort because upstream graph resolution has materially lower coverage than npm, PyPI, and Maven.

### Schema stability

Current public result schema:

`oss.trust.analysis.v1`

Scoring policy:

`oss-risk-v1`

Schema and scoring versions are included in outputs so integrations can reason about future changes explicitly.

# Actor input Schema

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

Quick scans the root package; full also resolves and scans non-bundled dependencies.

## `targets` (type: `array`):

One to 100 exact package versions. Floating tags and version ranges are rejected at runtime.

## Actor input object example

```json
{
  "mode": "full"
}
```

# Actor output Schema

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

Default dataset containing one final item per analyzed canonical package target.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pihi/oss-trust-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pihi/oss-trust-intelligence").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 '{}' |
apify call pihi/oss-trust-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pihi/oss-trust-intelligence"
        }
    }
}
```

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/DmRNlHI5VFSpn0ePt/builds/ogPbiarOPboXab6Z3/openapi.json
