Skip to content

"OTA-2106: drop NetworkCheck (SDN gone, proxy data unused)" - #1442

Open
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:fix-proxy-credential-redaction
Open

"OTA-2106: drop NetworkCheck (SDN gone, proxy data unused)"#1442
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:fix-proxy-credential-redaction

Conversation

@jrangelramos

@jrangelramos jrangelramos commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Proxy URLs from the cluster Proxy CR may contain embedded credentials (user:password@host). The NetworkCheck readiness collector forwarded these unsanitized into the AgenticRun request sent to the LLM provider.
  • Added redactProxyURL() to strip the userinfo component via net/url.Parse before including proxy URLs in readiness output. Falls back to [configured] if parsing fails (fail-closed).
  • no_proxy is unchanged — it's a host list, not a URL.

Test plan

  • TestNetworkCheck_ProxyCredentialRedaction: credentials stripped, no-credentials passthrough, empty string
  • All 30 existing readiness tests pass with no regressions

Update: NetworkCheck removed entirely

Per review feedback, the initial redaction approach was replaced by dropping
the NetworkCheck altogether:

  • SDN warning: OpenShiftSDN is gone since 4.17 — a 5.0 CVO has no reason to check for it
  • Proxy config: git grep -i proxy -- cluster-update returns no hits — nothing consumes this data
  • TLS profile: removed along with the rest of the check

Data that is never collected cannot leak. This fully addresses OTA-2106 by
eliminating the exposure surface rather than sanitizing it.

What was removed

  • pkg/readiness/network.go (NetworkCheck + redactProxyURL)
  • GVRNetwork, GVRProxy, GVRAPIServer declarations
  • All associated test fixtures and assertions

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes

    • Removed network readiness validation, including proxy and API server checks.
    • Readiness results now include seven checks instead of eight.
  • Tests

    • Updated readiness coverage and expected results to reflect the removal of network-related checks.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 10, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references OTA-2025 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Proxy URLs from the cluster Proxy CR may contain embedded credentials (user:password@host). The NetworkCheck readiness collector forwarded these unsanitized into the AgenticRun request sent to the LLM provider.
  • Added redactProxyURL() to strip the userinfo component via net/url.Parse before including proxy URLs in readiness output. Falls back to [configured] if parsing fails (fail-closed).
  • no_proxy is unchanged — it's a host list, not a URL.

Test plan

  • TestNetworkCheck_ProxyCredentialRedaction: credentials stripped, no-credentials passthrough, empty string
  • All 30 existing readiness tests pass with no regressions

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 80573443-81cf-44e9-97fe-f493a1e420de

📥 Commits

Reviewing files that changed from the base of the PR and between 09cdec7 and f6bd3dd.

📒 Files selected for processing (6)
  • pkg/agenticrun/controller_test.go
  • pkg/readiness/check.go
  • pkg/readiness/check_test.go
  • pkg/readiness/checks_test.go
  • pkg/readiness/client.go
  • pkg/readiness/network.go
💤 Files with no reviewable changes (3)
  • pkg/readiness/network.go
  • pkg/readiness/client.go
  • pkg/readiness/check.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The network readiness check and its resource identifiers were removed. Readiness fixtures and tests no longer register network resources or expect the network check. Aggregate readiness expectations now require seven checks.

Changes

Readiness network check removal

Layer / File(s) Summary
Remove network readiness registration and coverage
pkg/readiness/network.go, pkg/readiness/client.go, pkg/readiness/check.go, pkg/readiness/checks_test.go, pkg/readiness/check_test.go
The NetworkCheck implementation and network resource identifiers were removed. Readiness tests now expect seven checks and exclude network.
Update readiness integration fixtures
pkg/agenticrun/controller_test.go, pkg/readiness/checks_test.go
Fake clients and fixtures no longer register or create network, proxy, or API server resources. Aggregate assertions now require seven successful checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f6bd3

This PR makes a localized change to prevent proxy credentials from being forwarded in readiness data, with targeted and existing tests reported as passing; no actionable merge-blocking risk remains.

