From: Jacob Bachmeyer Date: Sat, 8 Oct 2022 00:06:02 +0000 (-0500) Subject: Finish integration of CheckVulnerabilities code X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7b3276b44befb79c00146f1fdd8b6d126f8d7935;p=gatekeeper.git Finish integration of CheckVulnerabilities code --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 40b40ea..c213fa2 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1313,8 +1313,6 @@ sub read_directive_file { sub automake_tests { my $upload_file = shift; - my $log_style = shift; - my $debug = shift; my $error_string = ''; my @debug_log; @@ -1334,7 +1332,7 @@ sub automake_tests { # First check if the file contains any Makefile.in files push(@debug_log,"DEBUG: " ."testing $upload_file for presence of Makefile.in") - if $debug; + if DEBUG; my $tar_cmd = "/bin/tar -tf $upload_file"; open (TAR, "$tar_cmd|") or return("Error: failed to run command: $tar_cmd\n\n", \@debug_log); @@ -1353,7 +1351,7 @@ sub automake_tests { # If it does, check inside them push(@debug_log,"DEBUG: found Makefile.in, " ."testing for CVE-2009-4029 and CVE-2012-3386") - if $debug; + if DEBUG; $tar_cmd = "/bin/tar --to-stdout -x -f $upload_file 'Makefile.in' " ."--wildcards '*/Makefile.in' 2>/dev/null"; open (TAR, "$tar_cmd|") @@ -1391,11 +1389,9 @@ sub automake_tests { sub check_vulnerabilities { my $upload_file = shift; - my $log_style = shift; - my $debug = shift; my ($error_string, $error_log_ref) = - automake_tests($upload_file,$log_style,$debug); + automake_tests($upload_file); return ($error_string, $error_log_ref); } @@ -1440,7 +1436,7 @@ sub check_files { or fatal("gpg verify of upload file ($upload_file) failed",1); my ($error_string, $error_log_ref) = - check_vulnerabilities($upload_file,$Log_Style,DEBUG); + check_vulnerabilities($upload_file); my @error_log = @$error_log_ref; if (DEBUG and $#error_log > -1) {