Skip to content

F14.4 — Sonar remediation and analysis targeting

State Closed
Parent E14
Iteration Release 2
Start Date 2026-10-03
Closed Date 2026-10-03
Predecessors —
Source Owner request, 2026-10-03

Stories: 7 Closed

Story State Depends on
S14.4.1 — Complete issue inventory and remediation ledger Closed (2026-10-03) —
S14.4.2 — Correct CI branch and PR attribution Closed (2026-10-03) —
S14.4.3 — Repeatable local scan and development instructions Closed (2026-10-03) —
S14.4.4 — Resolve security findings Closed (2026-10-03) —
S14.4.5 — Strengthen the three reliability tests Closed (2026-10-03) —
S14.4.6 — Resolve remaining package and test findings Closed (2026-10-03) —
S14.4.7 — Server verification and close-out Closed (2026-10-03) —

Resolve every valid finding in the current Sonar backlog, document justified false positives, provide a repeatable local scan, and ensure feature-branch scans cannot overwrite the project's main-branch analysis. Implement in the story order below, with small changes grouped by package and rule.

Context

The manual CI run analyzed commit 66b1df139ff937b7f8aeea047639b70e4cd39617 on feature/release-2. Package checks passed, but the scanner's awaited quality gate failed and ci-ok failed, as F14.2 requires. Sonar displayed this feature-branch analysis under main.

The summary reviewed on 2026-10-03 showed 109 open issues in a three-month new-code period. Security D and Reliability C failed their required A ratings; coverage 94.16% passed the 80% minimum, and duplication 0% passed the 3% maximum. Four vulnerability findings and three bug findings block those ratings. The remaining findings still belong to this feature: passing the gate alone does not complete it.

The count is a baseline observation, not a fixed assertion. Refresh the complete inventory before fixing code. .sonar-cleanup/issues-2026-08-24.json contains only four older findings and cannot stand in for the current backlog. Local temporary exports belong in the already ignored .sonar-cleanup/; neither tokens nor authenticated request headers belong in committed artifacts.

F14.2's workflow-run checks were closed separately. This feature must preserve its fork guard, awaited gate, ci-ok aggregation and independent package release gating.

Design

Inventory and disposition

Use Sonar's issue search API or UI, selecting the correct project and branch explicitly. Export every page, not just the first 50 or 100 results. Inventory overall code, without a new-code-only filter, and include Open, Confirmed and Accepted findings; review existing False Positive dispositions separately for relevance. Inspect security hotspots separately if any are present.

For each issue record: issue key/link, rule ID, file and current line, message, severity/quality, status, affected symbol, proposed disposition, implementation story, and validation. Group by package and rule after collecting the full list. Read the official rule explanation and surrounding code before choosing a fix. Issue lines can move; locate the affected symbol rather than applying a stale line number mechanically.

Each baseline issue must end as fixed or as a justified false positive. Accepted valid debt does not count as resolved. For a false positive, explain the actual contract, why the rule does not apply and the existing or added test that proves it. Prepare exact reviewable Sonar comments and status changes; apply them only with owner authorization. A false-positive proposal alone does not complete acceptance. Do not weaken quality profiles, gate thresholds, the new-code period, or analysis scope to make findings disappear; do not add blanket exclusions or NOSONAR comments.

Branch attribution

Change only the Sonar job's targeting inputs in .github/workflows/main.yml. Pass branch names through step environment variables, never interpolate untrusted branch text directly into executable shell code. Keep branch/PR parameters out of the shared sonar-project.properties.

Event Analysis target Required behavior
Push to main Branch main Explicit sonar.branch.name=main
Manual dispatch on a branch That exact github.ref_name Explicit sonar.branch.name; feature/release-2 stays intact, including /
Same-repository PR PR number/head/base Preserve GitHub PR autodetection; pass no branch-analysis parameter
Fork PR None Preserve F14.2's skip without a token
Manual dispatch on a tag None Fail before scanning with a clear unsupported-ref message

Use a small parameter-preparation step and pass its branch argument to the existing pinned scan action alongside the discovered sources/tests and sonar.qualitygate.wait=true. For PRs, emit an empty branch argument. If PR autodetection proves unreliable in the validation run, explicitly pass sonar.pullrequest.key, .branch, and .base from PR metadata together; never combine those with sonar.branch.name.

Before the first upload, verify that the Sonar project's configured main branch is main, that CI-based analysis is enabled, and that the organization plan supports branch/PR analysis. Public repository visibility alone does not establish its plan. Sonar's OSS plan supports branch and PR analysis; other plans have their own limits. If branch analysis is unavailable, stop that validation and record the exact limitation; do not upload feature code as main or silently skip the gate. Changing a subscription or project settings requires owner approval.

The observed misattribution is consistent with a manual dispatch missing branch parameters. Verify the fix using scanner parameters and the resulting server analysis, not just the displayed branch selector. A correctly targeted scan of real main is needed to restore its latest result; changing future scanner arguments does not move the earlier analysis into another branch. Do not delete history or rename main to the feature branch.

Local feedback

Use SonarQube for IDE in connected mode for immediate rule feedback. A full SonarScanner CLI run can analyze the local working tree before commit/push, but requires network access and uploads code/results to SonarCloud. Its result uses the project's server rules and gate; it is not an offline lint command. Some checks, including taint analysis, need server analysis and cannot be certified by an IDE-only check.

Add .github/scripts/sonar_local.py using the Python standard library and existing planner functions. It accepts --dry-run and --branch <name>; the default target is the current Git branch. It must:

  1. Resolve the repository root and operate there. Read workspace membership through workspace_ci; reuse plan("") outputs for cov-args, test-paths, sonar-sources and sonar-tests, rather than maintaining a package list.
  2. Parse planner output as key=value; use shlex.split only for the planner's shell-quoted coverage/test arguments. Do not execute planner output using eval, source or shell=True.
  3. Reject detached HEAD unless an explicit non-main branch is supplied. Reject main as a local upload target, including an explicit override. If --branch is supplied while on another named branch, require it to equal that branch; do not label unrelated source as a different branch. Allow dirty working trees for pre-push feedback and state that an uncommitted scan is not CI evidence for a commit.
  4. In dry-run mode, print the target and exact test/scanner commands without requiring a token, running tests or uploading. In scan mode, require SONAR_TOKEN in the environment and an installed sonar-scanner; never print the token or pass it as a command-line argument. Do not install tools or dependencies automatically.
  5. Run the same workspace-wide coverage command as CI: uv run pytest <cov-args> --cov-report=xml:coverage.xml <test-paths>. Stop on test failure. Regenerate coverage for every full scan, so stale coverage cannot qualify the gate.
  6. Run sonar-scanner with -Dsonar.host.url=https://sonarcloud.io, discovered sources/tests, the explicit branch, -Dsonar.qualitygate.wait=true, and -Dsonar.working.directory=.sonar-cleanup/scanner. Use argument arrays and preserve scanner failure status. Reuse root properties for project, organization, Python version and coverage report path. Set the subprocess environment for local execution so inherited GitHub CI metadata cannot accidentally activate PR autodetection.

Document official scanner installation, owner-provided token setup and plan prerequisites in the development guide. Do not introduce a project dependency for the scanner. The intended commands, after implementation and toolchain setup, are:

python3 .github/scripts/sonar_local.py --dry-run
python3 .github/scripts/sonar_local.py

The second command uploads results and requires a non-main target with branch-analysis support. It may still take about a minute for analysis plus test time; the reviewed CI scan took about 59 seconds after coverage tests. Use narrow package checks between edits and full scans at meaningful batch boundaries.

Known gate blockers

Finding Location at baseline Implementation guidance
JWT signature commons/integration/auth.py:257, JwtVerifier.verify The unverified header supplies kid/alg; the allowlist and subsequent jwt.decode verify the signature and registered claims before returning them. Review as a likely false positive; retain this security flow. Do not remove verification, broaden algorithms or authenticate from header contents.
Sequence DDL django/models/sequences.py:79, next_value Interpolates self.name into CREATE SEQUENCE. Constructor validation exists, but the public attribute can be reassigned.
Sequence DDL django/models/sequences.py:98, ensure_at_least Same mutable identifier boundary.
Sequence query django/models/sequences.py:99, ensure_at_least Interpolates the table/sequence identifier for reading its state.
Repeated expression tooling/tests/test_state.py:102, TestContentHash.test_of_deterministic Use independently specified expected SHA-256 output plus a repeated-call check. Preserve different-content and str/bytes coverage.
Repeated expression web/tests/test_idempotency.py:36, test_hash_is_stable_across_calls Freeze an expected digest derived from the documented canonical body encoding; verify repeatability without duplicating the same expression inside one assertion. Preserve key-order and type distinction tests.
Repeated expression web/tests/test_pagination.py:39, test_encoding_is_stable_for_the_same_input Check a known cursor encoding and its decoded value as well as repeated calls. Keep the wire format unchanged.

For sequences, keep name's existing public behavior and revalidate the current value immediately before each PostgreSQL identifier use. Quote with the active Django connection's ops.quote_name after validation; keep values bound in nextval/setval. Use the same safe path for both methods. Test constructor rejection, reassignment to an unsafe name, and existing PostgreSQL allocation/backfill behavior. Do not claim a real injection vulnerability solely from Sonar's label; report the actual reachable boundary and any remaining analyzer false positive separately.

For repeated calls, assigning the two results to variables only to disguise identical expressions is insufficient. The test must fail for a wrong but deterministic implementation; fixed expected values make that behavior observable.

Remaining issue families

The first page reviewed includes these families; the complete inventory may add more. Apply the same per-issue triage to every later page.

Family/examples Fix boundaries
Async functions without awaits: FastAPI app/auth/problem handlers, web in-memory idempotency store Inspect the framework/protocol contract. Do not convert required async exception handlers or async store methods to sync, and do not add dummy awaits. Use a justified false-positive disposition when required by the contract; convert only functions whose callers and contract permit it.
Keyboard interruption: CLI app.py:89 Read lifecycle and exit-code tests; preserve intended cancellation/cleanup behavior. Fix only if interruption is swallowed incorrectly; prove exit behavior before changing it.
Worksheet.add_table type: commons data/excel.py:289 Check the installed openpyxl API/type stubs and existing table tests. It receives an openpyxl Table; do not change a correct runtime argument to satisfy a misinferred type.
Cognitive complexity: commons lang/collections.py, sqlalchemy upsert.py, tooling generation apply.py/plan.py Extract cohesive private helpers only where they reduce real branching. Preserve order, transactional behavior, exceptions and public signatures; run the corresponding test module.
Repeated literals: Django DRF transfer, tooling facade, web conformance cases Introduce meaningful module constants or actual type aliases according to use. Do not turn type annotations into runtime string constants. Keep optional imports outside curated facades.
Multiple calls in exception tests Move setup outside pytest.raises; leave the one operation expected to raise inside it. Preserve the tested error and message.
Composite assertions, unused parameters, generic syntax Split independent assertions; distinguish public/protocol parameters from unused private ones; use Python 3.14 generic syntax only where behavior and typing remain equivalent.

Read each package's README and relevant tests before editing it. Respect CLAUDE.md, strict Pyright, import contracts and test layout. Add regression tests for behavior changes; avoid tests that merely mirror cosmetic edits. Do not remove valid test coverage to silence Sonar. Public behavior changes require an explicit compatibility assessment; do not assume Release 2 is CI-only once package code changes.

S14.4.1 — Complete issue inventory and remediation ledger

State: Closed (2026-10-03)

Create a compact ledger in this feature after exporting the complete current inventory. Keep raw exports ignored; link each issue and assign it to a story below. Record branch, analysis revision, rule/profile context, counts by rule/package/status and any hotspots. Unknown rule families must receive concrete implementation and test guidance before a less capable model starts their batch.

Acceptance: pagination is exhausted; every baseline issue has a key, proposed disposition and implementation story; ledger totals reconcile with the export; the stale four-issue export is not used as the baseline.

S14.4.2 — Correct CI branch and PR attribution

State: Closed (2026-10-03)

Implemented: workspace_ci.py sonar-target and the sonar job's target step, tested in .github/scripts/tests/test_workspace_ci.py.

The 2026-10-03 dispatch of 975cb36 passed -Dsonar.branch.name=feature/release-2; Sonar created that short branch and left main's latest analysis (13:35) untouched. The gate wait then failed: the organization's plan rejects reading non-main branch data ("Organization is not allowed to access data from non main branches"). Pull request analysis is available. Branch-dispatch gating needs an owner plan decision, parked in ideas; PR analysis is the validation route.

Main-push attribution verified at ca04bca (2026-10-03): the main analysis was attributed to main. PR analysis attached to PR 4. Tag dispatch and the fork guard are covered by the mocked tests.

Implement the event matrix above; verify project prerequisites before uploading. Add narrow tests of parameter preparation with mocked event metadata/scanner calls, covering slash-containing branch names, main push, dispatch branch, dispatch tag, same-repository PR and fork PR. Run actionlint.

Acceptance: manual feature/release-2 analysis appears under that exact branch and leaves main's latest analysis untouched; PR analysis is attached to the PR; main push targets main; tag dispatch fails before scanning; the fork guard and gate failure propagation remain intact. Restore main's latest result by analyzing actual main through the normal workflow, with owner authorization for any manual trigger.

Amended 2026-10-03: reading the gate for a branch dispatch is blocked by the Sonar plan, so the gate is validated through PR analysis instead (PR 4); the plan decision moved to ideas. Exact-branch dispatch and main-untouched were recorded above; tag dispatch and the fork guard are covered by the mocked tests.

S14.4.3 — Repeatable local scan and development instructions

State: Closed (2026-10-03)

Implemented: .github/scripts/sonar_local.py, its tests and the development guide's Sonar section; dry-run matches the planner's scope.

Implement sonar_local.py and the development-guide instructions above. Add subprocess-mocked tests in .github/scripts/tests/test_sonar_local.py for package discovery, shell-safe arguments, dry-run, missing scanner/token, branch safeguards, inherited CI metadata and failed tests/scanner. Use root pytest configuration; add no tests/__init__.py.

Acceptance: dry-run matches CI's discovered scope and coverage arguments; an authorized full local scan analyzes unpushed changes on the intended branch, imports fresh coverage and returns the real gate status. It never overwrites main or exposes a token. Ruff check/format, targeted helper tests and the strict docs build pass.

Amended 2026-10-03: acceptance is the dry-run plus the mocked tests. sonar-scanner is not installed and no SONAR_TOKEN was provided, so the full local scan was never run; it moved to ideas. Update 2026-11-13: the owner ran it with kiln's task sonar:local, recorded on S16.8.1.

S14.4.4 — Resolve security findings

State: Closed (2026-10-03)

Triage all security findings from S14.4.1, starting with JWT verification and the three sequence queries. Preserve signature, issuer, audience, expiry and algorithm checks. Implement identifier safety and test reassignment at the query boundary. Prepare evidence-backed false-positive dispositions where the remaining warning does not describe a defect.

Acceptance: relevant JWT and Django sequence tests pass, including PostgreSQL checks for SQL changes; no valid unresolved security finding remains in the baseline; every false-positive status has authorized review evidence. Sonar's security gate condition passes.

On main (2026-10-03), the S5659 finding and the other proposed false positives were set to False Positive with owner authorization; main's security rating is A and its gate is OK on every condition. See the main analysis section.

S14.4.5 — Strengthen the three reliability tests

State: Closed (2026-10-03)

Replace the repeated-expression assertions according to the blocker table. Derive expected values independently from the existing format/algorithm; do not alter production output to fit new fixtures.

Acceptance: the three targeted tests detect incorrect deterministic results, retain repeatability coverage and pass with current contracts. A full scan resolves all three baseline bugs and passes the reliability gate condition.

On main at ca04bca (2026-10-03), reliability is rated A and no bug is open.

S14.4.6 — Resolve remaining package and test findings

State: Closed (2026-10-03)

Every baseline row is fixed or dispositioned: on main (2026-10-03) the proposed false positives were applied with owner authorization, and the last open issue, S5778 at test_pagination.py, is fixed by 5f0c249.

Work through every remaining inventory entry, grouped by package/rule, using the family guidance above. Update the ledger after each batch. Validate the changed package with Ruff, strict type checks for source changes and its affected test modules; run PostgreSQL or scaffold checks only where their paths change. Update package docs when a contract changes.

Acceptance: every remaining baseline issue is fixed or an authorized justified false positive; no valid issue is hidden by acceptance, exclusion, weakened rules or lost tests. Package checks pass and all newly raised findings from the remediation are also resolved.

S14.4.7 — Server verification and close-out

State: Closed (2026-10-03)

Regenerate workspace coverage, scan the remediation branch, reconcile server dispositions with the full ledger, and run CI for the final committed revision. After merge, validate actual main separately; a short-lived branch or PR's differential report cannot prove the entire main backlog is resolved.

Acceptance: final branch/PR CI and quality gate pass; main's scan identifies actual main's commit, passes the existing gate and has zero unresolved valid findings across overall code. Every baseline key is accounted for, all necessary false-positive dispositions have been applied with authorization, and no remediation-introduced valid finding remains. Record analysis links/revisions and checks; then close the stories, feature and generated release scope.

Amended 2026-10-03: the reconciliation was done against main at ca04bca after the dispositions (see the main analysis section). The final confirmation is this close-out PR's gate plus the post-merge main push, whose ci-ok fails if the Sonar gate fails. If that run fails, this feature is reopened.

Remediation ledger

Inventory scope

Collected 2026-10-03 from api/issues/search, explicitly selecting project rn-forge_pykit and branch main, without status or new-code filters. Pages 1/2/3 (ps=100) returned 100/12/0 issues; 112 unique keys reconcile with the server total. The baseline is 109 Open, 0 Confirmed, 0 Accepted findings: 4 vulnerabilities, 3 bugs and 102 code smells. Separately reviewed: 2 existing False Positive dispositions and 1 Fixed issue. Hotspot search returned total 0. Raw responses are ignored under .sonar-cleanup/pykit-sonar-*.json; the older four-issue export is not used.

The configured main branch is main; its latest analysis is ff20d577-8bb9-46a5-8b5a-b816e22f9ef9, dated 2026-10-03T13:35:14+0000, revision 66b1df139ff937b7f8aeea047639b70e4cd39617. See the server analysis. Python uses Sonar way comprehensive, profile AZ8_DnGvbv8odgpIPN27, 490 active rules, updated 2026-09-29T13:44:28+0000. Official rule metadata is exported as .sonar-cleanup/rule-S*.json. The public API hides explanation text from anonymous users (documented in api/webservices/list); authenticated rule explanations must be read before implementation/disposition. No server statuses or project settings have been changed. On 2026-10-03 (S14.4.2) the project listed main as its only branch (LONG, main) and three CI-analyzed pull requests, so CI-based analysis and PR analysis are available; branch analysis is confirmed by the first targeted feature-branch scan.

Counts

Package Open Confirmed Accepted Existing False Positive Fixed
rn-forge-cli 4 0 0 0 0
rn-forge-commons 20 0 0 1 1
rn-forge-django 25 0 0 1 0
rn-forge-fastapi 6 0 0 0 0
rn-forge-sqlalchemy 4 0 0 0 0
rn-forge-tooling 26 0 0 0 0
rn-forge-web 24 0 0 0 0
Rule Baseline Separate review
python:S1110 1 0
python:S1172 3 0
python:S1192 14 0
python:S2077 3 1
python:S3358 1 0
python:S3776 4 0
python:S5655 1 1
python:S5659 1 0
python:S5713 1 0
python:S5754 1 0
python:S5778 54 0
python:S5863 3 0
python:S5958 1 0
python:S6792 2 0
python:S6794 1 0
python:S6796 1 0
python:S7483 2 0
python:S7503 7 0
python:S7504 2 0
python:S7508 1 0
python:S7632 1 0
python:S8997 1 0
python:S9073 3 0
python:S930 0 1

Batch guidance and validation

Each row below inherits its rule's guidance and the feature's known-blocker instructions. Fix and FP review are proposed dispositions, not server resolution claims. Run Ruff check/format on each changed batch, strict Pyright for source changes, and the indicated affected tests. Each issue's disposition was reconciled against main at ca04bca (S14.4.7). False-positive reviews require exact evidence and owner-authorized server comments/status changes.

Rule Implementation/disposition guidance Validation
S5659 Read only kid/alg from the unverified header; retain subsequent verified decode and algorithm allowlist. Propose FP after proving no claims escape before verification. commons tests/integration/test_token_verification.py, web tests/test_oidc.py
S2077 Revalidate mutable sequence name at every PostgreSQL identifier boundary, then connection-quote it; keep values bound. Review existing quoted-table FP separately. Django tests/models/test_sequences.py, tests/test_models.py, including PostgreSQL allocation/backfill
S5863 Independently freeze correct SHA-256/canonical-body/cursor fixtures and retain repeated calls. Never change production wire output to fit fixtures. tooling tests/test_state.py, web tests/test_idempotency.py, tests/test_pagination.py
S5778 Move constructors, request/row factories and other argument setup outside pytest.raises; keep the tested invocation and exception/message. For the lock test enter the lock before the raises block; prove release on exception. Each ledger row's test module; preserve all negative scenarios
S1192 Meaningful module constants for conformance/facade literals; real type aliases for DRF cast annotations, preserving optional import boundaries. web conformance/suite tests, tooling facade imports, Django tests/drf/test_transfer.py; Pyright
S3776 Extract cohesive merge/provenance, upsert classification, generation classification/write helpers; preserve ordering, rollback and public signatures. commons tests/lang/test_collections.py, sqlalchemy tests/test_upsert.py, tooling tests/generation/test_generation.py
S7503 Keep required async stores and exception handlers; propose FP with await/call-site evidence. API catalog and auth dependency can become sync only if framework/callers permit it. No dummy awaits. web tests/test_idempotency.py, FastAPI tests/test_app.py, tests/test_auth.py, tests/test_problem.py
S5754 Reported expression catches SystemExit/typer.Exit, not KeyboardInterrupt. Preserve run's exit-code-return contract and outer console-script exit; propose FP with explicit-exit tests. CLI tests/test_app.py explicit exit and cancellation cases
S5655 Keep openpyxl Table argument; confirm installed Worksheet API/stubs and round-trip table behavior before proposing FP. Old closed excel.py issue migrated to data/excel.py and is not evidence of a fix. commons tests/data/test_excel.py table creation/resizing
S3358 Extract pagination direction tie-breaker into a statement; preserve unique-key and ascending/descending ordering. Django tests/drf/test_pagination.py
S5958 Assert Pydantic ValidationError for frozen model assignment, including frozen-instance error and unchanged field. commons tests/lang/test_models.py
S1172 Retain ObjectStore.put content_type and ReleaseSource.checksum version protocol parameters; propose FP with call-site/protocol evidence. commons tests/integration/test_objects.py, tooling tests/install/
S9073 Split independent assertions without removing conditions or changing order-sensitive setup. Each ledger row's test module
S7504 DRF found dict is stable: iterate values directly. Provenance dict is mutated during iteration: preserve snapshot or precompute descendant keys before deleting; never iterate a live mutated view. Django tests/drf/test_transfer.py, commons tests/lang/test_collections.py provenance cleanup
S7483 Use asyncio.timeout around per-check await; retain public run_checks(timeout=...) contract (FP review for parameter). Preserve cancellation and distinguish a check's own TimeoutError from deadline expiry. web tests/test_health.py bounded checks/cancellation/failures
S7632 Keep record-then-reraise catch. Separate BLE001 justification from the noqa syntax if required by rule explanation; add no NOSONAR. Django tests/messaging/test_consumer.py persisted attempts/errors and reraising
S5713 Confirm binascii.Error subclasses ValueError, then remove redundant subclass from except tuple. web tests/test_pagination.py malformed-base64 400 contract
S7508 Sort the typed set/frozenset directly, removing redundant list materialization. Preserve repr-based ordering. commons tests/fs/test_documents.py JSON set/frozenset output
S6792 PEP 695 class generics; preserve StateStore's DataclassMixin bound and EntryPointLoader's type relation. tooling tests/test_state.py, commons tests/runtime/test_plugins.py; Pyright
S6796 StateStore.record uses class-level E: do not introduce an independent method type variable. Class-generic conversion may resolve it; otherwise FP with type-relation evidence. tooling tests/test_state.py; Pyright
S8997 Use monkeypatch.setattr for AppLogger._configured reset, with fixture-driven restoration. Preserve handler cleanup. commons tests/logging/test_structlog.py
S1110 Remove redundant Exception parentheses; preserve exception mapping. Django JWT utility tests
S6794 EnumFieldBase is used as a subclass base; PEP 695 TypeAliasType cannot replace it. Propose FP with EnumField type/import evidence; remove existing ineffective NOSONAR only with authorized disposition. Django enum-field tests/imports; Pyright
S930 Existing FP: assertpy.assert_that supports description keyword, and wrapper failure test proves label propagation. Retain disposition. commons tests/test_testing.py::TestAssertThat::test_description_on_failure

Baseline issues

Paths below are relative to packages/. The location/symbol is the current checkout location; server line numbers match this checkout at inventory time. Quality abbreviations: M = Maintainability, R = Reliability, S = Security. Validation is the matching batch above; test findings run their own module.

