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

[Feature Request] cargo deny only for deps required for a specific "phase" (normal, build, dev, etc) #563

Open
banool opened this issue Sep 7, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@banool
Copy link

banool commented Sep 7, 2023

As in, not build or dev deps, similar to how it works with cargo tree:

cargo tree -e features,no-build,no-dev
@banool banool added the enhancement New feature or request label Sep 7, 2023
@banool
Copy link
Author

banool commented Sep 7, 2023

My config, for context:

# This cargo deny file makes sure that for the Mac target, we don't take on OpenSSL
# deps for the normal (not build / dev) dependencies.

# It doesn't actually check for just normal deps right now:
# https://github.com/EmbarkStudios/cargo-deny/issues/563

all-features = false
no-default-features = false
targets = [
    { triple = "aarch64-apple-darwin" },
]

[advisories]
vulnerability = "allow"
unmaintained = "allow"
notice = "allow"
unsound = "allow"
yanked = "allow"

[licenses]
unlicensed = "allow"
copyleft = "allow"
default = "allow"

[bans]
multiple-versions = "allow"
wildcards = "allow"
workspace-default-features = "allow"
external-default-features = "allow"
# We need to make this only check for the normal deps, not build or dev.
deny = [
    { name = "openssl" },
    { name = "openssl-sys" },
    { name = "openssl-macros" },
]

[sources]
unknown-registry = "allow"
unknown-git = "allow"

@banool
Copy link
Author

banool commented Sep 14, 2023

Hey @repi @Jake-Shadle I don't suppose you know the answer to this?

@Jake-Shadle
Copy link
Member

You can't currently only check normal dependencies when checking for bans.

@banool
Copy link
Author

banool commented Sep 14, 2023

I see, thanks! I'll rename this issue then and turn it into a feature request hahah. If I get time I can look into it but I doubt that'll happen in the near future.

@banool banool changed the title How to cargo deny only for normal deps? [Feature Request] cargo deny only for deps required for a specific "phase" (normal, build, dev, etc) Sep 14, 2023
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

2 participants