-
Notifications
You must be signed in to change notification settings - Fork 449
fix(sca): avoid exception on malformed packages #14167
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
base: main
Are you sure you want to change the base?
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 280 ± 3 ms. The average import time from base is: 282 ± 2 ms. The import time difference between this PR and base is: -2.0 ± 0.1 ms. Import time breakdownThe following import paths have shrunk:
|
Performance SLOsCandidate: florentinl/APPSEC-58471/fix-malformed-metadata (7e1232d) 🔵 No Baseline Data (24 suites)🔵 coreapiscenario - 12/12 (2 unstable)🔵 No baseline data available for this suite
|
13a9d7b
to
7b7894e
Compare
7b7894e
to
7e1232d
Compare
Problem
Some dependencies may be malformed and may be missing a
METADATA
file in its*.dist-info
folder.In this case, we still want to send the information about the packages that are correctly formed.
Currently when a single package has no METADATA file in its dist-info folder, the code raises an error and nothing is reported.
Context
I noticed this while investigating SCA in AWS Lambda, the
dist-info
files are removed to slim down the layer:https://github.com/DataDog/datadog-lambda-python/blob/main/Dockerfile#L28-L29
Checklist
Reviewer Checklist