question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scan without resolving/downloading dependencies

See original GitHub issue

maybe i’m misunderstanding, but it seems that pip-audit cannot scan the contents of a requirements file in the simplest way imaginable: for each entry, check if the specified version has known vulnerabilities.

currently, running against a requirements file with exclusively exact version matches (foo==x.y), like this

$ pip-audit -r requirements.txt 

… downloads and (temporarily) installs various packages, which not only takes forever, but also eventually fails because some packages cannot be found – they come from a private index server, which is a different issue.

as a work-around, installing everything (also downloads and installs) and then using pip-audit --local seems to work, but this is not a convenient solution.

i understand that in the general case, requirements files may not be exhaustive and may not have exact versions, in which case running a resolver etc makes total sense, but that’s not always the case.

some background: the use case is that my requirements files are produced by pip-tools and hence constitute the exact list of pinned versions used by my application, and i would like to integrate pip-audit into a continuous integration job. i also run pip-compile (from pip-tools) in that job to warn about potential package upgrades, some of which come from private index servers, and it would be great if pip-audit can be added to it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
dicommented, Dec 11, 2021

Maybe --no-deps, perhaps? 🙂

2reactions
woodruffwcommented, Dec 10, 2021

@alex came up with another use case for this: sometimes our dependency source can be something like a third-party package manager, which has already done the hard work of fully resolving the dependency tree for us. Performing the resolution step in that case would be pointless, since we already have all of the information available to us.

What I’m thinking is a --no-resolve or --already-resolved flag that, when the dependency source is a requirements-style file, checks that every dependency is pinned to an exact version and only audits those dependencies.

That will effectively address (2)/(3) above, since it assumes that the input is “flat” in the sense that no additional resolutions are necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I prevent Maven from downloading artifacts every time?
This gives me an error: [ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Cannot access central ...
Read more >
Dependency Scanning - GitLab Docs
Dependency Scanning analyzes your project and tells you which software dependencies, including upstream dependencies, have been included in your project, and ...
Read more >
DownloadException: Download failed for 'Maven:org.hamcrest ...
PackageManager - Resolving Gradle dependencies for ... This problem is wired because during a scan phase ORT downloaded and stored 4 ...
Read more >
Solving Maven Dependency Issues with Build Scans
If the resolved version is not the same as the latest version in the remote repository, it may explain why a certain feature...
Read more >
Understanding dependency resolution - Gradle User Manual
This chapter covers the way dependency resolution works inside Gradle. After covering how you can declare repositories and dependencies, it makes sense to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found