Skip to content

Add a rake task to seed a project with vulnerabilities

What does this MR do and why?

Describe in detail what your merge request does and why.

Allows the vulnerability seeder to be invoked via rake task for easier local testing.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Screen_Shot_2022-10-19_at_1.30.28_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

To test gitlab:seed:vulnerabilities

  1. Ensure your GDK is licensed with Ultimate.
  2. Login
  3. Go to http://<your-gdk-host>/gitlab-org/gitlab-test/-/security/vulnerability_report
  4. Observe that the vulnerability report is empty
  5. Run bundle exec rake 'gitlab:seed:vulnerabilities[gitlab-org/gitlab-test]'
  6. Refresh the vulnerability report
  7. Observe that it now contains vulnerabilities

To test ee/db/fixtures/development/20_vulnerabilities.rb

Run bundle exec rake setup - This will reset the database on your GDK

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams

Merge request reports