Skip to content

Finish ShiftPrint finding-only scanner gates - #4

Merged
CrimsonSoul merged 7 commits into
testfrom
ci/finding-only-scanner-gates
Jul 31, 2026
Merged

Finish ShiftPrint finding-only scanner gates#4
CrimsonSoul merged 7 commits into
testfrom
ci/finding-only-scanner-gates

Conversation

@CrimsonSoul

@CrimsonSoul CrimsonSoul commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What changed

  • ports the bounded Relay Sonar and Snyk gate runners to ShiftPrint
  • adds a read-only Security and Code Quality workflow for internal PRs and test pushes
  • invokes pinned scanner CLIs directly without adding a Node package manifest
  • generates Python LCOV coverage for Sonar
  • starts ShiftPrint with an explicitly empty reviewed-issue manifest so Relay exceptions cannot suppress ShiftPrint findings
  • gives the existing Linux job the stable Build quality gate name and runs all scanner regressions there
  • preserves the real-Windows application tests and requires both Linux quality and Windows tests before packaging or release
  • runs Snyk on Windows so the production-only pywin32 dependency is resolved and scanned
  • launches the npm-generated Snyk Windows shim through cmd.exe without enabling shell mode in the process runner

Why

Relay’s policy and gate semantics belong here, but its Electron/npm assumptions and 49-entry Sonar exception inventory do not. ShiftPrint now applies the same finding-only policy to its real Python and Windows dependency graph without inheriting unrelated exceptions.

Validation

  • 248 Python tests passed with 82% coverage
  • 81 scanner regression tests passed
  • Black, mypy, and pylint quality gates passed
  • real pywin32 and tkcalendar Windows test job passed
  • SonarQube quality gate passed
  • Snyk Open Source and Code gates passed on Windows
  • CodeRabbit passed
  • workflow YAML parsed successfully and git diff --check is clean

Repository setup

  • SONAR_ORGANIZATION=crimsonsoul
  • SNYK_ORG=crimsonsoul
  • SONAR_TOKEN and SNYK_TOKEN are configured as repository secrets
  • protected test requires Build quality, SonarQube, and Snyk with strict up-to-date checks

No Relay finding exceptions were inherited.

Ryan Bledsoe and others added 4 commits July 31, 2026 17:12
Copy the four-state scanner runner, Snyk and Sonar wrappers, and their
tests from Relay. They import Node stdlib only, so ShiftPrint gains no
package.json, npm, or node_modules; they run as plain `node scripts/*.mjs`.

Relay's reviewed-issue manifest is deliberately NOT inherited. Its 49
exceptions are bound to issue keys, rules, and components that do not
exist here, so importing them would suppress real ShiftPrint findings.
The manifest starts empty and the exact-count guards are repointed to
zero, so it still cannot change without a deliberate edit.

Work in progress: 60 of 80 ported tests pass. The remainder encode
Relay's manifest contents and workflow shape and are adapted next.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sonar-project.properties targets the Python sources with the ShiftPrint
project key and reads coverage from coverage.lcov, which pytest-cov emits
directly. Entry points and the icon generator are excluded from coverage:
they are verified by running the app and asserting the built assets.

.coderabbit.yaml matches the agreed policy: request-changes workflow on,
drafts skipped, incremental review paused after two reviewed commits, and
base branch test. No paid, usage, credit, or overage keys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Relay's wrapper shelled out to npm scripts, which would have dragged
package.json, a lockfile, and node_modules into a Python repository for no
benefit. Replace that single command builder with a direct snyk invocation
and phase table: Open Source scans requirements-dev.txt through the pip
package manager, Code scanning stays language-agnostic, and monitor reuses
the same manifest and repository arguments.

requirements-dev.txt is the target because it pulls in the runtime
requirements and the build tooling PyInstaller packages, which is what the
spec means by development dependencies that participate in packaging.

Threshold stays high, matching Relay. All eight run-snyk-ci tests pass
against the new command shape.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2fcea72f-391a-4aad-bc13-17505be72bd1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@CrimsonSoul
CrimsonSoul marked this pull request as ready for review July 31, 2026 23:03
@CrimsonSoul
CrimsonSoul merged commit 733eafb into test Jul 31, 2026
7 checks passed
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.

1 participant