Skip to content

ECOPROJECT-5195 | fix: add TLS verification for vCenter connections - #8

Open
nirarg wants to merge 1 commit into
kubev2v:mainfrom
nirarg:ECOPROJECT-5195
Open

ECOPROJECT-5195 | fix: add TLS verification for vCenter connections#8
nirarg wants to merge 1 commit into
kubev2v:mainfrom
nirarg:ECOPROJECT-5195

Conversation

@nirarg

@nirarg nirarg commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Addresses security vulnerability (CVSS 7.4) where all vCenter TLS connections were using InsecureSkipVerify, making them vulnerable to MITM attacks.

Changes:

  • Add TLSCACert, TLSThumbprint, and TLSInsecure fields to Credentials struct
  • Create internal/tlsconfig package for TLS validation and configuration
  • Update all vSphere client calls to use TLS config instead of hardcoded insecure mode
  • Remove vulnerable getVCenterThumbprint() that used unverified TOFU connection
  • Add comprehensive unit tests for TLS configuration

Backward compatibility:

  • Existing code without TLS config defaults to insecure mode with LOUD deprecation warnings
  • TLS verification will be required in v1.0.0
  • Users can opt-in to secure mode via TLSCACert or TLSThumbprint
  • Explicit TLSInsecure flag available for testing environments

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: f89074c7-7c3c-4257-b72f-bf8c5ea9bac2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nirarg
nirarg requested review from ronenav and solenoci August 31, 2026 08:50
Comment thread internal/vsphere/disk_query.go Outdated
Comment thread internal/inspection/virt_v2v_inspector.go Outdated
Comment thread internal/tlsconfig/tlsconfig.go Outdated
Comment thread internal/inspection/virt_v2v_inspector.go Outdated
Addresses security vulnerability (CVSS 7.4) where all vCenter TLS connections
were using InsecureSkipVerify, making them vulnerable to MITM attacks.

Changes:
- Add TLSCACert, TLSThumbprint, and TLSInsecure fields to Credentials struct
- Create internal/tlsconfig package for TLS validation and configuration
- Update all vSphere client calls to use TLS config instead of hardcoded insecure mode
- Remove vulnerable getVCenterThumbprint() that used unverified TOFU connection
- Add comprehensive unit tests for TLS configuration

Backward compatibility:
- Existing code without TLS config defaults to insecure mode with LOUD deprecation warnings
- TLS verification will be required in v1.0.0
- Users can opt-in to secure mode via TLSCACert or TLSThumbprint
- Explicit TLSInsecure flag available for testing environments

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: Nir Argaman <nargaman@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants