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: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
7
## [Unreleased]
8
+
9
+
## [0.5.0] - 2019-12-18
8
10
### Added
9
11
- Added the `advisories` check and configuration section for checking crates against an advisory database to detect security vulnerabilities, unmaintained crates, and crates with security notices
10
12
- A warning will now be emitted if a crate that isn't in the graph is specified in `[bans.skip-tree]`
Copy file name to clipboardexpand all lines: README.md
+25-16
Original file line number
Diff line number
Diff line change
@@ -47,19 +47,35 @@ Contains all of the configuration for `cargo deny check license`.
47
47
48
48
#### The `unlicensed` field (optional)
49
49
50
-
Determines what happens when a crate has not explicitly specified its license terms, and no license
51
-
information could be easily detected via `LICENSE*` files in the crate's source.
50
+
Determines what happens when a crate has not explicitly specified its license terms, and no license information could be easily detected via `LICENSE*` files in the crate's source.
52
51
53
52
*`deny` (default) - All unlicensed crates will emit an error and fail the license check
54
53
*`allow` - All unlicensed crates will show a note, but will not fail the license check
55
54
*`warn` - All unlicensed crates will show a warning, but will not fail the license check
56
55
57
56
#### The `allow` and `deny` fields (optional)
58
57
59
-
The licenses that should be allowed or denied. The license must be a valid SPDX v2.1 identifier, which must either be in version 3.6 of the [SPDX License List](https://spdx.org/licenses/), with an optional [exception](https://spdx.org/licenses/exceptions-index.html) specified by `WITH <exception-id>`, or else a user defined license reference denoted by `LicenseRef-<idstring>` for a license not on the SPDX License List.
58
+
The licenses that should be allowed or denied. The license must be a valid SPDX v2.1 identifier, which must either be in version 3.7 of the [SPDX License List](https://spdx.org/licenses/), with an optional [exception](https://spdx.org/licenses/exceptions-index.html) specified by `WITH <exception-id>`, or else a user defined license reference denoted by `LicenseRef-<idstring>` for a license not on the SPDX License List.
60
59
61
60
**NOTE:** The same license cannot appear in both the `allow` and `deny` lists.
62
61
62
+
##### GNU licenses
63
+
64
+
* GPL
65
+
* AGPL
66
+
* LGPL
67
+
* GFDL
68
+
69
+
The GNU licenses are, of course, different from all the other licenses in the SPDX list which makes them annoying to deal with. When supplying one of the above licenses, to either `allow` or `deny`, you must not use the suffixes `-only` or `-or-later`, as they can only be used by the license holder themselves to decide under which terms to license their code.
70
+
71
+
So, for example, if you we wanted to disallow `GPL-2.0` licenses, but allow `GPL-3.0` licenses, we could use the following configuration.
72
+
73
+
```toml
74
+
[licenses]
75
+
allow = [ "GPL-3.0" ]
76
+
deny = [ "GPL-2.0" ]
77
+
```
78
+
63
79
#### The `copyleft` field (optional)
64
80
65
81
Determines what happens when a license that is considered [copyleft](https://en.wikipedia.org/wiki/Copyleft) is encountered.
@@ -150,8 +166,7 @@ For example, we previously depended on OpenSSL as it is the "default" for many c
150
166
151
167
### Use Case - Get a handle on duplicate versions
152
168
153
-
One thing that is part of the tradeoff of being able to use so many crates, is that they all won't
154
-
necessarily agree on what versions of a dependency they want to use, and cargo and rust will happily chug along compiling all of them. This is great when just trying out a new dependency as quickly as possible, but it does come with some long term costs. Crate fetch times (and disk space) are increased, but in particular, **compile times**, and ultimately your binary sizes, also increase. If you are made aware that you depend on multiple versions of the same crate, you at least have an opportunity to decide how you want to handle them.
169
+
One thing that is part of the tradeoff of being able to use so many crates, is that they all won't necessarily agree on what versions of a dependency they want to use, and cargo and rust will happily chug along compiling all of them. This is great when just trying out a new dependency as quickly as possible, but it does come with some long term costs. Crate fetch times (and disk space) are increased, but in particular, **compile times**, and ultimately your binary sizes, also increase. If you are made aware that you depend on multiple versions of the same crate, you at least have an opportunity to decide how you want to handle them.
155
170
156
171
### The `[bans]` section
157
172
@@ -170,8 +185,7 @@ Determines what happens when multiple versions of the same crate are encountered
170
185
When multiple versions of the same crate are encountered and the `multiple-versions` is set to `warn` or `deny`, using the `-g <dir>` option will print out a [dotgraph](https://www.graphviz.org/) of each of the versions and how they were included into the graph. This field determines how the graph is colored to help you quickly spot good candidates for removal or updating.
171
186
172
187
*`lowest-version` - Highlights the path to the lowest duplicate version. Highlighted in 
173
-
*`simplest-path` - Highlights the path to the duplicate version with the fewest number of total
174
-
edges to the root of the graph, which will often be the best candidate for removal and/or upgrading. Highlighted in .
188
+
*`simplest-path` - Highlights the path to the duplicate version with the fewest number of total edges to the root of the graph, which will often be the best candidate for removal and/or upgrading. Highlighted in .
175
189
*`all` - Highlights both the `lowest-version` and `simplest-path`. If they are the same, they are only highlighted in .
176
190
177
191

@@ -196,7 +210,7 @@ As with `licenses`, these determine which specificy crates and version ranges ar
196
210
197
211
#### The `skip` field (optional)
198
212
199
-
When denying duplicate versions, it sometimes takes time to update versions in transitive dependencies, or big changes in core often used crates such as winapi and others to ripple through the rest of the ecosystem. In such cases, it can be ok to remove certain versions from consideration so that they won't trigger failures due to multiple versions, and can eventually be removed once all crates have update to the later version(s).
213
+
When denying duplicate versions, it sometimes takes time to update versions in transitive dependencies, or big changes in core often used crates such as `winapi` and others to ripple through the rest of the ecosystem. In such cases, it can be ok to remove certain versions from consideration so that they won't trigger failures due to multiple versions, and can eventually be removed once all crates have update to the later version(s).
200
214
201
215
Note entries in the `skip` field that never match a crate in your graph will have a warning printed that they never matched, allowing you to clean up your configuration as your crate graph changes over time.
202
216
@@ -307,13 +321,11 @@ The threshold for security vulnerabilities to be turned into notes instead of of
307
321
308
322
## CI Usage
309
323
310
-
`cargo-deny` is primarily meant to be used in your CI so it can do automatic verification for all
311
-
your changes, for an example of this, you can look at the [self check](https://github.com/EmbarkStudios/cargo-deny/blob/master/.travis.yml#L77-L87) job for this repository, which just checks `cargo-deny` itself using the [deny.toml](deny.toml) config.
324
+
`cargo-deny` is primarily meant to be used in your CI so it can do automatic verification for all your changes, for an example of this, you can look at the [self check](https://github.com/EmbarkStudios/cargo-deny/blob/master/.travis.yml#L77-L87) job for this repository, which just checks `cargo-deny` itself using the [deny.toml](deny.toml) config.
312
325
313
326
## List - `cargo deny list`
314
327
315
-
Similarly to [cargo-license](https://github.com/onur/cargo-license), print out the licenses and crates
316
-
that use them.
328
+
Similarly to [cargo-license](https://github.com/onur/cargo-license), print out the licenses and crates that use them.
317
329
318
330
*`layout = license, format = human` (default)
319
331
@@ -348,7 +360,4 @@ at your option.
348
360
349
361
### Contribution
350
362
351
-
Unless you explicitly state otherwise, any contribution intentionally
352
-
submitted for inclusion in the work by you, as defined in the Apache-2.0
353
-
license, shall be dual licensed as above, without any additional terms or
354
-
conditions.
363
+
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0 commit comments