Issue Rule File:line · symbol Message Severity / quality Status Proposed disposition Story Validation
AaDlAluiQZe-aMZiDjQj S5754 rn-forge-cli/src/rn_forge/cli/app.py:89 · run Reraise this exception to stop the application as the user expects CRITICAL / M:HIGH OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAluOQZe-aMZiDjQg S5778 rn-forge-cli/tests/test_surface.py:87 · TestSurfaceValidation.test_duplicate_command_names_are_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAluOQZe-aMZiDjQh S5778 rn-forge-cli/tests/test_surface.py:133 · TestFromSurface.test_an_unimportable_target_is_reported_with_its_command Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAluOQZe-aMZiDjQi S5778 rn-forge-cli/tests/test_surface.py:144 · TestFromSurface.test_a_target_that_is_neither_app_nor_callable_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAljQQZe-aMZiDjQF S1172 rn-forge-commons/src/rn_forge/commons/integration/objects.py:89 · InMemoryObjectStore.put Remove the unused function parameter "content_type". MAJOR / M:MEDIUM OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAljyQZe-aMZiDjQG S3776 rn-forge-commons/src/rn_forge/commons/lang/collections.py:728 · _deep_merge_layer Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlgzQZe-aMZiDjQD S5655 rn-forge-commons/src/rn_forge/commons/data/excel.py:289 · ExcelUtils.add_table Change this argument; Function "add_table" expects a different type CRITICAL / M:HIGH OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAlizQZe-aMZiDjQE S5659 rn-forge-commons/src/rn_forge/commons/integration/auth.py:257 · JwtVerifier.verify Don't use a JWT token without verifying its signature. CRITICAL / S:HIGH OPEN FP review S14.4.4 False Positive applied on main 2026-10-03 (owner)
AaDlAleIQZe-aMZiDjP- S5778 rn-forge-commons/tests/fs/test_blocks.py:94 · TestMalformed.test_malformed_markers_raise Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlecQZe-aMZiDjP_ S5778 rn-forge-commons/tests/fs/test_locks.py:69 · TestDirectoryLock.test_lock_released_on_exception Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlc2QZe-aMZiDjP8 S5778 rn-forge-commons/tests/integration/test_objects.py:47 · TestInMemoryObjectStore.test_url_for_raises_on_in_memory_store Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP0 S5778 rn-forge-commons/tests/integration/test_token_verification.py:99 · TestJwtVerifier.test_bad_claims_fail Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP1 S5778 rn-forge-commons/tests/integration/test_token_verification.py:103 · TestJwtVerifier.test_wrong_signature_fails Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP2 S5778 rn-forge-commons/tests/integration/test_token_verification.py:107 · TestJwtVerifier.test_malformed_token_fails Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP3 S5778 rn-forge-commons/tests/integration/test_token_verification.py:114 · TestJwtVerifier.test_hmac_token_is_rejected_by_the_allow_list Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP4 S5778 rn-forge-commons/tests/integration/test_token_verification.py:119 · TestJwtVerifier.test_token_without_kid_fails Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP5 S5778 rn-forge-commons/tests/integration/test_token_verification.py:146 · TestJwksCache.test_refetch_is_bounded_under_a_forged_kid_storm Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlaKQZe-aMZiDjP6 S5778 rn-forge-commons/tests/integration/test_token_verification.py:159 · TestJwksCache.test_unusable_key_set_fails Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAldYQZe-aMZiDjP9 S5958 rn-forge-commons/tests/lang/test_models.py:78 · test_strict_models_are_frozen This assertion is too broad; use a more specific exception type or check the exception message. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlgSQZe-aMZiDjQC S6792 rn-forge-commons/src/rn_forge/commons/runtime/plugins.py:28 · EntryPointLoader Use the "type" parameter syntax to declare this generic class. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAljyQZe-aMZiDjQH S7504 rn-forge-commons/src/rn_forge/commons/lang/collections.py:773 · _deep_merge_layer Remove this unnecessary list() call on an already iterable object. MINOR / M:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAlfyQZe-aMZiDjQB S7508 rn-forge-commons/src/rn_forge/commons/fs/documents.py:697 · _json_default Remove this redundant call. MINOR / M:LOW OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAle4QZe-aMZiDjQA S8997 rn-forge-commons/tests/logging/test_structlog.py:136 · TestSameSink.test_json_mode_output_contains_structured_fields Use the "monkeypatch" fixture for temporary modifications instead of manually modifying global state. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlciQZe-aMZiDjP7 S9073 rn-forge-commons/tests/integration/test_resilience.py:133 · TestRateLimiter.test_an_epoch_reset_is_measured_against_the_wall_clock Split this composite assertion into separate assertions. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlpzQZe-aMZiDjQb S1110 rn-forge-django/src/rn_forge/django/auth/jwt/utils.py:93 · JWTUtils.validate_login_exchange_token Remove those redundant parentheses. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlofQZe-aMZiDjQX S1192 rn-forge-django/src/rn_forge/django/drf/transfer.py:146 · ResourceExportMixin.get_renderers Define a constant instead of duplicating this literal "list[Any]" 4 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlofQZe-aMZiDjQY S1192 rn-forge-django/src/rn_forge/django/drf/transfer.py:466 · _list_member Define a constant instead of duplicating this literal "list[object]" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlrLQZe-aMZiDjQc S2077 rn-forge-django/src/rn_forge/django/models/sequences.py:79 · SequenceGenerator.next_value Make sure that formatting this SQL query is safe here. MAJOR / S:MEDIUM, M:LOW OPEN Fix S14.4.4 Fixed (S14.4.4); not open on main at ca04bca
AaDlAlrLQZe-aMZiDjQd S2077 rn-forge-django/src/rn_forge/django/models/sequences.py:98 · SequenceGenerator.ensure_at_least Make sure that formatting this SQL query is safe here. MAJOR / S:MEDIUM, M:LOW OPEN Fix S14.4.4 Fixed (S14.4.4); not open on main at ca04bca
AaDlAlrLQZe-aMZiDjQe S2077 rn-forge-django/src/rn_forge/django/models/sequences.py:99 · SequenceGenerator.ensure_at_least Make sure that formatting this SQL query is safe here. MAJOR / S:MEDIUM, M:LOW OPEN Fix S14.4.4 Fixed (S14.4.4); not open on main at ca04bca
AaDlAlo4QZe-aMZiDjQa S3358 rn-forge-django/src/rn_forge/django/drf/pagination.py:140 · CursorPagination.paginate_queryset Extract this nested conditional expression into an independent statement. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllcQZe-aMZiDjQN S5778 rn-forge-django/tests/drf/test_concurrency.py:56 · TestEnforceVersion.test_malformed_header_raises Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllcQZe-aMZiDjQO S5778 rn-forge-django/tests/drf/test_concurrency.py:61 · TestEnforceVersion.test_body_version_fallback Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllcQZe-aMZiDjQP S5778 rn-forge-django/tests/drf/test_concurrency.py:66 · TestEnforceVersion.test_malformed_body_version_raises Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllcQZe-aMZiDjQQ S5778 rn-forge-django/tests/drf/test_concurrency.py:84 · TestEnforceVersion.test_entity_codec_binds_the_id Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllCQZe-aMZiDjQI S5778 rn-forge-django/tests/drf/test_pagination.py:102 · TestTokens.test_tampered_token_raises_invalid_cursor Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllDQZe-aMZiDjQJ S5778 rn-forge-django/tests/drf/test_pagination.py:117 · TestTokens.test_drf_encoded_cursor_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllDQZe-aMZiDjQK S5778 rn-forge-django/tests/drf/test_pagination.py:188 · TestOrderBy.test_token_with_a_different_order_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllDQZe-aMZiDjQL S5778 rn-forge-django/tests/drf/test_pagination.py:192 · TestOrderBy.test_unlisted_field_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAllDQZe-aMZiDjQM S5778 rn-forge-django/tests/drf/test_pagination.py:232 · TestNonUniqueSortField.test_token_value_that_does_not_fit_the_field_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed in 5f0c249 (S14.4.6)
AaDlAlnoQZe-aMZiDjQU S5778 rn-forge-django/tests/messaging/test_consumer.py:57 · TestProcessEvent.test_unknown_type_is_recorded_and_raised Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlnoQZe-aMZiDjQV S5778 rn-forge-django/tests/messaging/test_consumer.py:71 · TestProcessEvent.test_handler_failure_is_recorded_reraised_and_its_writes_rolled_back Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlnoQZe-aMZiDjQW S5778 rn-forge-django/tests/messaging/test_consumer.py:88 · TestProcessEvent.test_retry_after_failure_succeeds_and_clears_the_error Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlnWQZe-aMZiDjQS S5778 rn-forge-django/tests/messaging/test_relay.py:99 · TestRelay.test_publish_failure_leaves_the_batch_unpublished Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaA1hSuFwMHT6jYRL55n S6794 rn-forge-django/src/rn_forge/django/_typing.py:66 · module Use a "type" statement instead of this "TypeAlias". MAJOR / M:MEDIUM OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAlofQZe-aMZiDjQZ S7504 rn-forge-django/src/rn_forge/django/drf/transfer.py:451 · BatchDeleteMixin.batch_delete Remove this unnecessary list() call on an already iterable object. MINOR / M:LOW OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlssQZe-aMZiDjQf S7632 rn-forge-django/src/rn_forge/django/messaging/consumer.py:76 · process_event Fix the syntax of this issue suppression comment. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlnWQZe-aMZiDjQT S9073 rn-forge-django/tests/messaging/test_relay.py:113 · TestRelay.test_lag_and_log_hooks Split this composite assertion into separate assertions. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlnBQZe-aMZiDjQR S9073 rn-forge-django/tests/test_utils.py:283 · TestRequireSettings.test_names_every_missing_or_blank_setting_at_once Split this composite assertion into separate assertions. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPHufQY1WC_tVk6- S5778 rn-forge-fastapi/tests/test_transfer.py:133 · test_read_rows_rejects_an_unknown_type Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPLafQY1WC_tVk6_ S7503 rn-forge-fastapi/src/rn_forge/fastapi/app.py:181 · FastApiApp._api_catalog Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPL_fQY1WC_tVk7D S7503 rn-forge-fastapi/src/rn_forge/fastapi/auth.py:106 · requires.dependency Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN Fix S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDqbPLtfQY1WC_tVk7A S7503 rn-forge-fastapi/src/rn_forge/fastapi/problem.py:99 · register_problem_handlers.on_exception Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDqbPLtfQY1WC_tVk7B S7503 rn-forge-fastapi/src/rn_forge/fastapi/problem.py:102 · register_problem_handlers.on_http_exception Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDqbPLtfQY1WC_tVk7C S7503 rn-forge-fastapi/src/rn_forge/fastapi/problem.py:113 · register_problem_handlers.on_validation_error Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDqbPSWfQY1WC_tVk7E S3776 rn-forge-sqlalchemy/src/rn_forge/sqlalchemy/upsert.py:31 · upsert Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPSzfQY1WC_tVk7F S5778 rn-forge-sqlalchemy/tests/test_pagination.py:104 · test_a_token_for_another_order_by_is_invalid_cursor Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPSzfQY1WC_tVk7G S5778 rn-forge-sqlalchemy/tests/test_pagination.py:118 · test_a_token_value_that_does_not_fit_the_column_is_invalid_cursor Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDqbPS-fQY1WC_tVk7H S5778 rn-forge-sqlalchemy/tests/test_upsert.py:91 · test_a_duplicate_key_in_the_input_raises Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAl02QZe-aMZiDjRR S1172 rn-forge-tooling/src/rn_forge/tooling/install/release.py:113 · GitHubReleases.checksum Remove the unused function parameter "version". MAJOR / M:MEDIUM OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAl02QZe-aMZiDjRS S1172 rn-forge-tooling/src/rn_forge/tooling/install/release.py:152 · LocalArchive.checksum Remove the unused function parameter "version". MAJOR / M:MEDIUM OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAl1YQZe-aMZiDjRT S1192 rn-forge-tooling/src/rn_forge/tooling/__init__.py:23 · module Define a constant instead of duplicating this literal "rn_forge.tooling.install" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAl0dQZe-aMZiDjRQ S3776 rn-forge-tooling/src/rn_forge/tooling/generation/apply.py:89 · apply Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAl0LQZe-aMZiDjRP S3776 rn-forge-tooling/src/rn_forge/tooling/generation/plan.py:37 · classify Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRG S5778 rn-forge-tooling/tests/generation/test_generation.py:138 · TestPlan.test_duplicate_keys_are_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRH S5778 rn-forge-tooling/tests/generation/test_generation.py:207 · TestApply.test_unapproved_drift_aborts_before_writing Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRI S5778 rn-forge-tooling/tests/generation/test_generation.py:254 · TestApply.test_failed_verify_rolls_back_creations_and_updates Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRJ S5778 rn-forge-tooling/tests/generation/test_generation.py:316 · TestSeveralBlocksInOneFile.test_rolls_back_to_the_original_file_not_a_half_written_one Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRK S5778 rn-forge-tooling/tests/generation/test_generation.py:325 · TestSeveralBlocksInOneFile.test_whole_file_and_block_ownership_of_one_path_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRL S5778 rn-forge-tooling/tests/generation/test_generation.py:356 · TestPathContainment.test_absolute_and_traversing_paths_are_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRM S5778 rn-forge-tooling/tests/generation/test_generation.py:367 · TestPathContainment.test_a_symlink_out_of_the_repo_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRN S5778 rn-forge-tooling/tests/generation/test_generation.py:382 · TestPathContainment.test_a_stale_entry_pointing_outside_the_repo_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzqQZe-aMZiDjRO S5778 rn-forge-tooling/tests/generation/test_generation.py:393 · TestInterruption.test_keyboard_interrupt_rolls_back_and_propagates Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjQ8 S5778 rn-forge-tooling/tests/install/test_lifecycle.py:158 · TestInstall.test_upgrade_requires_an_install Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjQ9 S5778 rn-forge-tooling/tests/install/test_lifecycle.py:171 · TestInstall.test_a_checksum_mismatch_is_rejected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjQ- S5778 rn-forge-tooling/tests/install/test_lifecycle.py:191 · TestRollback.test_a_failed_download_changes_nothing Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjQ_ S5778 rn-forge-tooling/tests/install/test_lifecycle.py:197 · TestRollback.test_a_failed_first_install_leaves_no_version Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjRA S5778 rn-forge-tooling/tests/install/test_lifecycle.py:205 · TestRollback.test_a_failed_migration_restores_the_previous_version Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjRB S5778 rn-forge-tooling/tests/install/test_lifecycle.py:216 · TestRollback.test_an_interrupted_swap_restores_and_reraises Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjRC S5778 rn-forge-tooling/tests/install/test_lifecycle.py:223 · TestRollback.test_a_failed_reinstall_restores_the_version_directory Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjRD S5778 rn-forge-tooling/tests/install/test_lifecycle.py:231 · TestRollback.test_a_file_in_the_way_of_a_link_aborts Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAly4QZe-aMZiDjRE S5778 rn-forge-tooling/tests/install/test_lifecycle.py:273 · TestUninstallAndCleanup.test_cleanup_needs_an_active_version Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlzQQZe-aMZiDjRF S5863 rn-forge-tooling/tests/test_state.py:102 · TestContentHash.test_of_deterministic Replace this assertion to not have the same actual and expected expression. MAJOR / R:MEDIUM OPEN Fix S14.4.5 Fixed (S14.4.5); not open on main at ca04bca
AaDlAl1pQZe-aMZiDjRU S6792 rn-forge-tooling/src/rn_forge/tooling/state.py:24 · StateStore Use the "type" parameter syntax to declare this generic class. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAl1pQZe-aMZiDjRV S6796 rn-forge-tooling/src/rn_forge/tooling/state.py:135 · StateStore.record Use a generic type parameter for this function instead of a "TypeVar". MAJOR / M:MEDIUM OPEN FP review S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQy S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:65 · module Define a constant instead of duplicating this literal "id desc" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ1 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:131 · module Define a constant instead of duplicating this literal "/conformance/items/1" 6 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ6 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:194 · module Define a constant instead of duplicating this literal 'W/"1:7"' 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ2 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:216 · module Define a constant instead of duplicating this literal "/conformance/items" 9 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ5 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:322 · module Define a constant instead of duplicating this literal "idempotency.first-call-executes" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ0 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:327 · module Define a constant instead of duplicating this literal "/conformance/charges" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQz S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:380 · module Define a constant instead of duplicating this literal "/conformance/readyz" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ3 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:557 · module Define a constant instead of duplicating this literal "/conformance/echo" 5 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQ4 S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:703 · module Define a constant instead of duplicating this literal "text/csv" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQw S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:706 · module Define a constant instead of duplicating this literal r"text/csv(; charset=utf-8)?" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlxjQZe-aMZiDjQx S1192 rn-forge-web/src/rn_forge/web/conformance/cases.py:712 · module Define a constant instead of duplicating this literal "id,name\r\n1,widget\r\n" 3 times. CRITICAL / M:HIGH OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlyOQZe-aMZiDjQ7 S5713 rn-forge-web/src/rn_forge/web/pagination.py:176 · decode_cursor Remove this redundant Exception class; it derives from another which is already caught. MINOR / M:LOW OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlu9QZe-aMZiDjQk S5778 rn-forge-web/tests/test_auth.py:125 · test_the_authorizer_is_silent_when_no_log_is_injected Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlu9QZe-aMZiDjQl S5778 rn-forge-web/tests/test_auth.py:134 · test_the_injected_log_receives_the_refusal Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlvcQZe-aMZiDjQn S5778 rn-forge-web/tests/test_idempotency.py:213 · test_an_unsafe_method_with_no_key_raises Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlv4QZe-aMZiDjQo S5778 rn-forge-web/tests/test_oidc.py:95 · TestOidcAuthenticator.test_verification_failures_raise_authentication_failed Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlv4QZe-aMZiDjQp S5778 rn-forge-web/tests/test_oidc.py:104 · TestOidcAuthenticator.test_the_reason_rides_on_the_exception_for_the_binding_to_log Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlv4QZe-aMZiDjQq S5778 rn-forge-web/tests/test_oidc.py:114 · TestOidcAuthenticator.test_a_non_bearer_scheme_is_refused Refactor this exception test to have only one invocation possibly throwing an exception. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlvcQZe-aMZiDjQm S5863 rn-forge-web/tests/test_idempotency.py:36 · test_hash_is_stable_across_calls Replace this assertion to not have the same actual and expected expression. MAJOR / R:MEDIUM OPEN Fix S14.4.5 Fixed (S14.4.5); not open on main at ca04bca
AaDlAlwNQZe-aMZiDjQr S5863 rn-forge-web/tests/test_pagination.py:39 · test_encoding_is_stable_for_the_same_input Replace this assertion to not have the same actual and expected expression. MAJOR / R:MEDIUM OPEN Fix S14.4.5 Fixed (S14.4.5); not open on main at ca04bca
AaDlAlwyQZe-aMZiDjQs S7483 rn-forge-web/src/rn_forge/web/health.py:151 · _run_bounded Remove this "timeout" parameter and use a timeout context manager instead. MAJOR / M:MEDIUM OPEN Fix S14.4.6 Fixed (S14.4.6); not open on main at ca04bca
AaDlAlwyQZe-aMZiDjQt S7483 rn-forge-web/src/rn_forge/web/health.py:165 · run_checks Remove this "timeout" parameter and use a timeout context manager instead. MAJOR / M:MEDIUM OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAlxIQZe-aMZiDjQu S7503 rn-forge-web/src/rn_forge/web/idempotency.py:203 · InMemoryAsyncIdempotencyStore.record_or_replay Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)
AaDlAlxIQZe-aMZiDjQv S7503 rn-forge-web/src/rn_forge/web/idempotency.py:211 · InMemoryAsyncIdempotencyStore.complete Use asynchronous features in this function or remove the async keyword. MINOR / M:MEDIUM, R:LOW OPEN FP review S14.4.6 False Positive applied on main 2026-10-03 (owner)

