Skip to content

Commit 913debc

Browse files
Fix Go Report Card issues
- Remove unused showPolicies variable - Replace deprecated tls.VersionSSL30 with raw value 0x0300 - Fix potential nil pointer dereference in test by using t.Fatal
1 parent b80f55c commit 913debc

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

cmd/tlsanalyzer/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ var (
4141
policyFile string
4242
targetsFile string
4343
concurrency int
44-
showPolicies bool
4544
)
4645

4746
func main() {

internal/scanner/scanner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func DefaultConfig() *Config {
4545
SkipCertVerify: true, // We're analyzing, not validating
4646
CheckVulns: true,
4747
CheckQuantum: true,
48-
MinTLSVersion: tls.VersionSSL30,
48+
MinTLSVersion: 0x0300, // SSL 3.0 - needed to detect insecure configurations
4949
MaxTLSVersion: tls.VersionTLS13,
5050
}
5151
}
@@ -441,7 +441,7 @@ func tlsVersionName(v uint16) string {
441441
return "TLS 1.1"
442442
case tls.VersionTLS10:
443443
return "TLS 1.0"
444-
case tls.VersionSSL30:
444+
case 0x0300: // SSL 3.0
445445
return "SSL 3.0"
446446
default:
447447
return fmt.Sprintf("0x%04X", v)

internal/scanner/scanner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestNew(t *testing.T) {
2929
t.Run(tt.name, func(t *testing.T) {
3030
s := New(tt.config)
3131
if s == nil {
32-
t.Error("New returned nil")
32+
t.Fatal("New returned nil")
3333
}
3434
if s.config == nil {
3535
t.Error("Scanner config is nil")

0 commit comments

Comments
 (0)