From 7cea6ebb1e463eec4af9d5c82eeed9ed46e8ada1 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 15 Nov 2026 19:12:45 +0100 Subject: [PATCH] ci: run Trivy scans daily and other security checks weekly --- .github/workflows/security.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index cb35fe2..0ca48ca 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -6,13 +6,16 @@ on: pull_request: branches: [main, master] schedule: - # Weekly, so advisories published after the last push still get reported. + # Daily, for the Trivy job, so advisories published after the last push still get reported. + - cron: '23 5 * * *' + # Weekly, for the secrets and code jobs. Each job's if: condition picks the entry that runs it. - cron: '23 5 * * 1' workflow_dispatch: {} jobs: secrets: name: Secrets (gitleaks) + if: github.event_name != 'schedule' || github.event.schedule == '23 5 * * 1' runs-on: ubuntu-latest permissions: contents: read @@ -35,6 +38,7 @@ jobs: code: name: Code (Semgrep) + if: github.event_name != 'schedule' || github.event.schedule == '23 5 * * 1' runs-on: ubuntu-latest permissions: contents: read @@ -55,6 +59,7 @@ jobs: dependencies: name: Dependencies (Trivy) + if: github.event_name != 'schedule' || github.event.schedule == '23 5 * * *' runs-on: ubuntu-latest permissions: contents: read