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:

This is what the sast job looks like for me:

  # See
  - template: SAST.gitlab-ci.yml

# See
  stage: confidenceCheck
    - schedules

This is on

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?


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