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