Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to check allow list for non-workspace crates only #468

Open
RobJellinghaus opened this issue Oct 26, 2022 · 0 comments
Open

Add flag to check allow list for non-workspace crates only #468

RobJellinghaus opened this issue Oct 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@RobJellinghaus
Copy link

RobJellinghaus commented Oct 26, 2022

Is your feature request related to a problem? Please describe.
We are looking at using cargo-deny to enforce an internal allow list of external (registry) crates, for a large project with many Rust repositories. The problem we have is that the current allow list support requires even workspace crates to be listed in the allow list.

This will not scale to our needs, given how many different workspaces there are; the single centralized allow list should cover only external (e.g. non-workspace) crates, without needing to include all internal workspace crates from all the repositories.

Describe the solution you'd like
For our purposes, we would like an option that can cause cargo deny check bans to treat all workspace crates as implicitly allowed. Something like cargo deny check bans --allow-workspace-crates would potentially work. This issue pertains specifically to allow lists since obviously one doesn't ban one's own workspace crates :-)

Describe alternatives you've considered
Another option would be to filter bans to only crates from specific sources/registries, e.g. something like cargo deny check bans --filter-source=crates.io to check the allow/ban list for only crates from crates-io. But since the core feature we're suggesting is "allow workspace crates," having the flag be workspace-related rather than source-related seems better.

Additional context
The existing --workspace argument seems not to affect the behavior of cargo deny check bans in any way (or at least, not in any way that affects this scenario).

@RobJellinghaus RobJellinghaus added the enhancement New feature or request label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant