Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

# CodeQL advanced setup. It replaces the repository's default setup, which
# never analyses pull requests from forks -- and most pull requests here come
# from forks -- so findings only surfaced after merge. The languages, query
# suite and categories match what default setup used, so existing alerts keep
# their history.
#
# Default setup blocks uploads from this workflow while it is enabled. Switch
# it off (Settings > Code security > CodeQL analysis > Switch to advanced) when
# this file lands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this before merge, but do the recommended action after merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in ae9c9a9. The switch-to-advanced steps stay in the pull request description, and I will do them right after this merges.


name: CodeQL

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '17 4 * * 1'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this aligned with what happens currently? Seems like a random schedule

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, it was arbitrary. Default setup does not expose its cron, so I looked at its scheduled runs on main (runs that re-scanned a SHA that had already been scanned). They land on Thursdays at 08:10 UTC: 2025-12-18, 2026-02-19, 2026-03-26 and 2026-05-14 all at exactly 08:10, and 2026-06-18 at 08:19. ae9c9a9 switches the schedule to 10 8 * * 4, the same slot (next runs: Oct 8, 15, 22).


permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
# Upload results to code scanning. Pull requests from forks get a
# read-only token, and code scanning accepts their results anyway.
security-events: write
strategy:
fail-fast: false
matrix:
language:
- actions
- python
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
category: /language:${{ matrix.language }}
Loading