ci: add ruff, pip-audit, CodeQL, and least-privilege permissions#15
ci: add ruff, pip-audit, CodeQL, and least-privilege permissions#15KristianP26 wants to merge 10 commits into
Conversation
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
|
Please rebase this onto current and resolve the conflicts before reopening. Also, this PR currently mixes CI/CD changes with Ruff/security code edits in src/ and tests/, so if the intent is to keep it as a pipeline PR, please split the non-CI changes out or confirm the bundled scope. Once it’s clean and up to date, I can merge it without touching the branch myself. |
|
Please rebase this onto the current base branch and resolve the conflicts before reopening. Also, this PR currently mixes CI/CD changes with Ruff/security code edits in src/ and tests/, so if the intent is to keep it as a pipeline PR, please split the non-CI changes out or confirm the bundled scope. Once it’s clean and up to date, I can merge it without touching the branch myself. |
Summary
Strengthens CI with linting/formatting, least-privilege permissions, supply-chain CVE scanning, and static security analysis.
Changes
ruff.toml(line-length 100,target-version py311). Fixed existing lint findings (unused imports; one load-bearing unused binding inmain.pykept with# noqa: F841) and appliedruff formatacross the codebase. Newlintjob runsruff check+ruff format --check.ci.ymlnow declares top-levelpermissions: contents: read;codeql.ymlscopes its own.auditjob scansrequirements.txt+requirements-build.txtfor known CVEs (runs on Python 3.12 so thepyinstallerpin resolves). Currently clean.codeql.ymlrunning Python static analysis on push/PR tomainand weekly.Commits
Split into focused commits: ruff config → lint fixes → format → CI jobs → CodeQL → docs.
Verification
Note
The repo-wide
ruff formatcommit will conflict with the open custom-hotkeys PR (#13), which rewrites several of the same files. Suggested order: merge #13 first, then rebase this branch and re-runruff format.ruffis pinned to0.15.15in the workflow; since it isn't arequirementsmanifest, Dependabot won't bump it — update manually when desired.