-
Notifications
You must be signed in to change notification settings - Fork 186
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
Tern does not detect 'pip install' command when preceded by 'python -m' in dockerfile RUN line #1020
Comments
Thanks for the issue @chming1016. I think the difference in output you're seeing is actually due to the
Ideally, Tern would be able to understand the |
Thanks for clarify the issue @rnjudge . Hoping this can be added in the closely future. |
Feel free to open a PR with the fix if you need it quickly :) Is there a reason you're using |
Tern is a nice tool. I am using it to generate SBoM for cloud service to do vulnerability management. Actually, I do not mind changing my Dockerfile from |
You are correct, developers will put whatever they want in their Dockerfile :) Thus, we cannot account for every single possible way developers may install packages. We try to detect the most common methods of installing software. Installation methods like the |
Hi @rnjudge, |
@rnjudge, Can I take this issue? |
Since we've started pulling images using Skopeo, we can no longer analyze post built images unless they're on a registry. I've tried using |
In order to detect packages installed by pip but using the python3 module (-m), we add a snippet listing for "python3" that points to the "pip3" package inventorying method Fixes tern-tools#1020 Signed-off-by: Nisha K <nishak@vmware.com>
In order to detect packages installed by pip but using the python3 module (-m), we add a snippet listing for "python3" that points to the "pip3" package inventorying method Fixes #1020 Signed-off-by: Nisha K <nishak@vmware.com>
Describe the bug
While building docker image with
pip install -r requirements.txt
, the relevant pip packages are not showing in the final report.To Reproduce (PoC)
requirements.txt
which is required to build the docker image mentioned above.docker build -t test:withrequirements .
./tern/docker_run.sh ternd:2.7.0 "report -f json -i test:withrequirements" > /tmp/report.json
Expected behavior
As the PoC showing above, the expected result should show "requests" with version "2.22.0" in the report.
pip install {package_name}
will be shown in the report. However,pip install -r requirements.txt
does not.Environment you are running Tern on
Enter all that apply
Ubuntu 18.04.5 LTS
Alpine
Python 3.6.8
Please attach files if they exist
As Github does not support uploading json format, I put tern.log and report.json into log_report.zip.
log_report.zip
The text was updated successfully, but these errors were encountered: