Skip to content

enable codeql for python and gh actions#5488

Open
cgoea wants to merge 3 commits into
mainfrom
users/cgoea/codeql
Open

enable codeql for python and gh actions#5488
cgoea wants to merge 3 commits into
mainfrom
users/cgoea/codeql

Conversation

@cgoea
Copy link
Copy Markdown
Contributor

@cgoea cgoea commented May 28, 2026

Motivation

Minimal implementation of codeql for python and github actions. First step in enabling codeql. Second step should compile the rock with ccache off and with codeql flags.

Technical Details

Runs on each pull request and on schedule Saturday at 10 UTC. Pull requests are limited only to paths containing python scripts and gh actions.

Submission Checklist

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@cgoea cgoea requested review from ScottTodd and marbre May 28, 2026 09:30
@HereThereBeDragons
Copy link
Copy Markdown
Contributor

@jayhawk-commits can you comment on here if we need codeql extra here or is the github code thing you enabled including it?

Comment thread .github/workflows/codeql.yml
Comment thread .github/workflows/codeql.yml
Comment thread .github/workflows/codeql.yml
Comment thread .github/workflows/codeql.yml
@jayhawk-commits
Copy link
Copy Markdown
Contributor

@jayhawk-commits can you comment on here if we need codeql extra here or is the github code thing you enabled including it?

I disabled the GitHub Code Quality feature because there was no option to disable the AI feature of it, from what I saw.

@ScottTodd
Copy link
Copy Markdown
Member

@jayhawk-commits can you comment on here if we need codeql extra here or is the github code thing you enabled including it?

I disabled the GitHub Code Quality feature because there was no option to disable the AI feature of it, from what I saw.

I wonder if "copilot code review" here lets us keep codeql but disable copilot: https://github.com/ROCm/TheRock/settings/copilot/coding_agent

image

Doesn't seem like it given https://github.com/ROCm/TheRock/settings/code-quality though
image

Comment thread .github/workflows/codeql.yml
strategy:
fail-fast: false
matrix:
language: [python, actions]
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.

maybe as a note: right now it does not support python 3.14

Python [9] | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/

push:
branches: [main]
pull_request:
branches: [main]
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.

pull_request:
    branches: [main]
    paths-ignore:
      - '**/*.md'
      - '**/*.txt'

maybe worth extending at one point
https://docs.github.com/en/code-security/reference/code-scanning/workflow-configuration-options

uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
with:
languages: ${{ matrix.language }}
queries: security-extended
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.

are we happy with the default config they are providing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

6 participants