You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
# dependency-review-action
2
2
3
3
This action scans your pull requests for dependency changes, and will
4
-
raise an error if any vulnerabilities or invalid licenses are being introduced. The action is supported by an [API endpoint](https://docs.github.com/en/rest/reference/dependency-graph#dependency-review) that diffs the dependencies between any two revisions on your default branch.
4
+
raise an error if any vulnerabilities or invalid licenses are being introduced. The action is supported by an [API endpoint](https://docs.github.com/rest/dependency-graph/dependency-review) that diffs the dependencies between any two revisions on your default branch.
5
5
6
6
The action is available for all public repositories, as well as private repositories that have GitHub Advanced Security licensed.
7
7
8
8
You can see the results on the job logs:
9
9
10
-
<imgwidth="854"alt="Screen Shot 2022-03-31 at 1 10 51 PM"src="https://user-images.githubusercontent.com/2161/161042286-b22d7dd3-13cb-458d-8744-ce70ed9bf562.png">
10
+
<imgwidth="850"alt="GitHub workflow run log showing Dependency Review job output"src="https://user-images.githubusercontent.com/2161/161042286-b22d7dd3-13cb-458d-8744-ce70ed9bf562.png">
**Please keep in mind that you need a [GitHub Advanced Security](https://docs.github.com/en/enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security) license if you're running this action on private repositories.**
18
+
**Please keep in mind that you need a [GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest/get-started/learning-about-github/about-github-advanced-security) license if you're running this action on private repositories.**
19
19
20
20
1. Add a new YAML workflow to your `.github/workflows` folder:
21
21
@@ -38,11 +38,11 @@ jobs:
38
38
39
39
### GitHub Enterprise Server
40
40
41
-
This action is available in Enterprise Server starting with version 3.6. Make sure
are enabled, and that you have installed the [dependency-review-action](https://github.com/actions/dependency-review-action) on the server.
47
47
48
48
You can use the same workflow as above, replacing the `runs-on` value
<
ED48
div class="diff-text-inner color-fg-muted">@@ -71,7 +71,7 @@ Configure this action by either inlining these options in your workflow file, or
71
71
| `fail-on-severity` | Defines the threshold for the level of severity. The action will fail on any pull requests that introduce vulnerabilities of the specified severity level or higher. | `low`, `moderate`, `high`, `critical` | `low` |
72
72
| `allow-licenses`\* | Contains a list of allowed licenses. The action will fail on pull requests that introduce dependencies with licenses that do not match the list. | Any [SPDX-compliant identifier(s)](https://spdx.org/licenses/) | none |
73
73
| `deny-licenses`\* | Contains a list of prohibited licenses. The action will fail on pull requests that introduce dependencies with licenses that match the list. | Any [SPDX-compliant identifier(s)](https://spdx.org/licenses/) | none |
74
-
| `fail-on-scopes`† | Contains a list of strings of the build environments you want to support. The action will fail on pull requests that introduce vulnerabilities in the scopes that match the list. | `runtime`, `development`, `unknown` | `runtime` |
74
+
| `fail-on-scopes` | Contains a list of strings of the build environments you want to support. The action will fail on pull requests that introduce vulnerabilities in the scopes that match the list. | `runtime`, `development`, `unknown` | `runtime` |
75
75
| `allow-ghsas` | Contains a list of GitHub Advisory Database IDs that can be skipped during detection. | Any GHSAs from the [GitHub Advisory Database](https://github.com/advisories) | none |
76
76
| `license-check` | Enable or disable the license check performed by the action. | `true`, `false` | `true` |
77
77
| `vulnerability-check` | Enable or disable the vulnerability check performed by the action. | `true`, `false` | `true` |
@@ -86,8 +86,6 @@ Configure this action by either inlining these options in your workflow file, or
86
86
87
87
\*not supported for use with GitHub Enterprise Server
88
88
89
-
†will be supported with GitHub Enterprise Server 3.8
90
-
91
89
+when `warn-only` is set to `true`, all vulnerabilities, independently of the severity, will be reported as warnings and the action will not fail.
92
90
93
91
### Inline Configuration
@@ -157,7 +155,11 @@ For more examples of how to use this action and its configuration options, see t
157
155
158
156
## Blocking pull requests
159
157
160
-
The Dependency Review GitHub Action check 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 the [documentation on protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging).
158
+
The Dependency Review GitHub Action check 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 the [documentation on protected branches](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging).
159
+
160
+
## Outputs
161
+
162
+
`comment-content`is generated with the same content as would be present in a Dependency Review Action comment.
Using the `allow-dependencies-licenses` you can exclude dependencies from the license check. The values should be provided in [purl](https://github.com/package-url/purl-spec) format.
0 commit comments