Skip to content

ci(codeql): configure code scanning for the Python package - #165

Merged
modelmirror merged 3 commits into
mainfrom
modelmirror-patch-1
Jun 27, 2026
Merged

ci(codeql): configure code scanning for the Python package#165
modelmirror merged 3 commits into
mainfrom
modelmirror-patch-1

Conversation

@modelmirror

@modelmirror modelmirror commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Configures CodeQL code scanning for this now-public repo, replacing the
default GitHub template (which failed every PR check).

What changed from the template:

  • SHA-pin every action — the org requires full-length commit SHAs, and
    zizmor enforces it; the template's @v4 tags were rejected at job setup.
  • persist-credentials: false on checkout — required by the fork-PR
    safety gate (tests/test_workflow_fork_pr_gate.py).
  • Least privilege — top-level permissions: {}, job-level only
    security-events: write + contents: read.
  • Python only — the Actions workflows are already covered by zizmor +
    actionlint in lint-actions.yml, so the actions language is dropped.
  • Runs on PRs to main, pushes to main, and a weekly schedule; uses the
    security-and-quality query pack.

Verified locally with zizmor, actionlint, and the fork-PR gate test.

Closes #130

modelmirror and others added 2 commits June 27, 2026 17:45
Replace the default-template workflow with a repo-conventional one:
SHA-pin every action (org policy + zizmor), set persist-credentials:
false on checkout (fork-PR gate), drop top-level permissions to {} with
least-privilege job permissions, and analyze only `python` since the
Actions workflows are already covered by zizmor + actionlint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@modelmirror modelmirror changed the title Create codeql.yml ci(codeql): configure code scanning for the Python package Jun 27, 2026
@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.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@modelmirror
modelmirror merged commit 65d8c46 into main Jun 27, 2026
6 checks passed
@modelmirror
modelmirror deleted the modelmirror-patch-1 branch June 27, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable CodeQL code scanning

2 participants