-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
updated anchore engine parser for upto date output format #11805
base: bugfix
Are you sure you want to change the base?
Conversation
DryRun Security SummaryThe pull request enhances Anchore Engine's vulnerability reporting capabilities by updating documentation, JSON schema, and parser implementation while addressing security concerns related to sensitive information exposure, input validation, and critical vulnerabilities in system components. Expand for full summaryThe pull request updates the Anchore Engine parser documentation and implementation, modifying JSON schema, parser logic, and test files to support more comprehensive vulnerability reporting. Security findings include: 1) Sensitive information exposure through image digest and timestamp details in docs/content/en/connecting_your_tools/parsers/file/anchore_engine.md, 2) Potential input validation concerns in dojo/tools/anchore_engine/parser.py due to reliance on .get() method with default values, 3) Critical vulnerabilities discovered in the test scan file (CVE-2024-50379, CVE-2024-56337 with CVSS Base Scores of 9.8), and 4) Multiple unpatched vulnerabilities across system libraries in various Tomcat and Java components. Code AnalysisWe ran |
I think I am going astray. Does changing the parser and data input require some database config changes as well? |
@pUrGe12 There was an fix added to 2.43.2 that was released yesterday that should fix the tests that are failing for you. |
That didn't work. Should I rebase onto master, cause now I did onto bugfix? Also, is there a way to run the docker tests locally? |
@pUrGe12 it looks like the failing tests are related to the anchore changes made in this PR |
Can you let me know why that's happening? |
So looking at the failures in the test in the GHA, it looks like there is a time format being supplied that is not accepted by the Finding model at the database level:
It looks like the finding model takes a date field, so that is the likely culprit django-DefectDojo/dojo/models.py Lines 2298 to 2300 in b1f9c5b
|
Thanks for that! I'll fix the code. I have removed the "detected at" date field entirely. Lemme know if that is a necessity in which case I'll fix the format and add it. |
I am guessing this has to do with the lack of unittests (I have only 1 file available with me so I have added only that) or some other database issue. I am not sure why its storing 83 |
Description
According to the discussion at #11552 I have updated the anchore engine parser for the relevant output format.
Test results
Have tested it locally using the provided file in #11552. I didn't have more files so haven't tried others.
Documentation
Have updated the docs to include the relevant information
Checklist
This checklist is for your information.
dev
.dev
.bugfix
branch.