Repository navigation
ci: scan pull requests from forks with CodeQL advanced setup #3848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. | ||
|
|
||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| schedule: | ||
| - cron: '17 4 * * 1' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this aligned with what happens currently? Seems like a random schedule
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| 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 }} | ||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.