Suggested reviewers: wking

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The diff changes only Go Test* functions and removes TestNetworkCheck; it adds or modifies no Ginkgo It, Describe, Context, or When titles.
Test Structure And Quality ✅ Passed Changed tests use standard testing.Test functions, not Ginkgo; the PR only removes fake-client fixtures and updates counts, with no new cluster setup, cleanup, or wait operations.
Microshift Test Compatibility ✅ Passed The PR adds no new Ginkgo e2e tests. Its diff only removes NetworkCheck code and updates existing Go unit tests, so the MicroShift API compatibility check is not triggered.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The commit only removes readiness code and Go unit-test fixtures; it adds or modifies no Ginkgo e2e tests under test/, so SNO multi-node checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The commit changes only readiness code and test fixtures; it adds no deployment manifests, operator/controller production code, or topology-related scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR diff only removes NetworkCheck and updates test fixtures and counts; added lines contain no stdout or logging calls, and no process-level output code changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The HEAD^..HEAD diff only removes NetworkCheck and updates Go unit tests; it adds no Ginkgo e2e tests, IPv4 assumptions, or external connectivity requirements.
No-Weak-Crypto ✅ Passed The HEAD diff only removes NetworkCheck and updates readiness tests; no added MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons were found.
Container-Privileges ✅ Passed The PR changes only Go readiness source and tests; no container/Kubernetes manifest adds privileged, host namespace, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The commit only removes NetworkCheck, proxy resource identifiers, and related fixtures; it adds no logging and no sensitive-data path. The remaining proxy log uses proxy.Host and is unchanged.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing NetworkCheck and its unused network and proxy readiness data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/readiness/checks_test.go`:
- Around line 742-746: Update the proxy redaction test around the https_proxy
assertion to always compare proxy["https_proxy"] with tt.wantHTTPS, including
empty expectations. Extend the test cases with the hostless proxy input
http:admin:s3cret@proxy.corp:8080 and expect [configured], preserving coverage
of fail-closed redaction.

In `@pkg/readiness/network.go`:
- Around line 81-86: Update the proxy URL sanitization flow after url.Parse and
before returning u.String() to validate that the parsed URL has both a scheme
and host; return "[configured]" when either is missing. Preserve removing u.User
before returning valid sanitized URLs.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c640fbe3-6a62-4dbc-a304-8f5b15936e70

📥 Commits

Reviewing files that changed from the base of the PR and between 97ee3b7 and 431c81a.

📒 Files selected for processing (2)
  • pkg/readiness/checks_test.go
  • pkg/readiness/network.go

Comment thread pkg/readiness/checks_test.go Outdated
Comment thread pkg/readiness/network.go Outdated
@jrangelramos
jrangelramos force-pushed the fix-proxy-credential-redaction branch 2 times, most recently from f0b656d to 8d4a5a1 Compare August 10, 2026 20:34

@ankitathomas ankitathomas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@jrangelramos
jrangelramos force-pushed the fix-proxy-credential-redaction branch from 8d4a5a1 to 09cdec7 Compare August 11, 2026 13:17

@ankitathomas ankitathomas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-agnostic-operator
/test e2e-agnostic-ovn
/test e2e-agnostic-ovn-techpreview-serial-1of3
/test e2e-agnostic-ovn-techpreview-serial-2of3
/test e2e-agnostic-ovn-techpreview-serial-3of3
/test e2e-agnostic-ovn-upgrade-into-change
/test e2e-agnostic-ovn-upgrade-out-of-change
/test e2e-aws-ovn-techpreview
/test e2e-hypershift
/test e2e-hypershift-conformance

@jrangelramos

Copy link
Copy Markdown
Member Author

/retest-required

Comment thread pkg/readiness/network.go Outdated
"http_proxy": NestedString(proxy.Object, "spec", "httpProxy"),
"https_proxy": NestedString(proxy.Object, "spec", "httpsProxy"),
"http_proxy": redactProxyURL(NestedString(proxy.Object, "spec", "httpProxy")),
"https_proxy": redactProxyURL(NestedString(proxy.Object, "spec", "httpsProxy")),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good time to revisit pkg/readiness/network.go as a whole (CC @harche). It currently has:

  • An SDN warning, but SDN is gone since 4.17, so... no point in a 5.0 CVO looking around for it, right?

  • Embedding the Proxy config in the output, but:

    agentic-skills$ git grep -i proxy origin/main -- cluster-update
    ...no hits...

So maybe we can just drop that whole check, like we dropped the CRD check in #1415?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

@jrangelramos

jrangelramos commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

/retitle "OTA-2106: Redact proxy URL credentials from AgenticRun readiness data"

@openshift-ci openshift-ci Bot changed the title OTA-2025: Redact proxy URL credentials from AgenticRun readiness data "OTA-2106: Redact proxy URL credentials from AgenticRun readiness data" Aug 14, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references OTA-2106 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the weakness to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Proxy URLs from the cluster Proxy CR may contain embedded credentials (user:password@host). The NetworkCheck readiness collector forwarded these unsanitized into the AgenticRun request sent to the LLM provider.
  • Added redactProxyURL() to strip the userinfo component via net/url.Parse before including proxy URLs in readiness output. Falls back to [configured] if parsing fails (fail-closed).
  • no_proxy is unchanged — it's a host list, not a URL.

Test plan

  • TestNetworkCheck_ProxyCredentialRedaction: credentials stripped, no-credentials passthrough, empty string
  • All 30 existing readiness tests pass with no regressions

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

  • Proxy credentials are now removed from readiness results to prevent sensitive information from being exposed.

  • Invalid proxy URLs are displayed safely as [configured], while empty and credential-free values remain unchanged.

  • Tests

  • Added coverage for HTTP and HTTPS proxy credential redaction and edge cases.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

The NetworkCheck gathered SDN status, proxy configuration, and TLS
profile from the cluster. SDN is gone since 4.17 (irrelevant for a 5.0
CVO), proxy URLs are not consumed by cluster-update tooling, and
embedding them in readiness data risks leaking credentials to the LLM
provider (OTA-2106). Remove the entire check rather than just redacting
proxy credentials — data that is never collected cannot leak.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jrangelramos
jrangelramos force-pushed the fix-proxy-credential-redaction branch from 09cdec7 to f6bd3dd Compare August 24, 2026 15:43
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2026
@jrangelramos

jrangelramos commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

/retitle "OTA-2106: drop NetworkCheck (SDN gone, proxy data unused)"

@openshift-ci openshift-ci Bot changed the title "OTA-2106: Redact proxy URL credentials from AgenticRun readiness data" "OTA-2106: drop NetworkCheck (SDN gone, proxy data unused)" Aug 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references OTA-2106 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the weakness to target the "5.1.0" version, but no target version was set.

Details

In response to this:

Summary

  • Proxy URLs from the cluster Proxy CR may contain embedded credentials (user:password@host). The NetworkCheck readiness collector forwarded these unsanitized into the AgenticRun request sent to the LLM provider.
  • Added redactProxyURL() to strip the userinfo component via net/url.Parse before including proxy URLs in readiness output. Falls back to [configured] if parsing fails (fail-closed).
  • no_proxy is unchanged — it's a host list, not a URL.

Test plan

  • TestNetworkCheck_ProxyCredentialRedaction: credentials stripped, no-credentials passthrough, empty string
  • All 30 existing readiness tests pass with no regressions

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes

  • Removed network readiness validation, including proxy and API server checks.

  • Readiness results now include seven checks instead of eight.

  • Tests

  • Updated readiness coverage and expected results to reflect the removal of network-related checks.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@wking wking left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-agnostic-operator
/test e2e-agnostic-ovn
/test e2e-agnostic-ovn-techpreview-serial-1of3
/test e2e-agnostic-ovn-techpreview-serial-2of3
/test e2e-agnostic-ovn-techpreview-serial-3of3
/test e2e-agnostic-ovn-upgrade-into-change
/test e2e-agnostic-ovn-upgrade-out-of-change
/test e2e-aws-ovn-techpreview
/test e2e-hypershift
/test e2e-hypershift-conformance

@openshift-ci

openshift-ci Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ankitathomas, jrangelramos, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2026
@ankitathomas

Copy link
Copy Markdown

/retest

@openshift-ci

openshift-ci Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agnostic-ovn f6bd3dd link true /test e2e-agnostic-ovn
ci/prow/e2e-hypershift-conformance f6bd3dd link true /test e2e-hypershift-conformance
ci/prow/e2e-aws-ovn-techpreview f6bd3dd link true /test e2e-aws-ovn-techpreview
ci/prow/e2e-agnostic-ovn-techpreview-serial-1of3 f6bd3dd link true /test e2e-agnostic-ovn-techpreview-serial-1of3

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants