|
| 1 | +--- |
| 2 | +title: Prioritizing Dependabot alerts using production context |
| 3 | +shortTitle: Dependabot production context |
| 4 | +intro: 'You can focus remediation on real risk by prioritizing {% data variables.product.prodname_dependabot_alerts %} for artifacts actually present in production, using metadata from external registries like JFrog Artifactory or your own CI/CD workflows.' |
| 5 | +product: '{% data reusables.gated-features.dependabot-alerts %}' |
| 6 | +versions: |
| 7 | + fpt: '*' |
| 8 | + ghec: '*' |
| 9 | +type: how_to |
| 10 | +topics: |
| 11 | + - Code Security |
| 12 | + - Dependabot |
| 13 | + - Organizations |
| 14 | + - Security |
| 15 | +--- |
| 16 | + |
| 17 | +> [!NOTE] Production context is in {% data variables.release-phases.public_preview %} and subject to change. |
| 18 | +
|
| 19 | +## Prioritizing {% data variables.product.prodname_dependabot_alerts %} using production context |
| 20 | + |
| 21 | +Application Security (AppSec) managers are often overwhelmed by a high volume of {% data variables.product.prodname_dependabot_alerts %}, many of which may not represent real risk because the affected code never makes it to production. By associating production context with your alerts, you can filter and prioritize vulnerabilities that impact artifacts actually approved for production environments. This enables your team to focus remediation efforts on the vulnerabilities that matter most, reducing noise and improving your security posture. |
| 22 | + |
| 23 | +## Associating production context with {% data variables.product.prodname_dependabot_alerts %} |
| 24 | + |
| 25 | +{% data variables.product.github %} enables production context for your {% data variables.product.prodname_dependabot_alerts %} by providing a Storage Record API. This API allows package registries or GitOps workflows to send artifact lifecycle data to {% data variables.product.github %}. The API should be called whenever an artifact is promoted to a production-approved package repository. |
| 26 | + |
| 27 | +{% data variables.product.github %} processes this metadata and uses it to power new alert filters, such as `artifact-registry-url` and `artifact-registry`. For more information, see [Create artifact metadata storage record](/rest/orgs/artifact-metadata?apiVersion=2022-11-28#create-artifact-metadata-storage-record) in the REST API documentation. |
| 28 | + |
| 29 | +## Steps to prioritize alerts |
| 30 | + |
| 31 | +Follow these steps to enable and use production context for alert prioritization: |
| 32 | + |
| 33 | +### Step 1: Detect and report production artifact promotions |
| 34 | + |
| 35 | +In your CI/CD or GitOps workflow, whenever an artifact is promoted to a production-approved package repository, call the Storage Record API to to send the artifact's metadata to {% data variables.product.github %}. This includes information such as the artifact's registry, repository, and version. See [AUTOTITLE](/rest/orgs/artifact-metadata?apiVersion=2022-11-28#create-artifact-metadata-storage-record). |
| 36 | + |
| 37 | +If you use JFrog Artifactory, you do not need to perform any custom integration. Artifactory natively integrates with the Storage Record API. You only need to enable the integration in your Artifactory settings, and Artifactory will automatically emit production promotion events to {% data variables.product.github %}. |
| 38 | + |
| 39 | +The `artifact-registry:jfrog-artifactory` filter will work out of the box with no further setup in {% data variables.product.github %}. For setup instructions, see [JFrog and GitHub Integration: JFrog for [{% data variables.product.github %} {% data variables.product.prodname_dependabot %}]](https://jfrog.com/help/r/jfrog-and-github-integration-guide/jfrog-for-github-dependabot) in the JFrog documentation. |
| 40 | + |
| 41 | +### Step 2: Use production context filters |
| 42 | + |
| 43 | +{% data reusables.dependabot.where-to-view-dependabot-alerts %}. For information about accessing this tab, see [Viewing {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts#viewing-dependabot-alerts). |
| 44 | + |
| 45 | +Once the alert list is displayed, use the `artifact-registry-url` or `artifact-registry` filters to focus on vulnerabilities affecting artifacts present in production. For example: |
| 46 | + |
| 47 | +```text |
| 48 | +artifact-registry-url:my-registry.example.com |
| 49 | +artifact-registry:jfrog-artifactory |
| 50 | +``` |
| 51 | + |
| 52 | +You can also combine these with other filters, such as EPSS. |
| 53 | + |
| 54 | +```text |
| 55 | +epss > 0.5 AND artifact-registry-url:my-registry.example.com |
| 56 | +``` |
| 57 | + |
| 58 | +## Further reading |
| 59 | + |
| 60 | +* [AUTOTITLE](/code-security/securing-your-organization/understanding-your-organizations-exposure-to-vulnerabilities/prioritizing-dependabot-alerts-using-metrics) |
0 commit comments