Skip to content

Commit 06d5174

Browse files
committed
Rewrite motivation again
1 parent 8a64d0c commit 06d5174

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

text/0000-security-advisories.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ versions during compilation.
1313
# Motivation
1414
[motivation]: #motivation
1515

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:
2428

2529
- There are two crates, `A` and `B`.
2630
- 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
4044
open-source development (not sponsored by a multinational company) that is
4145
unlikely to be the case.
4246

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.
5054

5155
# Detailed design
5256
[design]: #detailed-design
@@ -219,7 +223,8 @@ semver-incompatible with the latest one are usually aware that they should
219223
eventually update (and in fact there's already tooling to keep on top of that,
220224
such as [cargo-outdated](https://github.com/kbknapp/cargo-outdated)), but, like
221225
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.
223228

224229
## Extending yanking for security advisories
225230

0 commit comments

Comments
 (0)