SAST template results in invalid CI configuration

SAST template results in invalid CI configuration

Without changing anything to my .gitlab-ci.yml, I’m suddenly getting a notice that my config is invalid:

This GitLab CI configuration is invalid: jobs:sast config key may not be used with rules: except Learn more

The full config can be seen here, with the accompanying error message: .gitlab-ci.yml · master · Flockademic / Plaudit · GitLab

This is what the sast job looks like for me:

include:
  # See https://gitlab.com/help/user/project/merge_requests/sast.md
  - template: SAST.gitlab-ci.yml

# See https://gitlab.com/help/user/project/merge_requests/sast.md
sast:
  stage: confidenceCheck
  except:
    - schedules

This is on GitLab.com.

Is there a known issue with the SAST template, or am I doing something wrong?

Edit: Ah, I see I was misreading the error message to assume that it was cut off, but it looks like it’s saying the except config key. Is there another way to prevent it from being run on scheduled jobs?

Hi,

the CI templates for SAST and other security checks are moving to the rules syntax with 13.0. The error you are seeing is that you are overriding the template with the except keyword now.

Here’s a great answer: Combine only:schedules AND rules

Cheers,
Michael