Skip to content

Commit

Permalink
CI: Update CodeQL config
Browse files Browse the repository at this point in the history
Tweak to run on certain path changes, use concurrency to cancel
in-progress jobs, and add permissions for reporting.
  • Loading branch information
dopplershift committed Oct 31, 2024
1 parent dc11bc9 commit ce024fd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "CodeQL Config"

queries:
- uses: security-and-quality

paths-ignore:
- examples
30 changes: 15 additions & 15 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
name: "Code Analysis"

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
paths:
- '**.py'
- '.github/codeql/**'
- '.github/workflows/code-analysis.yml'

schedule:
- cron: '0 8 * * 6'

permissions:
contents: read
security-events: write

jobs:
CodeQL:
runs-on: ubuntu-latest
Expand All @@ -17,23 +30,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
with:
config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

0 comments on commit ce024fd

Please sign in to comment.