When enabling SAST in a gitlab project you can have that kind of error at the tests part:
The yaml provided is not containing the needed part:
artifacts:
name: sast
paths:
- gl-sast-report.json
reports:
sast: gl-sast-report.json
when: always
Source:
https://gitlab.com/gitlab-org/gitlab/-/issues/345696#note_737150614