Migrate Alpine importer to advisory V2#2111
Conversation
|
|
@TG1999 @pombredanne I have a question about Alpine migration. We are fetching one URL and processing the data without grouping by CVE. The problem is that each URL reports a package version along with its fixed CVEs. How can we obtain a unique identifier for this importer? Is it a good idea to restructure the data and create a large mapping, using the CVE as the unique identifier? Proposed structure: Example: Sources: |
| ) | ||
|
|
||
| for cve in aliases: | ||
| advisory_id = f"{pkg_infos['name']}/{qualifiers['distroversion']}/{cve}" |
There was a problem hiding this comment.
ex:
alpine_linux_importer_v2/aardvark-dns/edge/1.12.2-r0/CVE-2024-8418
vulnerabilities/tests/pipelines/v2_importers/test_alpine_linux_importer_pipeline.py
Show resolved
Hide resolved
|
The logs in debug mode: |
keshav-space
left a comment
There was a problem hiding this comment.
Thanks @ziadhany, see comments below.
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
26f912d to
0bb7b03
Compare
keshav-space
left a comment
There was a problem hiding this comment.
Thanks @ziadhany, see few comments below. And let’s get rid of the optional logger in helper functions. There is no point in having logger as optional when we are already passing self.log, this only makes the code less readable.
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py
Outdated
Show resolved
Hide resolved
vulnerabilities/tests/pipelines/v2_importers/test_alpine_linux_importer_pipeline.py
Outdated
Show resolved
Hide resolved
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
…aseImporterPipelineV2 Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Fix duplication on advisory_id Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Update the logger to prevent None from being used as a default value Move the tests to a new file expected-advisories-v3.3.json Signed-off-by: ziad hany <ziadhany2016@gmail.com>
68b4d0e to
d61a505
Compare
Issue: