-
Notifications
You must be signed in to change notification settings - Fork 64
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 skipped dependencies to audit summary #141
Comments
Hmm, it's a bit difficult to do this cleanly. The problem is essentially that if a dependency gets skipped for some reason, we need to propagate this all the way up to the top level of the API. Here are of the ideas I went through: Make a "skipped dependency" type and optionally return it at each layer of the APIThe obvious thing to do but it's invasive. Every level of the API needs to return something like Make a larger type that involves vulnerability results and a list of skipped dependenciesSomething like @dataclass(frozen=True)
class VulnerabilityResults:
vulns: List[Tuple[Dependency, List[VulnerabilityResult]]]
skipped_deps: List[SkippedDep] Doesn't really work well because we return Hijack the
|
Yeah, this is tricky -- I'm inclined to say that we should change our
Where class SkippedDependency(Dependency):
# inherits `name` and `canonicalized_name()`
skip_reason: SkipReason ...where This complicates downstream consumption slightly, but it avoids using the |
More braindump: we could have the top-level |
Is your feature request related to a problem? Please describe.
The
pip-audit
summary should give a full picture of what happened in the audit. At the moment,pip-audit
logs warnings whenever it skips over a dependency (due to an invalid version, can't be found on PyPI, etc), however the summary doesn't contain this information. Ifpip-audit
can't audit a particular dependency, this should be reflected in the summary/JSON output somehow.Describe the solution you'd like
There should be some indicator or section in the summary output containing the details of skipped dependencies.
The text was updated successfully, but these errors were encountered: