Surface validation errors as warnings
Why are we doing this work
Currently, when users opt-in to schema validation we DO NOT ingest reports that do not pass schema validation.
However, in %15.0 we want to enforce the schema validation. As such, in "%14.10 we would like soft-enforce schema validation and surface the validation errors as warnings in the Security tab of the Pipeline status page.
Implementation plan
- backend Extend
lib/gitlab/ci/reports/security/report.rbwithwarningsattribute - backend Extend
ee/app/models/security/scan.rbwith warnings getter and setter so the warnings get stored toSecurity::Scan#infotable - backend Extend
ee/app/presenters/security/scan_presenter.rbto presentwarnings - backend Expose
warningsinee/app/graphql/types/scan_type.rb - backend Adjust
lib/gitlab/ci/parsers/security/common.rbso that it always performs schema validation but treats the errors are warnings unlessVALIDATE_SCHEMAistrue
Edited by Michał Zając