> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CVE detection

> Check npm packages against known advisories at install time, at publish time, and continuously in production

**CVE detection** is a managed [CodeGuard](https://docs.prod.ai/admin/code-security/index.md) policy that checks the npm packages your apps depend on against known vulnerability and malware advisories. It runs at three moments:

| Moment | What it does | Where the result appears |
| - | - | - |
| **Install time** | Checks a package before a coding agent adds it, with a 7-day cooldown on new releases | Editor chat |
| **Publish time** | Re-checks dependencies on the snapshot being published | Publish readiness checklist |
| **Production** | Re-evaluates published apps as new advisories appear | Security Center and notifications |

All three use the same vulnerability index, sourced from [osv.dev](https://osv.dev) and refreshed hourly. Template packages that Prod AI has reviewed as not exploitable are excluded. See [CVE exceptions](https://docs.prod.ai/admin/code-security/supply-chain/cve-exceptions.md).

## Install time

When a [coding agent](https://docs.prod.ai/coding-agents/configure-coding-agents.md) installs an npm package, Prod AI checks it against the index first.

| Outcome | What happens |
| - | - |
| **Safe version** | The package installs. If a safer version exists, the coding agent installs that instead |
| **Malware advisory** | The install is blocked. The coding agent picks a different reputable package |
| **CVE with no safe version** | The install is blocked. The coding agent tries a different package or another approach |

If you named the package and a CVE blocks it, you can proceed with a short reason, which is recorded in the audit log. Malware blocks cannot be overridden.

New npm releases are held back for **7 days**. If a coding agent requests a version inside that window, Prod AI installs the newest version outside it, when one exists.

## Publish time

At publish time, CVE detection re-checks the snapshot's dependencies. This catches advisories disclosed after install and transitive dependencies added later. Findings follow the severity and scan mode rules in [How findings work](https://docs.prod.ai/admin/code-security/how-findings-work.md).

## Continuous monitoring

Prod AI keeps evaluating **published** apps, so a new CVE surfaces even when the app has not changed. Results land in **Security Center**, under **Security** in the dashboard.

You can view all outstanding CVEs across your app catalog from the Security Center. Builders have access to see CVEs for all apps on which they have Build access, while Admins with `policies:manage` permission can view CVEs across all apps.

Scans evaluate the **deployed** commit: `package.json` plus lockfile-resolved versions when available. Only published apps are scanned. Click **View details** on an app to see its [SBOM](https://docs.prod.ai/admin/code-security/supply-chain/sbom.md).

New critical and high CVEs also send [notifications](https://docs.prod.ai/admin/code-security/supply-chain/cve-notifications.md).

## Managing CVEs

### Best practices

1. **Builders fix high and critical CVEs when they are notified.** The builder has context on how the app should behave, so they are the right person to validate the fix.
2. **Admins watch Security Center for outstanding critical and high vulnerabilities.** If a vulnerability has not been addressed, reach out to the builder first, then optionally fix it yourself. If you are unsure about a fix, open the app in the editor and ask a coding agent what impact the remediation will have.

### Fix a CVE

1. Open the alert in **Inbox**, or open **Security Center** and find the app
2. Click **Fix** on the app or on an individual advisory. The app opens in the editor with a remediation prompt
3. The coding agent upgrades the vulnerable packages to safe versions
4. Check that the app still behaves as expected, then publish
5. Security Center clears the finding on the next scan

A finding does not clear until the fix is published, because scans evaluate the deployed package set.

To take a vulnerable app offline, click **Unpublish** in Security Center. Republish after the fix to restore access.

Automated CVE remediation is coming soon.

## Permissions

| Action | Permission |
| - | - |
| View CVEs for a specific app | Build access on that application |
| List distinct packages across the org (`list_distinct_packages_in_org`) | `policies:manage` |
| Fix / Unpublish | Deploy access on the target application |

An admin can see every vulnerable app, but can only fix or unpublish the ones they can deploy.

## Related

* [How findings work](https://docs.prod.ai/admin/code-security/how-findings-work.md)
* [CVE notifications](https://docs.prod.ai/admin/code-security/supply-chain/cve-notifications.md)
* [CVE exceptions](https://docs.prod.ai/admin/code-security/supply-chain/cve-exceptions.md)
* [SBOM](https://docs.prod.ai/admin/code-security/supply-chain/sbom.md)
* [Private registries](https://docs.prod.ai/admin/code-security/supply-chain/private-registries.md)
* [Audit logs](https://docs.prod.ai/admin/audit-logs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.