Skip to content

Validate with any schema report

Fabien Catteau requested to merge validate-with-any-schema-report into master

What does this MR do?

  • Add a Shell script that clone the schemas and copies the distributions for all versions/git tags
  • Add SchemaPathResolver that gives the path to the JSON schemas corresponding to a security report
  • Change the report shared examples to use the SchemaPathResolver
  • Change the image test job to export the schemas, and to set the env var the SchemaPathResolver uses

Note: The image test job no longer run the specs we have for spec/support because environment variables set to run image_spec.rb conflict with these spec. See failing job. They're out of scope anyways, so we'll add them back when moving spec/support to a separate project.

Next steps

Possible next steps:

  • move spec/support to a Ruby gem
  • combine the schemas and spec/support in a Docker image, to be used as the image:name of the image test job
  • move that all that to a separate project
  • use that new image in other analyzer projects, including SAST and Secret Detection analyzers

What are the relevant issue numbers?

gitlab-org/gitlab#333829 (closed)

Does this MR meet the acceptance criteria?

Edited by Fabien Catteau

Merge request reports