You want to include a slow security scan only on a nightly schedule.

BeginnerScenarioGitLab CI
Answer

Situation read → Schedule-specific jobs.

What I'd do →

  1. Create a pipeline schedule (CI/CD > Schedules) with cron 0 2 * * *.
  2. In the job: rules: - if: $CI_PIPELINE_SOURCE == "schedule".
  3. Set a schedule variable like FULL_SCAN=true if needed.

Why → Heavy scans stay off the fast feedback path.

Interview tip → Keep a quick scan on MRs and the full scan nightly.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI