9 Commits
Author SHA1 Message Date
Dylan M. Taylor ea2cae4a03 Match the SonarCloud token fallback the scan actually uses (#139) 2026-11-04 17:59:19 -05:00
g1obalworlds 0e8822f295 sonarcloud: leave test code out of sharded coverage, as cargo llvm-cov does
cargo llvm-cov adds its own exclusions to --ignore-filename-regex: tests/,
examples/ and benches/ directories and tests.rs / *_tests.rs files. The
sharded merge (the default since #87) calls llvm-cov export directly with
only (vendor|xtask)/, so integration tests and src/**/tests.rs reached
lcov.info as almost fully covered source, and coverage moved when a caller
switched between shards: 1 and the default. Put those exclusions in the
shared regex; the unsharded run already applies them.
2026-10-26 17:16:25 -07:00
skylar taylor-barrick be6bbf3ca5 Provision fonts and optional Python coverage for Sonar (#88)
* Provision coverage fonts for archive builds and test runners

* Keep coverage fonts optional unless a pin is requested

* Pin nested actions used by coverage jobs

* Export the font path only after a requested checkout

* Measure optional Python tooling coverage in Sonar

* ci: restore craft-common-actions tracking main

* ci: share Python coverage configuration with XML reporting
2026-10-25 23:37:12 -04:00
Dylan M. Taylor 452c0b419f sonarcloud: exclude i18n tables from duplication checks (#91) 2026-10-25 21:20:17 -04:00
Dylan M. Taylor e3814b3ec2 sonarcloud: fail a shard that cannot run its tests instead of scanning empty coverage (#89) 2026-10-25 19:49:55 -04:00
Dylan M. Taylor 395270d2c0 sonarcloud: optionally shard Rust coverage across parallel nextest partitions (#87)
* sonarcloud: optionally shard Rust coverage across parallel nextest partitions

* sonarcloud: default coverage to four shards

* sonarcloud: build the instrumented archive once and shard tests from it

* sonarcloud: skip sharded scan steps when the plan job produces no shards

* sonarcloud: validate shard count, pin the archive's toolchain, merge only test binaries
2026-10-25 18:54:59 -04:00
Dylan M. Taylor 58e2894843 security(workflows): strengthen SonarCloud project-key and FreeBSD architecture input validation (F-005, F-006, F-007, F-009, F-010)
- Restrict SonarCloud project-key grammar to start with an alphanumeric/underscore, reject leading hyphens/flags, and enforce 400 character length limit (F-006)
- Verify Nix extra-args argument parsing without eval (F-005)
- Verify Windows ARM64 PowerShell environment variable passing and path component sanitization (F-007)
- Add unit test verifying FreeBSD workflow architecture pre-validation rejects invalid architectures and injection payloads prior to VM execution (F-009)
- Verify FreeBSD custom-test-command environment data passing (F-010)
2026-10-24 22:44:09 -04:00
Dylan M. Taylor 5d4336931c sonarcloud: measure Rust coverage with cargo-llvm-cov and import the LCOV report (#74)
* sonarcloud: measure Rust coverage with cargo-llvm-cov and import the LCOV report

The scan never imported coverage, so SonarCloud counted only the few Python and
PowerShell files as coverable and showed 0.0% for every project.

* sonarcloud: --ignore-run-fail keeps coverage after a red test; drop persisted checkout credentials before running Cargo
2026-10-23 12:06:24 -04:00
coderabbitai[bot] 3fcccd5573 security(sonar): prevent project key injection into scanner arguments (#53)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-10-22 14:37:31 -04:00