Skip to content
Snippets Groups Projects

Add package to manipulate gemnasium-db repo

Merged Fabien Catteau requested to merge 14630-advisory-pkg into 14630-use-gemnasium-db
All threads resolved!

What does this MR do?

Add a package to manipulate a git clone of gemnasium-db:

  • add Advisory, used to decode YAML advisories
  • add Repo, used to list YAML advisories

This MR does NOT cover:

  • synchronizing local gemnasium-db directory with remote gemnasium-db repo
  • adding gemnasium-db to the Docker image
  • evaluating affected ranges

What are the relevant issue numbers?

gitlab-org/gitlab#14630 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Maintainer

    @adamcohen Could you review this even though it's WIP?

    It's WIP because it's to be rebased on top of !27 (merged), then used instead of the Gemnasium API client.

  • Fabien Catteau unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Fabien Catteau assigned to @adamcohen and unassigned @fcatteau

    assigned to @adamcohen and unassigned @fcatteau

  • Fabien Catteau marked as a Work In Progress

    marked as a Work In Progress

  • Fabien Catteau added 1 commit

    added 1 commit

    • 720e1517 - Apply suggestion to advisory/advisory.go

    Compare with previous version

  • Fabien Catteau changed the description

    changed the description

  • Fabien Catteau added 18 commits

    added 18 commits

    • b24b4d35 - Rename sub-package to depfile
    • 6c1ed1ad - Extract client sub-package
    • 5cf045f5 - Extract finder sub-package
    • fdec38bf - Move to finder.File
    • 5b12a413 - Extract Scanner from main func
    • a192bc32 - Rename back to scanner pkg
    • 03c6374e - Move advisory to scanner/advisory
    • 45493175 - Move client to scanner/client
    • 0d6a287d - Rename scanner.Source to File
    • 71fa6187 - Extract remediate package
    • 3b11e19f - Rename VulnerabilityConverter.Source to File
    • 45f779ef - Rename scanner.File.FilePath to Path
    • a7586263 - Fix finder's ignored directories
    • 4a93b5be - Remove DEBUG in Finder
    • fc3eb8d1 - Fix & simplify Scanner
    • 13962eb6 - Fix test of scanner.parse
    • a245ae14 - Fix file path in report
    • 8303ff22 - Add advisory.Repo, Advisory

    Compare with previous version

  • Fabien Catteau changed target branch from master to 14630-pre-refactor

    changed target branch from master to 14630-pre-refactor

  • Author Maintainer

    @adamcohen I've applied your suggestion, squashed everything, and rebased on top of 14630-pre-refactor. I'll rebased on top of 14630-pre-refactor as it changes.

  • Fabien Catteau added 1 commit

    added 1 commit

    • 68469bdb - Plug in new advisory package, remove client

    Compare with previous version

  • Fabien Catteau resolved all threads

    resolved all threads

  • Fabien Catteau added 1 commit

    added 1 commit

    Compare with previous version

  • Fabien Catteau added 1 commit

    added 1 commit

    Compare with previous version

  • Fabien Catteau mentioned in merge request !29 (closed)

    mentioned in merge request !29 (closed)

  • Adam Cohen
  • Adam Cohen
  • Adam Cohen assigned to @fcatteau and unassigned @adamcohen

    assigned to @fcatteau and unassigned @adamcohen

  • @fcatteau I'll revisit the MR when the tests are working and it's possible to generate a gl-dependency-scanning-report.json

  • Fabien Catteau added 1 commit

    added 1 commit

    • fe12b6c7 - Decode package from package slug

    Compare with previous version

  • Fabien Catteau added 7 commits

    added 7 commits

    Compare with previous version

  • Fabien Catteau changed target branch from 14630-pre-refactor to 14630-use-gemnasium-db

    changed target branch from 14630-pre-refactor to 14630-use-gemnasium-db

  • Fabien Catteau added 1 commit

    added 1 commit

    Compare with previous version

  • Fabien Catteau added 1 commit

    added 1 commit

    • 77d7973d - Add Scanner test, ignore packages w/o advisories

    Compare with previous version

  • Author Maintainer

    @adamcohen Could you have a look at 77d1b58a, f5787780, and 77d7973d?

    Again, test for ScanDir is broken but that's because affected ranges are not properly evaluated, and I don't want to tweak the expectations to make it pass (taking the risk of forgetting about it doing so).

  • Fabien Catteau assigned to @adamcohen and unassigned @fcatteau

    assigned to @adamcohen and unassigned @fcatteau

  • Fabien Catteau unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Adam Cohen
  • Adam Cohen approved this merge request

    approved this merge request

  • Fabien Catteau added 1 commit

    added 1 commit

    • 66f698ac - Apply suggestion to advisory/package.go

    Compare with previous version

  • Fabien Catteau added 1 commit

    added 1 commit

    • 57778c0d - Use CLI flags and ctxt only in scanner.go

    Compare with previous version

  • Fabien Catteau resolved all threads

    resolved all threads

  • Fabien Catteau approved this merge request

    approved this merge request

  • Fabien Catteau changed the description

    changed the description

  • Fabien Catteau mentioned in commit 1c0e8194

    mentioned in commit 1c0e8194

  • Fabien Catteau mentioned in merge request !25 (merged)

    mentioned in merge request !25 (merged)

  • 🤖 GitLab Bot 🤖 changed the description

    changed the description

  • Please register or sign in to reply
    Loading