[GFX-224] 抑制 Sha1Helper.ComputeFileHash(string) 的 Sonar S4790 弱哈希告警 - #166
Conversation
Sha1Helper.ComputeFileHash(string filePath) 方法体内 line 145 using var sha1 = SHA1.Create(); 被 Sonar csharpsquid:S4790 标记 CRITICAL/VULNERABILITY(issue AZ-m77JuoUUmmpKU65vP,报告位置 Sha1Helper.cs:141)。在方法签名上方加 1 行 [SuppressMessage("Sonar Code Smell", "S4790:Use a stronger hashing algorithm", Justification = "SHA-1 is intentionally used here for non-cryptographic checksum / fingerprint / cache-key scenarios; for security-sensitive use cases call Sha256Helper instead.")]。顶部 using System.Diagnostics.CodeAnalysis; 已由前序 commit(GFX-221/C35、GFX-223/C34)补齐于 line 35,本次无需再加。原则与同文件 C34/C35/C36(ComputeHashAsync / ComputeHash(Stream) / ComputeHash(byte[]) 的 S4790 抑制)完全一致;至此 Sha1Helper 全部 4 处 SHA1.Create() 站点抑制齐全。公共 API、方法体、Sha1HelperTests 零改动,整库 1807 测试全绿。
Linear: GFX-224
|
Warning Review limit reached
Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
|



Linear: GFX-224