Existing dispositions (outside the 109-issue baseline)

Issue Rule Current contract/relevance Server disposition Follow-up
AaA1hSyhwMHT6jYRL56A S930 commons testing.assert_that forwards supported assertpy description keyword; test_description_on_failure checks propagation. False Positive Retain; S14.4.6 verify existing test.
AZ9ZeZd2C_eeOFJVxZkS S2077 Django models.base.TruncateModelMixin.truncate quotes model metadata table with connection.ops.quote_name; test_truncate_uses_quoted_table_name covers it. False Positive Retain. Reviewed in S14.4.4: truncate still quotes get_model_meta(cls).db_table with connection.ops.quote_name on both the SQLite and PostgreSQL branches, and test_truncate_uses_quoted_table_name (sqlite and postgresql parametrizations) passes.
AZ9ZeZg_C_eeOFJVxZlv S5655 Former commons/excel.py is gone; same add_table finding is open at data/excel.py under AaDlAlgzQZe-aMZiDjQD. Fixed (closed) S14.4.6 triage current finding; do not count migration as remediation.

Proposed false-positive comments

Applied as False Positive on main on 2026-10-03 with owner authorization, for every row except the conditional S2077 row. The Sonar MCP tool cannot attach comments, so the comment text was not posted on the server; this table remains the record of the justifications.

Issue Rule Comment to post
AaDlAlizQZe-aMZiDjQE S5659 JwtVerifier.verify reads only kid and alg from the unverified header: kid selects the JWKS key and alg must be in the configured algorithm allowlist, otherwise the token is rejected. Claims are returned only from jwt.decode, which verifies the signature with that key, restricts algorithms to the allowlist, and checks aud, iss and exp (all required). No unverified content is used for authentication. Evidence in commons/tests/integration/test_token_verification.py: test_wrong_signature_fails, test_hmac_token_is_rejected_by_the_allow_list, test_unsigned_alg_none_token_is_rejected, test_token_without_kid_fails, test_bad_claims_fail.
AaDlAlrLQZe-aMZiDjQc, AaDlAlrLQZe-aMZiDjQd, AaDlAlrLQZe-aMZiDjQe S2077 Conditional: post only if a rescan still flags these lines after the fix. The sequence name is revalidated against [a-z][a-z0-9_]{0,62} immediately before each PostgreSQL statement, including after reassignment of the public name attribute, and then quoted with connection.ops.quote_name; values stay bound in nextval/setval. A name that fails validation raises AppException before any SQL runs. Evidence in django/tests/models/test_sequences.py: TestPostgresIdentifierBoundary.test_reassigned_unsafe_name_is_rejected_before_any_sql (both next_value and ensure_at_least), test_next_value_uses_the_quoted_identifier, test_ensure_at_least_uses_the_quoted_identifier.
AaDlAlwyQZe-aMZiDjQt S7483 timeout is the documented public keyword of run_checks (seconds each check may run before it is reported as fail). It is applied per check with asyncio.timeout in _run_bounded, the mechanism the rule recommends; removing it would drop the caller's deadline. Evidence: web tests/test_health.py bounded-check, cancellation and failure tests.
AaDlAlxIQZe-aMZiDjQu S7503 InMemoryAsyncIdempotencyStore.record_or_replay implements the AsyncIdempotencyStore protocol, whose callers await it; the in-memory store has nothing to await. Removing async breaks the protocol and a dummy await adds nothing. Evidence: web tests/test_idempotency.py async store tests.
AaDlAlxIQZe-aMZiDjQv S7503 InMemoryAsyncIdempotencyStore.complete implements the AsyncIdempotencyStore protocol, whose callers await it; the in-memory store has nothing to await. Removing async breaks the protocol and a dummy await adds nothing. Evidence: web tests/test_idempotency.py async store tests.
AaDqbPL_fQY1WC_tVk7D S7503 requires returns the public PrincipalDependency (Callable[..., Awaitable[Principal]]), the same type it accepts, so the dependency must stay awaitable for composition and typing; async also keeps it on the event loop rather than FastAPI's threadpool. Evidence: fastapi tests/test_auth.py 401/403 dependency tests.
AaDqbPLtfQY1WC_tVk7A S7503 Starlette exception handler registered with add_exception_handler; a sync handler is dispatched to the threadpool, changing the execution context for trace-id and logging. It intentionally delegates to the shared sync respond(). Evidence: fastapi tests/test_problem.py.
AaDqbPLtfQY1WC_tVk7B S7503 Starlette exception handler registered with add_exception_handler; a sync handler is dispatched to the threadpool, changing the execution context for trace-id and logging. It intentionally delegates to the shared sync respond(). Evidence: fastapi tests/test_problem.py.
AaDqbPLtfQY1WC_tVk7C S7503 Starlette exception handler registered with add_exception_handler; a sync handler is dispatched to the threadpool, changing the execution context for trace-id and logging. It intentionally delegates to the shared sync respond(). Evidence: fastapi tests/test_problem.py.
AaDlAluiQZe-aMZiDjQj S5754 run() is the process boundary and returns an exit code; the console script is sys.exit(app()), so termination is not swallowed. Click runs with standalone_mode=False, so typer.Exit/SystemExit must be caught to preserve the requested code via ExitCode.for_error; KeyboardInterrupt is handled separately (130). Evidence: cli tests/test_app.py TestRun.test_an_explicit_exit_code_survives, TestRun.test_a_system_exit_code_is_returned_not_raised, TestRun.test_interrupt_is_not_converted_into_a_generic_failure, TestCallReturnsAnExitCode.
AaDlAljQQZe-aMZiDjQF S1172 content_type belongs to the ObjectStore.put(key, data, *, content_type=None) protocol that real backends honour; the in-memory store documents that it ignores it. Removing it breaks protocol conformance and callers passing content_type=. Evidence: commons tests/integration/test_objects.py protocol-conformance tests.
AaDlAlgzQZe-aMZiDjQD S5655 Worksheet.add_table(table) takes an openpyxl.worksheet.table.Table, and exactly that is passed (openpyxl 3.1.5; strict Pyright accepts it). The analyzer's inferred parameter type is wrong. Evidence: commons tests/data/test_excel.py::TestTableManagement add/resize table tests.
AaDlAljyQZe-aMZiDjQH S7504 list(provenance) is a deliberate snapshot: the loop deletes entries from provenance, and iterating the live dict raises RuntimeError: dictionary changed size during iteration. Evidence: commons tests/lang/test_collections.py provenance cleanup when a mapping is replaced by a scalar.
AaDlAl02QZe-aMZiDjRR S1172 checksum(self, version) is a method of the runtime-checkable ReleaseSource protocol; fetch_release calls source.checksum(version) on any source, so every implementation must accept version even when, as here, the checksum does not depend on it. Removing it breaks structural conformance and the call site. Evidence: tooling tests/install/test_lifecycle.py TestInstall.test_a_local_archive_installs_and_verifies, TestInstall.test_a_checksum_mismatch_is_rejected.
AaDlAl02QZe-aMZiDjRS S1172 checksum(self, version) is a method of the runtime-checkable ReleaseSource protocol; fetch_release calls source.checksum(version) on any source, so every implementation must accept version even when, as here, the checksum does not depend on it. Removing it breaks structural conformance and the call site. Evidence: tooling tests/install/test_lifecycle.py TestInstall.test_a_local_archive_installs_and_verifies, TestInstall.test_a_checksum_mismatch_is_rejected.
AaA1hSuFwMHT6jYRL55n S6794 EnumFieldBase is subclassed (class EnumField(EnumFieldBase)); a PEP 695 type statement creates a TypeAliasType, which cannot be a base class, so TypeAlias is required here. All other aliases in _typing.py use type. The line's existing NOSONAR(S6794) stays until this disposition is applied. Evidence: strict Pyright and the Django enum-field tests/imports.

