@@ -13,14 +13,18 @@ versions during compilation.
13
13
# Motivation
14
14
[ motivation ] : #motivation
15
15
16
- When compared to other ecosystems such as Python's, Rust's broader community
17
- prefers many single-purpose crates over larger monoliths. This situation,
18
- together with the strongly encouraged practice of pinning version ranges or
19
- even exact versions of dependencies (as opposed to using ` "*" ` as a version
20
- identifier, which Crates.io rejects), slows down the propagation of critical
21
- security fixes.
22
-
23
- Here's an example. Assume that:
16
+ Keeping on top of security vulnerabilities for all dependencies of a typical
17
+ Rust application is currently extremely hard, if not impossible. Particularly
18
+ for Rust this task is relatively hard, since Rust's broader community prefers
19
+ many single-purpose crates over larger "collections" of tools (like Boost in
20
+ C++).
21
+
22
+ One might think that a regular ` cargo update ` may help in such situations.
23
+ However, the application developer still does not know which updates were
24
+ security updates, and which were not, and therefore doesn't know if a new
25
+ release of their application is needed or not. ` cargo update ` doesn't even
26
+ suffice to automatically recieve all security updates. Here's an example.
27
+ Assume that:
24
28
25
29
- There are two crates, ` A ` and ` B ` .
26
30
- The latest version of ` B ` is ` 1.0.0 ` , which is a complete rewrite and comes
@@ -40,13 +44,13 @@ unless they take extra measures to keep themselves informed. Especially in
40
44
open-source development (not sponsored by a multinational company) that is
41
45
unlikely to be the case.
42
46
43
- In any case it could be easier. Cargo and other tooling that builds on top of
44
- the proposed new API for Crates.io could alert crate users of their
45
- vulnerabilities, which in turn spurs them to update their dependencies
46
- accordingly. Even if that does not happen, the additional metadata at least
47
- makes it clear which crates are potentially dangerous to use and which ones
48
- not. This not only helps Rust programmers, but potentially also distributors
49
- (such as packagers of Linux distros) and end-users.
47
+ Cargo and other tooling that builds on top of the proposed new API for
48
+ Crates.io could alert crate users of their vulnerabilities, which in turn spurs
49
+ them to update their dependencies accordingly. Even if that does not happen,
50
+ the additional metadata at least makes it clear which crates are potentially
51
+ dangerous to use and which ones not. This not only helps Rust programmers, but
52
+ potentially also distributors (such as packagers of Linux distros) and
53
+ end-users.
50
54
51
55
# Detailed design
52
56
[ design ] : #detailed-design
@@ -219,7 +223,8 @@ semver-incompatible with the latest one are usually aware that they should
219
223
eventually update (and in fact there's already tooling to keep on top of that,
220
224
such as [ cargo-outdated] ( https://github.com/kbknapp/cargo-outdated ) ), but, like
221
225
in the example in [ Motivation] ( #motivation ) , don't yet have a good reason to do
222
- so. A security issue would be a good reason.
226
+ so. A security issue would be a good reason, but marking a package as
227
+ deprecated does not imply that.
223
228
224
229
## Extending yanking for security advisories
225
230
0 commit comments