diff --git a/prospector/rules/rules.py b/prospector/rules/rules.py index 0c083e31c..56977d574 100644 --- a/prospector/rules/rules.py +++ b/prospector/rules/rules.py @@ -412,30 +412,6 @@ def apply(self, candidate: Commit, advisory_record: AdvisoryRecord): return False -class CommitIsSecurityRelevant(Rule): - """Matches commits that are deemed security relevant by the commit classification service.""" - - def apply( - self, - candidate: Commit, - ) -> bool: - # temperature saved in LLMService's model - temperature = self.llm_service.model._identifying_params.get("temperature") - data = { - "temperature": temperature, - "diff": "\n".join(candidate.diff), - } - - response = requests.get("http://127.0.0.1:8001/predict", json=data) - - prediction = response.json()["prediction"] - if prediction == "1": - self.message = "The commit was deemed security relevant by the commit classification service." - return True - else: - return False - - RULES_PHASE_1: List[Rule] = [ VulnIdInMessage("VULN_ID_IN_MESSAGE", 64), # CommitMentionedInAdv("COMMIT_IN_ADVISORY", 64), @@ -456,6 +432,4 @@ def apply( CommitHasTwins("COMMIT_HAS_TWINS", 2), ] -RULES_PHASE_2: List[Rule] = [ - CommitIsSecurityRelevant("COMMIT_IS_SECURITY_RELEVANT", 32) -] +RULES_PHASE_2: List[Rule] = []