# Audit Python AI/ML PyPI Dependencies & CVEs

**Use case:** 

Audits flagship Python web and AI/ML ecosystem dependencies on PyPI (httpx, pydantic, fastapi, numpy, requests, urllib3, jinja2) for SPDX licenses, OSV/CVE advisories, OpenSSF Scorecard ratings, and supply-chain risk scores.

## Input

```json
{
  "packages": [
    "pypi:httpx",
    "pypi:pydantic",
    "pypi:fastapi",
    "pypi:numpy",
    "pypi:requests",
    "pypi:urllib3",
    "pypi:jinja2"
  ],
  "npmSearchQuery": "",
  "includeScorecard": true,
  "onlyVulnerable": false,
  "maxResults": 25
}
```

## Output

```json
{
  "ecosystem": {
    "label": "Ecosystem",
    "format": "string"
  },
  "packageName": {
    "label": "Package Name",
    "format": "string"
  },
  "version": {
    "label": "Version",
    "format": "string"
  },
  "licenses": {
    "label": "SPDX Licenses",
    "format": "array"
  },
  "vulnerabilityCount": {
    "label": "OSV / CVE Count",
    "format": "integer"
  },
  "vulnerabilityIds": {
    "label": "Advisory IDs",
    "format": "array"
  },
  "openssfScorecard": {
    "label": "OpenSSF Scorecard",
    "format": "number"
  },
  "starsCount": {
    "label": "Repo Stars",
    "format": "integer"
  },
  "supplyChainRiskScore": {
    "label": "Risk Score (0-100)",
    "format": "integer"
  },
  "sourceRepoUrl": {
    "label": "Source Repo",
    "format": "string"
  },
  "depsDevUrl": {
    "label": "deps.dev URL",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Open-Source Package Security, Licenses & SBOM API Intel Actor is ready to run with the inputs already set for "Audit Python AI/ML PyPI Dependencies & CVEs". [Sign up or log in](https://console.apify.com/create-task-from-example/8NwRFgG0mXu37xHC7) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Audit Python AI/ML PyPI Dependencies & CVEs" task

The Open-Source Package Security, Licenses & SBOM API Intel Actor will start running based on the input automatically. You can also change all the input fields, like packages to audit (ecosystem:name or ecosystem:name@version), enrich openssf scorecard & source repo health, and more, to match your specific use case.

### 3. Receive the "Audit Python AI/ML PyPI Dependencies & CVEs" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as ecosystem, package name, version, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Audit Python AI/ML PyPI Dependencies & CVEs" task via API](https://apify.com/grimbles/oss-supply-chain-security-sbom-intel.md).

## FAQ

### Which Python packages are audited in this PyPI Security task?

The Python AI/ML PyPI task audits httpx, pydantic, fastapi, numpy, requests, urllib3, and jinja2 at their latest default releases.

### Can I audit pinned vulnerable versions like pypi:jinja2@2.4.1?

Pass pinned versions using the 'pypi:package@version' syntax in the packages array to test specific lockfile snapshots.

### Can I filter results to show only vulnerable Python packages?

Set onlyVulnerable to true in the duplicated task input to output strictly packages with 1+ known OSV/CVE advisories.

### How can CI/CD or AI coding agents automate Python SBOM checks?

Invoke this PyPI Dependencies Auditor via Apify MCP Server, GitHub webhooks, or n8n workflows before releasing Python builds.

## About this Actor

This example demonstrates how to use [Open-Source Package Security, Licenses & SBOM API Intel](https://apify.com/grimbles/oss-supply-chain-security-sbom-intel.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/grimbles/oss-supply-chain-security-sbom-intel.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/grimbles/oss-supply-chain-security-sbom-intel.md

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`).
