diff --git a/builds/progpilot_dev20200227-211719.phar b/builds/progpilot_dev20200227-212037.phar similarity index 98% rename from builds/progpilot_dev20200227-211719.phar rename to builds/progpilot_dev20200227-212037.phar index 032c4197..9075863b 100644 Binary files a/builds/progpilot_dev20200227-211719.phar and b/builds/progpilot_dev20200227-212037.phar differ diff --git a/package/src/progpilot/Analysis/CustomAnalysis.php b/package/src/progpilot/Analysis/CustomAnalysis.php index 91debf29..73417fee 100644 --- a/package/src/progpilot/Analysis/CustomAnalysis.php +++ b/package/src/progpilot/Analysis/CustomAnalysis.php @@ -240,17 +240,19 @@ public static function mustVerifyDefinition($context, $instruction, $myFunc, $st $hashedValue = $myFunc->getLine(); $hashedValue.= "-".$customRule->getAction()."-".$myFunc->getSourceMyFile()->getName(); $idVuln = hash("sha256", $hashedValue); - - $temp["vuln_rule"] = Utils::encodeCharacters($customRule->getAction()); - $temp["vuln_name"] = Utils::encodeCharacters($customRule->getAttack()); - $temp["vuln_line"] = $myFunc->getLine(); - $temp["vuln_column"] = $myFunc->getColumn(); - $temp["vuln_file"] = Utils::encodeCharacters($myFunc->getSourceMyFile()->getName()); - $temp["vuln_description"] = Utils::encodeCharacters($customRule->getDescription()); - $temp["vuln_cwe"] = Utils::encodeCharacters($customRule->getCwe()); - $temp["vuln_id"] = $idVuln; - $temp["vuln_type"] = "custom"; - $context->outputs->addResult($temp); + + if(is_null($context->inputs->getFalsePositiveById($idVuln))) { + $temp["vuln_rule"] = Utils::encodeCharacters($customRule->getAction()); + $temp["vuln_name"] = Utils::encodeCharacters($customRule->getAttack()); + $temp["vuln_line"] = $myFunc->getLine(); + $temp["vuln_column"] = $myFunc->getColumn(); + $temp["vuln_file"] = Utils::encodeCharacters($myFunc->getSourceMyFile()->getName()); + $temp["vuln_description"] = Utils::encodeCharacters($customRule->getDescription()); + $temp["vuln_cwe"] = Utils::encodeCharacters($customRule->getCwe()); + $temp["vuln_id"] = $idVuln; + $temp["vuln_type"] = "custom"; + $context->outputs->addResult($temp); + } } } }