Connect to gemnasium-db repo
What does this MR do?
Make the analyzer leverage the gemnasium-db repo directly instead of connecting to the Gemnasium API.
This includes or will include:
-
code refactoring !27 (merged) -
new advisory package, to manipulate gemnasium-db repo !28 (merged) -
version range resolvers !31 (merged) -
native Ruby vrange CLI -
vrange CLI based on gemnasium/semver -
embed gemnasium-db repo
-
-
re-organize vrange CLIs !41 (merged) -
native vrange CLIs -
npm !42 (merged) -
php !38 (merged) -
python !36 (merged) -
enable all native vrange CLIs !46 (merged) -
add test cases based on gemnasium-db !47 (merged)
-
-
use vrange in auto-remediation !34 (merged) -
provide an API gemnasium-maven and gemnasium-python can consume !37 (merged) -
update gemnasium-db at run-time !33 (merged) -
ensure local gemnasium-db repo is available at run-time !43 (merged) -
expose GEMNASIUM_DB_*
variables for customization of the gemnasium-db repo !50 (merged) -
remove links to deps.sec.gitlab.com from reports(follow-up issue)
Warning! We may have to wait until the affected ranges are fixed in gemnasium-db before deploying this. See gitlab-org/security-products/gemnasium-db!121 (closed)
Commits will NOT be squashed to preserve refs to these MRs.
Future improvements
These are possible improvements that have been discussed during the review:
Related issues
gitlab-org/gitlab#14630 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE; see gitlab-org/gitlab#14630 (closed) Documentation created/updated for this project, if necessaryDocumentation reviewed by technical writer or follow-up review issue createdTests added for this feature/bugJob definition updated, if necessary-
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Merge request reports
Activity
changed milestone to %12.4
added 2 commits
mentioned in issue gitlab-org/gitlab#14630 (closed)
marked the checklist item version range resolvers !31 (merged) as completed
marked the checklist item python !36 (merged) as completed
mentioned in issue gitlab-org/gitlab#33341 (closed)
mentioned in merge request !33 (merged)
mentioned in merge request !37 (merged)
marked the checklist item npm !42 (merged) as completed
marked the checklist item provide an API gemnasium-maven and gemnasium-python can consume !37 (merged) as completed
marked the checklist item enable all native vrange CLIs !46 (merged) as completed
- Resolved by Julian Thome
Failing QA job: PHP Composer
@adamcohen Currently we have extra advisories for the php-composer test project, but I don't know if that's legit. To be investigated on. See https://gitlab.com/gitlab-org/security-products/tests/php-composer/-/jobs/323686605
All other QA jobs are passing, see https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/pipelines/89466184
cc @julianthome
Edited by Fabien Catteau
Invalid affected ranges in gemnasium-db
@adamcohen gemnasium-db contains some YAML files where
affected_range
is invalid and does not comply with the version syntax corresponding to the package type. This has been spotted during QA and I've fixed CVE-2018-3728 to make it pass. This is no more than a workaround though, and @julianthome is currently running consistency checks using thevrange/*
commands to make suregemnasium-db
contains valid ranges.- Resolved by Fabien Catteau
Checking affected versions using Gemnasium API
We can leverage gemnasium-db-toolbox to list all the affected, fixed, and unaffected versions for a given advisory. I suggest we iterate over all the YAML files, retrieve these lists of versions, process them using the
vrange/*
CLIs (using theaffected_range
of the YAML file), and build a diff, to be checked manually. I'll work on that tomorrow. cc @adamcohen @julianthome
marked the checklist item add test cases based on gemnasium-db !47 (merged) as incomplete
marked the checklist item add test cases based on gemnasium-db !47 (merged) as completed
mentioned in merge request gitlab-org/security-products/gemnasium-db-toolbox!10 (closed)
mentioned in merge request gitlab-org/security-products/gemnasium-db!121 (closed)
mentioned in issue gl-retrospectives/secure#8 (closed)
assigned to @adamcohen and unassigned @fcatteau
assigned to @fcatteau and unassigned @adamcohen
- Resolved by Fabien Catteau
mentioned in merge request !50 (merged)
I'm moving
remove links to deps.sec.gitlab.com from reports
out of this MR because A. this is not a blocker and B. it requires updating all the test projects, which takes time (mostly waiting for the pipelines) and would significantly delay this MR. cc @gonzoyumomentioned in commit 6024edbf
mentioned in issue gitlab-org/gitlab#39404 (closed)
mentioned in issue gitlab-org/security-products/gemnasium-db#131 (closed)
mentioned in epic gitlab-org&1452 (closed)
mentioned in epic gitlab-org&1255 (closed)
mentioned in epic gitlab-org&1257 (closed)
mentioned in epic gitlab-org&1258 (closed)
mentioned in epic gitlab-org&1256 (closed)
mentioned in epic gitlab-org&1254 (closed)
mentioned in epic gitlab-org&1173 (closed)
mentioned in issue gitlab-org/gitlab#262400 (closed)
mentioned in issue gitlab-org/gitlab#327128 (closed)