Repository navigation
fix(ci): unbreak mutation testing and clean up DHI login noise - #142
Conversation
python-mutation.yml:
- Replace 'uv pip install --no-build mutmut==2.5.1' with a range pin
'mutmut>=3.3,<4' and drop the --no-build flag.
- mutmut 2.5.1 has no wheels for the runner's Python/platform combo, so
the previous resolver line was unsatisfiable and exited 1 before any
mutation testing ran (audio-processor issue #34).
- The workflow already uses 3.x CLI syntax ('mutmut run
--paths-to-mutate=...'), so the prior 2.5.1 pin was internally
inconsistent. Range pin keeps us inside the supported API surface.
- Downstream projects that declare mutmut in dev extras get it from
'uv sync --all-extras --frozen' on the prior line; this install is
now a safety net rather than a forced downgrade.
python-container-security.yml:
- Replace docker/login-action with a shell-based conditional DHI login.
- The previous step ran unconditionally and emitted
'##[error]Username and password required' on every consumer repo that
has not configured DHI_USERNAME / DHI_PAT secrets (audio-processor
issue #33, secondary failure). continue-on-error suppressed the job
failure but the error annotation still cluttered logs.
- New form: skips with an ::notice:: when secrets are absent; uses
--password-stdin so the PAT never appears in process listings when
present. Behaviour preserved for repos that do configure DHI.
Refs: ByronWilliamsCPA/audio-processor#33, #34
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues in the shared reusable GitHub Actions workflows that were causing downstream consumer CI failures and noisy annotations, specifically around mutmut installation for mutation testing and conditional DHI registry login during container security scanning.
Changes:
- Update
python-mutation.ymlto install a mutmut 3.x compatible version (and allow sdist builds) to match the workflow’s existing 3.x CLI usage. - Replace
docker/login-actionusage inpython-container-security.ymlwith a shell-based conditional login that cleanly skips when DHI secrets are not configured.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/python-mutation.yml | Adjusts mutmut install logic to avoid an unsatisfiable pin and align with the 3.x CLI used later in the workflow. |
| .github/workflows/python-container-security.yml | Changes DHI registry login to a conditional shell step to avoid noisy errors when secrets are missing. |
| if [ -z "${DHI_USERNAME}" ] || [ -z "${DHI_PAT}" ]; then | ||
| echo "::notice::DHI credentials not configured; skipping dhi.io login (unauthenticated public pulls only)" | ||
| exit 0 | ||
| fi | ||
| echo "${DHI_PAT}" | docker login dhi.io -u "${DHI_USERNAME}" --password-stdin |
… consumer pins
SonarCloud flagged the earlier 'uv pip install mutmut>=3.3,<4' line for:
- S8541: omitting --no-build / --only-binary :all: can let setup scripts
run.
- S8544: dependency without exact version locking.
Adding --no-build back would re-introduce the original blocker (mutmut
2.5.1 had no wheels). An exact pin via 'uv pip install' would force-
downgrade consumer projects whose uv.lock resolves mutmut to a newer
version.
Cleaner fix: drop the standalone 'uv pip install' line entirely. Mutmut
is expected to be declared in the consumer project's dev extras (e.g.
audio-processor's 'mutmut>=3.3.1' in pyproject.toml), and 'uv sync
--all-extras --frozen' installs the exact version from each consumer's
uv.lock. This is fully reproducible (silences S8544), uses only the
binary distribution resolved by uv's lockfile (silences S8541), and
respects each consumer's pinning choice.
If a consumer omits mutmut from their dev deps the workflow will fail
loudly at 'mutmut run' with a clear ModuleNotFoundError; that explicit
failure mode is preferable to silently installing an arbitrary version.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The shared-workflow PR (ByronWilliamsCPA/.github#142) gained a follow-up commit dropping the standalone 'uv pip install mutmut' line entirely. This satisfies SonarCloud rules S8541 / S8544 without re-introducing the 2.5.1 wheel issue, and respects each consumer's uv.lock pin. This repo declares 'mutmut>=3.3.1' in pyproject.toml's dev extras, so 'uv sync --all-extras --frozen' continues to install mutmut from uv.lock; no behavioural change expected on this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SonarCloud's PR-diff analyzer flagged 'uv sync --all-extras --frozen $NO_BUILD_FLAG' (S8541, "omitting --no-build can lead to setup script execution") because the prior commit shifted this line into the diff hunk, and the static analyzer cannot resolve the dynamic $NO_BUILD_FLAG env var (set from inputs.no-build) to confirm --no-build is in fact passed. This is deliberately flexible behaviour: consumers with PEP 517 build backends like hatchling pass 'no-build: false' to allow editable installs of their own project from source. The residual risk is bounded by 'uv sync --frozen' refusing to resolve any version not in the consumer's audited uv.lock. Added a NOSONAR annotation with full rationale so this is explicit and auditable. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
PR ByronWilliamsCPA/.github#142 has merged. Updating SHA pins from the PR branch commit (b0c4d7d) to the merged-main commit (a81c5c7) so the workflow ref points at a permanent main-branch commit rather than a mergeable feature branch. No behavioural change; the merge commit is fast-forward equivalent to the PR's final commit on this code path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(ci): bump shared-workflow SHA and suppress base-image CVEs Closes #33 and #34. Shared workflows (ByronWilliamsCPA/.github PR #142): - Bump SHA pin in container-security.yml and mutation-testing.yml from 799ebd63 to 52940aff. - 52940aff fixes (a) mutmut install: replaces the unsatisfiable '==2.5.1' + --no-build pin with a range pin 'mutmut>=3.3,<4' that matches the 3.x CLI syntax the workflow already uses; (b) DHI login: replaces docker/login-action with a shell-based conditional login that silently skips when DHI_USERNAME / DHI_PAT are absent, eliminating the '##[error]Username and password required' annotation on every PR. - SHA points to the PR branch for now; will rebase to the merged main SHA after PR #142 lands. Trivy suppressions (.trivyignore): - CVE-2026-40393 (libgbm1, mesa-libgallium, CRITICAL, will_not_fix): headless audio service with no /dev/dri access and no graphics rendering paths; transitive only via libavcodec-extra. - CVE-2026-33846 (gnutls28, HIGH, no upstream fix): outbound TLS in application code goes through OpenSSL, not GnuTLS; GnuTLS is present only via curl and ffmpeg, which never touch untrusted TLS endpoints in the runtime request path. - CVE-2026-5673 (libtheoradec1, HIGH, fix_deferred): audio service; Theora video decoding paths are never invoked. Each suppression is documented in docs/known-vulnerabilities.md with exploitation scenario, compensating controls, and a 60-day reassess date (2026-07-17) per CLAUDE.md unfixed-CVE policy. Surfaced by /pr-review on PR #29. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(security): expand .trivyignore to cover real base-image CVE inventory The initial suppression set (from issue #33's sample table) missed several CVEs that Trivy actually reports on the python:3.12-slim runtime image, and one entry (CVE-2026-33846) was a typo in the issue and does not match any real scan finding. Corrections: - Remove CVE-2026-33846 from .trivyignore and known-vulnerabilities.md. The issue listed this against gnutls but Trivy never produced it; the actual CRITICAL gnutls CVE is CVE-2026-33845, accompanied by 3 HIGHs in the same package family. Additions, grouped by package family with shared compensating-control narrative (all transitive C libraries in the base image, none reachable from application code): curl / libcurl4t64: CVE-2026-5773, CVE-2026-6276 libexpat1: CVE-2026-25210, CVE-2026-45186 libgnutls30t64: CVE-2026-33845 (CRITICAL), CVE-2026-42010, CVE-2026-3833, CVE-2026-42011 libmbedcrypto16: CVE-2026-34873 (CRITICAL), CVE-2026-34875, CVE-2026-25835, CVE-2026-34872 ncurses family: CVE-2025-69720 libsndfile1: CVE-2026-37555 (fix_deferred) libssh-4: CVE-2026-0966, CVE-2026-3731 libssh2-1t64: CVE-2026-7598 (CRITICAL) libxml2: CVE-2026-6732 Each family is justified in docs/known-vulnerabilities.md under "Base-image transitive library CVEs" with CVE inventory tables, including reachability analysis verified by grep: - No XML parsing in src/ (libexpat1, libxml2 unreachable). - No soundfile/librosa usage in src/ yet (libsndfile1 unreachable today; reassess on audio I/O implementation). - Application TLS uses OpenSSL via Python cryptography/urllib3, never GnuTLS/mbedTLS/libssh* directly. All entries share the 2026-07-17 reassess date (60-day cap per CLAUDE.md unfixed-CVE policy). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(security): restore CVE-2026-33846 to gnutls suppression set Trivy reports CVE-2026-33846 ("affected" status) against libgnutls30t64 on the python:3.12-slim runtime image, alongside the CRITICAL CVE-2026-33845 and three other HIGHs in the same package. The earlier commit removed 33846 on the incorrect inference that issue #33 contained a typo; in fact the issue was right and 33846 is a real Trivy finding. Adding it back to .trivyignore and the docs CVE inventory under the same shared compensating-control narrative for the libgnutls30t64 family (GnuTLS is transitive via curl/ffmpeg; application TLS goes through OpenSSL via Python cryptography/urllib3 and never touches GnuTLS). After this restoration, Trivy CRITICAL/HIGH count on python:3.12-slim should drop to 0 with full documentation per the CLAUDE.md unfixed-CVE policy. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(ci): bump shared-workflow SHA to 55a3413 (Sonar fix on PR #142) The shared-workflow PR (ByronWilliamsCPA/.github#142) gained a follow-up commit dropping the standalone 'uv pip install mutmut' line entirely. This satisfies SonarCloud rules S8541 / S8544 without re-introducing the 2.5.1 wheel issue, and respects each consumer's uv.lock pin. This repo declares 'mutmut>=3.3.1' in pyproject.toml's dev extras, so 'uv sync --all-extras --frozen' continues to install mutmut from uv.lock; no behavioural change expected on this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(ci): bump shared-workflow SHA to b0c4d7d (NOSONAR rationale on PR #142) Shared workflow PR #142 added a NOSONAR annotation with rationale on the 'uv sync --no-build' line to close the residual SonarCloud S8541 finding (the env-var indirection is intentional for PEP 517 backends). No behavioural change on this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(ci): rebase shared-workflow SHA to merged main PR ByronWilliamsCPA/.github#142 has merged. Updating SHA pins from the PR branch commit (b0c4d7d) to the merged-main commit (a81c5c7) so the workflow ref points at a permanent main-branch commit rather than a mergeable feature branch. No behavioural change; the merge commit is fast-forward equivalent to the PR's final commit on this code path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>



Summary
Fixes two shared-workflow bugs that block PRs on every downstream consumer.
python-mutation.ymluv pip install --no-build 'mutmut==2.5.1'is unsatisfiable on the runner's Python/platform combo (no wheels for 2.5.1,--no-buildforbids sdist). The step exits 1 before any mutation testing runs, and the artifact upload then fails withNo files were found.mutmut run --paths-to-mutate=...on line 157). Pinning 2.5.1 was internally inconsistent with the run command.mutmut>=3.3,<4and dropped--no-build. Downstream projects that already declare mutmut in their dev extras (e.g.mutmut>=3.3.1inaudio-processor'spyproject.toml) get it fromuv sync --all-extras --frozenon the prior line; this install is now a safety net rather than a forced downgrade.python-container-security.ymldocker/login-actionran unconditionally and emitted##[error]Username and password requiredon every consumer repo withoutDHI_USERNAME/DHI_PATsecrets.continue-on-error: truesuppressed the job failure but the annotation still cluttered CI logs.::notice::when either secret is empty (clean log).--password-stdinso the PAT never appears in process listings when present.Surfacing context
Surfaced by
/pr-reviewonByronWilliamsCPA/audio-processor#29, captured in:A companion PR in
audio-processorbumps the SHA pin to this commit and adds.trivyignoreentries for the remainingwill_not_fixCVEs flagged by Trivy.Test plan
audio-processorPR temporarily pins shared-workflow ref to this branch's SHA (52940af). Mutation + container-security checks pass there.main.Generated with Claude Code