Skip to content

Commit

Permalink
[codeql] Collect statistics weekly (#193308)
Browse files Browse the repository at this point in the history
Moves stats collection from after the analyze scan to a weekly cron.
  • Loading branch information
jbudz authored Sep 19, 2024
1 parent 60176bc commit af0582c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
# Kibana Platform Security
/.github/codeql @elastic/kibana-security
/.github/workflows/codeql.yml @elastic/kibana-security
/.github/workflows/codeql-stats.yml @elastic/kibana-security
/src/dev/eslint/security_eslint_rule_tests.ts @elastic/kibana-security
/src/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security
/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/codeql-stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CodeQL statistics

on:
schedule:
- cron: '27 0 * * 1' # At 00:27 every Monday

jobs:
stats:
name: CodeQL statistics
runs-on: ubuntu-latest
if: github.repository == 'elastic/kibana' # Hack: Do not run on forks
steps:
- name: Checkout kibana-operations
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: 'elastic/kibana-operations'
ref: main
path: ./kibana-operations
token: ${{secrets.KIBANAMACHINE_TOKEN}}

- name: CodeQL alert statistics
working-directory: ./kibana-operations/triage
env:
GITHUB_TOKEN: ${{secrets.KIBANAMACHINE_TOKEN}}
SLACK_TOKEN: ${{secrets.CODE_SCANNING_SLACK_TOKEN}}
run: |
npm ci --omit=dev
node codeql-alert-stats
9 changes: 0 additions & 9 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,3 @@ jobs:
run: |
npm ci --omit=dev
node codeql-alert
- name: CodeQL alert statistics
working-directory: ./kibana-operations/triage
env:
GITHUB_TOKEN: ${{secrets.KIBANAMACHINE_TOKEN}}
SLACK_TOKEN: ${{secrets.CODE_SCANNING_SLACK_TOKEN}}
run: |
npm ci --omit=dev
node codeql-alert-stats

0 comments on commit af0582c

Please sign in to comment.