PR 4 analysis (2026-10-03)

PR 4 (CI run) autodetected the pull request. Its gate failed only on new security rating C; reliability and maintainability A, new coverage 98.9%, duplication 0.0%, hotspots reviewed 100%. The three open issues were the revalidated, quoted sequence identifiers under new keys, and the owner authorized the conditional S2077 false-positive comment above for them:

Issue Line Status
AaED3UgEu1amFgs_plZJ sequences.py:80 · next_value False Positive applied 2026-10-03 by the owner
AaED3UgEu1amFgs_plZK sequences.py:100 · ensure_at_least False Positive applied 2026-10-03 by the owner
AaED3UgEu1amFgs_plZL sequences.py:101 · ensure_at_least False Positive applied 2026-10-03

After the dispositions, the rerun at 8d62729 passed sonar and ci-ok, and the PR gate passed every condition.

Main analysis after PR 4 merge (2026-10-03)

PR 4 merged to main as ca04bca. The main CI Sonar step analyzed main (attributed to main, which satisfies S14.4.2's "main push targets main" check) and failed the gate: 16 open issues and new security rating D, caused only by S5659 AaDlAlizQZe-aMZiDjQE. Pull-request false-positive statuses do not carry over to main, so the proposed comments had never been applied there.

With owner authorization, the 15 issues in the table above (every row except the conditional S2077 row) were set to False Positive on main through the Sonar MCP tool, without comment text. Main's gate is then OK on every condition: reliability, security and maintainability A, new coverage 94.4%, duplication 0.0%, hotspots reviewed 100%.

One issue remains open: S5778 AaDlAllDQZe-aMZiDjQM at test_pagination.py:239, because the S14.4.6 refactor left _OrderedView() constructed inside pytest.raises. Commit 5f0c249 moves it out and the module passes (27 passed). The ledger row keeps its baseline location (:232). The post-merge main push confirms it (S14.4.7).

Acceptance

Run the narrow checks at each story boundary. Final local checks after implementation:

set -euo pipefail
# S14.4.2: workflow syntax; parameter behavior also has mocked tests and GitHub checks
actionlint .github/workflows/main.yml
# S14.4.3: local helper and scope safeguards
uv run ruff check .github/scripts/sonar_local.py .github/scripts/tests/test_sonar_local.py
uv run ruff format --check .github/scripts/sonar_local.py .github/scripts/tests/test_sonar_local.py
uv run pytest .github/scripts/tests/test_sonar_local.py
python3 .github/scripts/sonar_local.py --dry-run
# S14.4.1, S14.4.7: documentation and generated scope
docs/_update_board.sh --check
uv run --group docs mkdocs build --strict

S14.4.4–S14.4.6 additionally require the actual changed-package checks and regression tests recorded in the ledger. S14.4.1 and S14.4.7 require a complete server inventory and reconciliation; local tests and a green differential PR gate cannot substitute for the main reconciliation, whose final confirmation is the post-merge main push (S14.4.7 amendment). Preserve coverage of at least the existing 80% gate and duplication of at most 3%; do not change the project's thresholds or baseline window.

References