mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-03 23:35:26 +01:00 
			
		
		
		
	Merge pull request #503 from AlGreed/2.9dev
new pretty JSON format + severity level filter
This commit is contained in:
		
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,7 @@
 | 
			
		||||
.DS_Store
 | 
			
		||||
tmp.json
 | 
			
		||||
*.bak
 | 
			
		||||
 | 
			
		||||
*.xml
 | 
			
		||||
 | 
			
		||||
*.iml
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@ foreach my $f ( @$json ) {
 | 
			
		||||
	if ( $f->{id} eq "expiration" ) {
 | 
			
		||||
		$found = 1;
 | 
			
		||||
		like($f->{finding},qr/^Certificate Expiration.*expired\!/,"Finding reads expired."); $tests++;
 | 
			
		||||
		is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
 | 
			
		||||
		is($f->{severity}, "CRITICAL", "Severity should be CRITICAL"); $tests++;
 | 
			
		||||
		last;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -56,7 +56,7 @@ foreach my $f ( @$json ) {
 | 
			
		||||
	if ( $f->{id} eq "chain_of_trust" ) {
 | 
			
		||||
	$found = 1;
 | 
			
		||||
		like($f->{finding},qr/^All certificate trust checks failed/,"Finding says certificate cannot be trusted."); $tests++;
 | 
			
		||||
		is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
 | 
			
		||||
		is($f->{severity}, "CRITICAL", "Severity should be CRITICAL"); $tests++;
 | 
			
		||||
		last;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -100,7 +100,7 @@ foreach my $f ( @$json ) {
 | 
			
		||||
	if ( $f->{id} eq "chain_of_trust" ) {
 | 
			
		||||
		$found = 1;
 | 
			
		||||
		like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
 | 
			
		||||
		is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
 | 
			
		||||
		is($f->{severity}, "CRITICAL", "Severity should be CRITICAL"); $tests++;
 | 
			
		||||
		last;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -118,7 +118,7 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++;
 | 
			
		||||
#	if ( $f->{id} eq "chain_of_trust" ) {
 | 
			
		||||
#		$found = 1;
 | 
			
		||||
#		like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
 | 
			
		||||
#		is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
 | 
			
		||||
#		is($f->{severity}, "CRITICAL", "Severity should be CRITICAL"); $tests++;
 | 
			
		||||
#		last;
 | 
			
		||||
#    }
 | 
			
		||||
#}
 | 
			
		||||
@@ -132,4 +132,4 @@ sub json($) {
 | 
			
		||||
	$file = `cat $file`;
 | 
			
		||||
	unlink $file;
 | 
			
		||||
	return from_json($file);
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										456
									
								
								testssl.sh
									
									
									
									
									
								
							
							
						
						
									
										456
									
								
								testssl.sh
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user