We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6329041 commit da3a71aCopy full SHA for da3a71a
1 file changed
src/macaron/slsa_analyzer/checks/detect_malicious_metadata_check.py
@@ -100,10 +100,14 @@ def _should_skip(
100
Returns True if any result of the dependency heuristic does not match the expected result.
101
Otherwise, returns False.
102
"""
103
+ mapped_h: dict[Heuristics, list[HeuristicResult]] = {}
104
for heuristic, expected_result in depends_on:
- dep_heuristic_result: HeuristicResult = results[heuristic]
105
- if dep_heuristic_result is not expected_result:
106
- return True
+ mapped_h.setdefault(heuristic, []).append(expected_result)
+
107
+ for heuristic, exp_results in mapped_h.items():
108
+ dep_heuristic_result = results.get(heuristic)
109
+ if dep_heuristic_result not in exp_results:
110
+ return True
111
return False
112
113
def analyze_source(
0 commit comments