Use versioned schemas when validating security reports
Why are we doing this work
Currently lib/gitlab/ci/parsers/security/validators/schema_validator.rb is not validating against the schema version declared by the report, instead it uses the schema present under lib/gitlab/ci/parsers/security/validators/schemas/ instead which is not what we want.
Implementation plan
- Adjust
lib/gitlab/ci/parsers/security/validators/schema_validator.rbso it accepts a version as an argument - Adjust
lib/gitlab/ci/parsers/security/common.rbso it passes the parsed version toSchemaValidator
Edited by Michał Zając