Commit 2697b76
committed
Fix issue hash collision for missing-patch-file antipatterns
CRITICAL BUG: Multiple patch files with same CVE got same issue_hash
PROBLEM:
Patch descriptions like:
- 'CVE-2025-11111.patch' → extracted CVE-2025-11111 → hash: nginx-CVE-2025-11111-missing-patch-file
- 'CVE-2025-11111-and-CVE-2025-22222.patch' → extracted CVE-2025-11111 (first match) → SAME hash!
Both antipatterns got the SAME issue_hash, so challenging one marked BOTH as challenged.
IMPACT:
User challenged 1 antipattern out of 10, but Azure Function saw:
- issue_lifecycle had 10 entries
- But 2 shared same hash (hash collision)
- Challenging nginx-CVE-2025-11111-missing-patch-file marked BOTH as challenged
- If there were multiple collisions, could mark many as challenged
- total=10, challenged=10 → unchallenged=0 → Removed 'radar-issues-detected' label ❌
ROOT CAUSE:
_extract_key_identifier() prioritized CVE extraction over patch filename.
For missing-patch-file, the patch FILENAME is the unique identifier, not the CVE.
FIX:
Check antipattern.id == 'missing-patch-file' FIRST, extract full patch filename.
This ensures each patch file gets a unique hash:
- 'CVE-2025-11111.patch' → nginx-CVE-2025-11111-missing-patch-file
- 'CVE-2025-11111-and-CVE-2025-22222.patch' → nginx-CVE-2025-11111-and-CVE-2025-22222-missing-patch-file
- 'security-fix.patch' → nginx-security-fix-missing-patch-file
Now each patch file has a unique hash, preventing false positive challenges.1 parent 35de50d commit 2697b76
File tree
1 file changed
+10
-3
lines changed- .pipelines/prchecks/CveSpecFilePRCheck
1 file changed
+10
-3
lines changedLines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
157 | | - | |
| 164 | + | |
158 | 165 | | |
159 | 166 | | |
160 | | - | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
0 commit comments