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
First of all I would like to say thanks to everyone who contributed to this project and its original author! This project helped a lot with furthering adoption in restricted environments.
Potential security issues with downloading arbitrary crates from crates.io is a concern for most companies trying to adopt Rust. If anything history teaches us, it is easy to push malicious software into open registries and to receive malicious dependencies without notice. NPM registry is famous for these kinds of problems.
I'm thinking to implement whitelisting for crates, so that only a subset of crates.io could be downloaded for offline mirroring for the sake of security.
How I see this working
[crates.whitelist]
some-crate = { version = "1.2.3" } # download only 1.2.3 versionsome-crate = { version = "^2.0.0" } # download everything up to 2.0.0 (inclusive)some-crate = { version = "1.2.3", deps-download = false } # prevent dependency downloading
[crates.blacklist]
# Possibility in the future
There should be a whitelisting file (probably crates.toml) which lists all crate names and their version ranges that should be downloaded.
All listed crates dependencies should be recursively downloaded by default
It should be possible to prevent downloading dependencies with an option
Since cargo resolves dependencies in a special way (i.e. downloading several versions of a single crate) the only option at the moment is to download everything up to the latest version specified in deps requirements of crates.io-index for the dependency.
Example of crates.io-index entry:
First of all I would like to say thanks to everyone who contributed to this project and its original author! This project helped a lot with furthering adoption in restricted environments.
Potential security issues with downloading arbitrary crates from
crates.io
is a concern for most companies trying to adopt Rust. If anything history teaches us, it is easy to push malicious software into open registries and to receive malicious dependencies without notice. NPM registry is famous for these kinds of problems.I'm thinking to implement whitelisting for crates, so that only a subset of
crates.io
could be downloaded for offline mirroring for the sake of security.How I see this working
crates.toml
) which lists all crate names and their version ranges that should be downloaded.deps
requirements ofcrates.io-index
for the dependency.Example of
crates.io-index
entry:Downsides
The downside of this approach is that:
deps
indexAny thoughts on the matter are welcome!
The text was updated successfully, but these errors were encountered: