Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work on CVE search #977

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 5 additions & 19 deletions app/Console/Commands/CVESearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public function handle()
$check_frequency = config('mercator-config.cve.check-frequency');

// update provider
if ($provider === 'https//cve.circl.lu') {
if (($provider == 'https://cvepremium.circl.lu')||($provider === 'https//cve.circl.lu')) {
// change variable
$provider = 'https://cvepremium.circl.lu';
$provider = 'https://vulnerability.circl.lu';;
config(['mercator-config.cve.provider' => $provider]);

// Save configuration
Expand Down Expand Up @@ -156,9 +156,9 @@ public function handle()

// loop on all CVE
foreach ($json as $cve) {
// check CVE in frequency range
#print_r("------------------------------\n");
#print_r("-----------------------------------------------------\n");
#print_r($cve);
// check CVE in frequency range
if (property_exists($cve,"dataType") && $cve->dataType=="CVE_RECORD") {
if (strtotime($cve->cveMetadata->datePublished)>= $min_timestamp) {
// put summary in lowercase
Expand Down Expand Up @@ -189,22 +189,8 @@ public function handle()
}
else {
Log::error("Unknown CVE format !");
Log::error($cve);
}
/*
elseif (strtotime($cve->document->tracking->current_release_date) >= $min_timestamp) {
// put summary in lowercase
$text= strtolower($cve->document->title);
// Log::debug('CVESearch - CVE summary ' . $cve->summary);
foreach ($names as $name) {
// Log::debug('CVESearch - check ' . $name);
if (str_contains($tex, $name)) {
$message .= '<b>' . $cve->application . ' </b> : <b>' . $cve->id . ' </b> - ' . $cve->document->title . '<br>';
$found=true;
}
}
Log::error(json_encode($cve));
}
*/
}
$message .= '</body></html>';

Expand Down