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
Field value exclusion and / or regex pattern #672
Comments
This is possible today with
What's an example of something that would affect everything but Windows? I don't see the use case here.
This is possible today with |
Problem is these are now separate non-linked fields and the arch should be paired to os since e.g. macos can run on arm/aarch64 and x84_64 + there are also libc differences between e.g. musl and glibc If I can just say in one field that all windows regardless os arch - without having to specify arch are vulnerable I could do it simply this where as with affected.os I would have to specify every arch windows runs on - a list that tends to change e.g. it runs on arm now (Surface Pro X I think?) Ergonomics wise people are also used to these target triplets when working with Rust
The time crate that was in #671 it had to list every other platform out there other than windows - makes a big list This list also is prone to change in the future: [affected]
# any Unix-like OS
os = [
"linux",
"redox",
"solaris",
"android",
"ios",
"macos",
"netbsd",
"openbsd",
"freebsd",
] |
Also crossbeam-utils - I wonder how can we support it better: https://github.com/rustsec/advisory-db/blob/main/crates/crossbeam-utils/RUSTSEC-2022-0041.md |
They were trying to list |
Well then you just say !windows and also !exclude any other non-unix instead of listing every platform out there Would make much shorter list yes ? If we were to think that it will be inaccurate because new os might come along - Well it is also the case for this list which would be essentially incomplete |
I think this makes a better case for a Edit: more specifically these are |
In Rust code itself, target triples are decomposed into They're different representations of the same information. |
https://doc.rust-lang.org/reference/conditional-compilation.html Yeah target_family could make sense How about libc differences ? EDIT: target_env ? |
That's |
So how about excluding |
Also how would we support best something like this: |
I'd prefer not to define a custom meta-language. If we do need some kind of selectors, I'd prefer to model them off of the ones used in e.g. I'm still not convinced we do need selectors (yet), however. I would be OK with adding something like |
Superceded by #699 |
e.g. #671 on potential new field
target
We could say everything windows
target = ["*windows*"]
Or we could say everything except windows with a
!
:target = [!"*windows*"]
All x86_64 targets
target = ["x86_64*"]
Or regex:
target = ["^x86_64.+"]
etc.
The text was updated successfully, but these errors were encountered: