-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
using a vulnerable rust-yaml version in clap v2 #1569
Comments
I just started using https://github.com/RustSec/cargo-audit via https://github.com/actions-rs/audit-check and clap is the only library causing issues because of rust-yaml. Would definitely be nice to get this updated. |
Also, I don't think the uncontrolled recursion case is possible with clap, so this is entirely about appeasing the audit gods 😕 |
In part yes, but it also removes the burden from maintainers to figure out that it's 'only' in clap and that clap isn't affected. As a user I'm not certain where exactly in the clap workflow yaml files are read, so it's hard to decide if it's an actual issue or a false positive. I sure could dig through the clap codebase and find out, but that's quite a lot of work. So it's not only appeasing the audit gods but making security easier for everyone, which is a big + :D |
Yaml files are an alternative to building the
To be clear - I'm not saying that we shouldn't do it, I'm just pointing out that there's no practical way this could go sought today 😄 |
@Dylan-DPC So how do we do it? I suggest to create |
No hurry on it :) |
The situation: clap v2 depends on rust-yaml v0.3 and the fix is not backported to it. Blocked on it. |
Blocked on chyh1990/yaml-rust#126 |
To be fair this is not a vulnerability. Vulnerability in computing is defined as (emphasis mine)
There's no such tool for an attacker because |
@CreepySkeleton you're right that this isn't a true vulnerability, but @Licenser is definitely correct when he said:
False positives waste time and lead to fatigue, which can lead to people finding ways of turning off the warnings, which leads to true positives getting through. So this needs to get fixed as quickly as possible, even if it isn't a vulnerability. |
@ckaran Well yes, except we can't fix it unless it's backported to yaml 0.3, not really, because doing so would be a breaking change and potentially break god knows how many crates out there for no benefit. We might be willing to publish a breaking change to fix a real vulnerability, but this one does not qualify as such. Come to think of it, clap is not the one to blame here, it does everything right. It's cargo-audit who emits a false-positive warning and causes the fatigue. If you ask me, an audit system must have a way to mark certain software as a known false positive and suppress the warning. Is there one? |
I don't think so, but I've just started using it. @tarcieri, is there a way to mark a vulnerability as a false positive? |
Clarification: @tarcieri, is there a way to mark a specific vulnerability in a specific version or range of versions of a specific crate that depends on a vulnerable crate but never triggers the vulnerability as a false positive? |
The main way to flag vulnerabilities as false positives is either via a command line Regarding transitive dependencies where the vulnerable code path is never called (which appears to be what's happening here?), detecting these scenarios is a long-time requested feature. We'd like to be able to do a call graph analysis. Here's a relevant issue: |
Not quite. The allege vulnerability in question is unrestrained recursion that leads to stack overflow, and this code is indeed called here. But the input we ever feed to the yaml parser (the one with that triggers recursion) is trusted (is included via
The problem with this workflow is that users have to see the warning first, then discover that the report in question is a false one, then individually mark it as false positive for themselves. This is the fatigue @ckaran was talking about and it won't go away until an automatic solution (from user's perspective) is developed. |
I'm afraid there aren't presently any good solutions for that other than publishing a release which is able to use transitive dependency which isn't in the vulnerable range. |
Just throwing my thoughts in the ring as well. I 100% agree with @CreepySkeleton here, there isn't much we can do unless Having said that, I also agree with the sentiment that it's difficult for users to go through the headache of finding out what deps are causing which errors, and whether or not it's a real vulnerability. However, I would caveat that with that's just part of dependency management. Without better tooling, that's just the state of things. The only other solution I can think of at the moment is if we add a blurb in our docs for the affected API that says something to the effect of, "There is a known false positive when using |
Assuming that the PR for the backport is accepted soon, this might be the best answer. |
I'd also be fine with adding this same text to the advisory itself. |
This kind of solution is unlikely to change anything because users get the warning from
Which doesn't mention anything about the relevant API. In order to be useful, this attachment must be visible. I'd suggest put it in readme and docs.rs front page, somewhere near the top, and paint it bold. |
That would be marvelous. |
OK, so just so I'm 100% clear, this is going to be in |
Right, it must be worded in a way that explicitly conveys that |
@ckaran this would just be in the description of the advisory. For what it's worth, I also opened a ticket about potentially doing some sort of structured whitelisting in advisories as well: In that case, |
@tarcieri that's perfect! The description can be a stopgap, and the ticket can be a future enhancement. |
clap3 is using a newer rust-yaml and is at rc0, so I'm going ahead and closing this in favor of that release. |
clap depends on a version of rust-yaml that has a vulnerability - it would be nice to update to a newer version: https://rustsec.org/advisories/RUSTSEC-2018-0006
Affected Version of clap
The text was updated successfully, but these errors were encountered: