@@ -117,7 +117,6 @@ func (s *Scanner) Deploy(scannerNamespace, targetNamespace string) (*batchv1.Job
117117 // Create the Job
118118 backoffLimit := int32 (0 )
119119 ttlSecondsAfterFinished := int32 (600 ) // Keep job for 10 minutes after completion
120- privileged := true
121120
122121 job := & batchv1.Job {
123122 ObjectMeta : metav1.ObjectMeta {
@@ -140,9 +139,8 @@ func (s *Scanner) Deploy(scannerNamespace, targetNamespace string) (*batchv1.Job
140139 "-csv-file" , "/tmp/scan-results.csv" ,
141140 "-j" , "4" , // Use 4 concurrent threads
142141 },
143- SecurityContext : & corev1.SecurityContext {
144- Privileged : & privileged ,
145- },
142+ // No privileged mode needed - using default "pod" scan mode
143+ // which scans running pods' TLS ports, not host ports
146144 },
147145 },
148146 },
@@ -332,7 +330,7 @@ func ValidateCompliance(results []ScanResult, profileSpec configv1.TLSProfileSpe
332330 return nil
333331}
334332
335- // containsTLSVersion checks if the TLS versions string contains at least the minimum required version
333+ // containsTLSVersion checks if all TLS versions meet the minimum required version
336334func containsTLSVersion (tlsVersions , minVersion string ) bool {
337335 // If no TLS versions detected, fail validation
338336 if tlsVersions == "" {
@@ -346,16 +344,25 @@ func containsTLSVersion(tlsVersions, minVersion string) bool {
346344 return true
347345 }
348346
349- // Check if any of the supported versions meets the minimum
347+ // Check that ALL supported versions meet the minimum
350348 versions := strings .Split (tlsVersions , "," )
349+ foundVersion := false
351350 for _ , v := range versions {
352351 v = strings .TrimSpace (v )
353- if vNum := parseTLSVersion (v ); vNum >= minVersionNum {
354- return true
352+ vNum := parseTLSVersion (v )
353+ if vNum == 0 {
354+ // Skip unparseable versions
355+ continue
356+ }
357+ foundVersion = true
358+ if vNum < minVersionNum {
359+ // Found a version below the minimum - fail validation
360+ return false
355361 }
356362 }
357363
358- return false
364+ // Return true only if we found at least one version and none were below minimum
365+ return foundVersion
359366}
360367
361368// parseTLSVersion converts TLS version string to a comparable number
0 commit comments