Skip to content

Commit a8926db

Browse files
authored
Merge pull request github#26469 from github/saritai/dependency-review-api-and-action
Dependency review API and Action
2 parents a594f40 + f4af550 commit a8926db

File tree

21 files changed

+1681
-2041
lines changed

21 files changed

+1681
-2041
lines changed
77.5 KB
Loading

content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,18 @@ Dependency review supports the same languages and package management ecosystems
4949
## Enabling dependency review
5050

5151
The dependency review feature becomes available when you enable the dependency graph. For more information, see "{% ifversion ghec %}[Enabling the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#enabling-the-dependency-graph){% elsif ghes %}[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise){% endif %}."
52-
{% endif %}
52+
{% endif %}
53+
54+
{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6396 %}
55+
## Dependency review enforcement
56+
57+
{% data reusables.dependency-review.dependency-review-action-beta-note %}
58+
59+
You can use the Dependency Review GitHub Action in your repository to enforce dependency reviews on your pull requests. The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests, and warns you about the associated security vulnerabilities. This gives you better visibility of what's changing in a pull request, and helps prevent vulnerabilities being added to your repository. For more information, see [`dependency-review-action`](https://github.com/actions/dependency-review-action).
60+
61+
![Dependency review action example](/assets/images/help/graphs/dependency-review-action.png)
62+
63+
The Dependency Review GitHub Action check will fail if it discovers any vulnerable package, but will only block a pull request from being merged if the repository owner has required the check to pass before merging. For more information, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging)."
64+
65+
The action uses the Dependency Review REST API to get the diff of dependency changes between the base commit and head commit. You can use the Dependency Review API to get the diff of dependency changes, including vulnerability data, between any two commits on a repository. For more information, see "[Dependency review](/rest/reference/dependency-graph#dependency-review)."
66+
{% endif %}

content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ shortTitle: Review dependency changes
3434

3535
Dependency review allows you to "shift left". You can use the provided predictive information to catch vulnerable dependencies before they hit production. For more information, see "[About dependency review](/code-security/supply-chain-security/about-dependency-review)."
3636

37+
{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6396 %}
38+
You can use the Dependency Review GitHub Action to help enforce dependency reviews on pull requests in your repository. For more information, see "[Dependency review enforcement](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement)."
39+
{% endif %}
40+
3741
## Reviewing dependencies in a pull request
3842

3943
{% data reusables.repositories.sidebar-pr %}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Dependency graph
3+
intro: 'With the Dependency Graph API, you can view dependency changes and their security impact on your repository.'
4+
versions:
5+
fpt: '*'
6+
ghes: '>=3.6'
7+
ghec: '*'
8+
ghae: 'issue-6396'
9+
topics:
10+
- API
11+
miniTocMaxHeadingLevel: 3
12+
---
13+
14+
<!--
15+
Operations are automatically generated. Markdown for this page is located in data/reusables/rest-reference/dependency-graph
16+
-->

content/rest/reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ children:
2222
- /collaborators
2323
- /commits
2424
- /dependabot
25+
- /dependency-graph
2526
- /deploy_keys
2627
- /deployments
2728
- /emojis
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% note %}
2+
3+
**Note**: The Dependency Review GitHub Action is currently in public beta and subject to change.
4+
5+
{% endnote %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% note %}
2+
3+
**Note**: The Dependency Review API is currently in public beta and subject to change.
4+
5+
{% endnote %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Dependency review
2+
3+
{% data reusables.dependency-review.dependency-review-api-beta-note %}
4+
5+
The Dependency Review API allows you to understand dependency changes, and the security impact of these changes, before you add them to your environment. You can view the diff of dependencies between two commits of a repository, including vulnerability data for any version updates with known vulnerabilities. For more information about dependency review, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)."

lib/rest/static/apps/enabled-for-apps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,7 @@
11331133
"requestPath": "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
11341134
}
11351135
],
1136+
"dependency-graph": [],
11361137
"deploy_keys": [
11371138
{
11381139
"slug": "list-deploy-keys",

lib/rest/static/decorated/api.github.com.json

Lines changed: 347 additions & 93 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)