Repository navigation
fix(ci): add Bandit SAST and detect-secrets as CodeQL replacement - #2488
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1c3763ecc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| *.docx | ||
|
|
||
| # PSA reference directory — contains overlong paths that break Windows checkout (Issue #2475) | ||
| src/shared/python/upstream_drift_tools/process_calculators/psa_package/References/ |
There was a problem hiding this comment.
Restrict ignore rule to specific overlong path(s)
The new .gitignore entry suppresses the entire psa_package/References/ tree, and this commit removes all tracked files under it (including non-overlong .md/.ipynb reference artifacts). That is broader than the stated Windows path-length fix and causes avoidable data loss while also preventing future versioning of legitimate reference material in that directory.
Useful? React with 👍 / 👎.
| python-version: "3.12" | ||
|
|
||
| - name: Install detect-secrets | ||
| run: python -m pip install detect-secrets |
There was a problem hiding this comment.
Pin detect-secrets version in the security workflow
Installing detect-secrets without a version pin makes this required check non-deterministic: a new upstream release can change baseline output semantics and fail PRs even when repository code is unchanged. Since this job enforces a baseline diff and is intended to be blocking, it should use a pinned version (as done for Bandit) to keep CI behavior stable.
Useful? React with 👍 / 👎.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6631459 to
c4b92b3
Compare
Closes #2473
Summary
.github/workflows/security.ymlwith two blocking SAST jobs that serve as the no-cost CodeQL replacementbandit-sast: runsbandit -r src/ -ll -ii(medium+ severity and confidence) as a full-repo blocking gate; excludes the same legacy directories already suppressed inci-standard.ymldetect-secrets-baseline: verifies.secrets.baselinehas not drifted on every PR and push tomain, blocking on any newly introduced secretsbandit>=1.7.7anddetect-secrets>=1.5.0to[project.optional-dependencies.dev]so contributors can install both tools locally withpip install -e ".[dev]"CodeQL remains disabled per maintainer direction (
codeql-analysis.yml.disabledis unchanged).Note:
ci-standard.ymlalready runs a delta Bandit scan on changed files; this PR adds the complementary full-repo blocking scan that was missing.Test plan
Security SAST / bandit-sastjob passes on this PRSecurity SAST / detect-secrets-baselinejob passes on this PRcodeql-analysis.yml.disabledis still present and unchangeddetect-secrets-baselineblocks it🤖 Generated with Claude Code