From b815d8c4669b2d32ea6454c4cf4035d68d2eff97 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Tue, 10 Nov 2026 11:22:59 +0100 Subject: [PATCH] sonar: leave out vendor/ and record why SHA-1 stays in the WebSocket handshake and signature checks --- sonar-project.properties | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..24b50e2e2 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,18 @@ +sonar.projectKey=storytold_craft-anything +sonar.organization=storytold + +# vendor/ holds third-party crates carried with small, marked patches (vendor/wgpu-hal: see its +# CRAFT_ANYTHING.md). They stay close to upstream so each copy can be dropped once upstream +# releases the fix, so they are not analysed here. +sonar.exclusions=vendor/** + +# S4790 (weak hash): SHA-1 here is fixed by what is being read, not chosen for new security. +# - crates/engines/src/cdp.rs: the WebSocket handshake's Sec-WebSocket-Accept value is SHA-1 by +# definition (RFC 6455 ยง4.2.2). +# - crates/formats/src/verify.rs: existing signatures (APK v1 JAR digests, CMS, sha1WithRSA) may +# name SHA-1; checking them needs it, and a result says which digest was used. +sonar.issue.ignore.multicriteria=cdp_ws_accept,verify_digest +sonar.issue.ignore.multicriteria.cdp_ws_accept.ruleKey=rust:S4790 +sonar.issue.ignore.multicriteria.cdp_ws_accept.resourceKey=crates/engines/src/cdp.rs +sonar.issue.ignore.multicriteria.verify_digest.ruleKey=rust:S4790 +sonar.issue.ignore.multicriteria.verify_digest.resourceKey=crates/formats/src/verify.rs