Skip to content

HELM-520: Warn users about insecure HTTP Helm repository URLs and aut… - #16885

Open
sowmya-sl wants to merge 2 commits into
openshift:mainfrom
sowmya-sl:add-http-warning
Open

HELM-520: Warn users about insecure HTTP Helm repository URLs and aut…#16885
sowmya-sl wants to merge 2 commits into
openshift:mainfrom
sowmya-sl:add-http-warning

Conversation

@sowmya-sl

@sowmya-sl sowmya-sl commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

…o-upgrade to HTTPS

Show an inline warning when users enter an HTTP repository URL, alerting them that credentials may be exposed and content may be tampered with in transit. On submit, attempt to upgrade the URL to HTTPS by probing the server; fall back to HTTP if HTTPS is unavailable.

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

Summary by CodeRabbit

  • New Features
    • Added an inline warning when Helm chart repository URLs use unencrypted HTTP.
    • Automatically upgrades HTTP repository URLs to HTTPS when the secure endpoint is available.
    • Explains that unencrypted connections may expose credentials or allow downloaded content to be tampered with.
  • Bug Fixes
    • Preserves the original HTTP URL when HTTPS is unavailable, unreachable, or the check times out.
  • Tests
    • Added coverage for successful upgrades, unsupported URLs, failures, and timeouts.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

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

openshift-ci-robot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@sowmya-sl: This pull request references HELM-520 which is a valid jira issue.

Details

In response to this:

…o-upgrade to HTTPS

Show an inline warning when users enter an HTTP repository URL, alerting them that credentials may be exposed and content may be tampered with in transit. On submit, attempt to upgrade the URL to HTTPS by probing the server; fall back to HTTP if HTTPS is unavailable.

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 30, 2026
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sowmya-sl

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 component/helm Related to helm-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6477e99e-a3af-4edc-8adf-87decf65dea1

📥 Commits

Reviewing files that changed from the base of the PR and between e09397a and 1242309.

📒 Files selected for processing (1)
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/tests/helmchartrepository-create-utils-https-upgrade.spec.ts

Walkthrough

The Helm chart repository form warns when an HTTP URL is entered and probes for a reachable HTTPS equivalent during submission. The helper handles unsupported inputs, failures, and timeouts. Tests cover these cases.

Changes

Helm repository HTTPS handling

Layer / File(s) Summary
HTTPS probe utility and validation
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts, frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/*
Adds tryHttpsUpgrade, which performs a timed HTTPS HEAD probe and returns null for unsupported inputs or failed probes. Tests cover successful upgrades, failures, passthrough cases, and timeouts.
Form warning and submission integration
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx, frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx, frontend/packages/helm-plugin/locales/en/helm-plugin.json
Displays translated security guidance for HTTP repository URLs and applies a successful HTTPS upgrade before creating or updating the HelmChartRepository resource.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RepositoryForm
  participant CreateHelmChartRepository
  participant tryHttpsUpgrade
  participant KubernetesResource
  RepositoryForm->>CreateHelmChartRepository: Submit repository configuration
  CreateHelmChartRepository->>tryHttpsUpgrade: Probe HTTP URL
  tryHttpsUpgrade-->>CreateHelmChartRepository: HTTPS URL or null
  CreateHelmChartRepository->>KubernetesResource: Create or update repository
Loading

Suggested labels: verified

Suggested reviewers: webbnh, baijum

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description gives a brief summary but leaves all required template sections, test cases, browser conformance, and reviewer details incomplete. Complete the required sections with root cause, solution details, test setup, test cases, browser testing, and reviewer or assignee information.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies HELM-520 and summarizes the HTTP warning and HTTPS upgrade changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 added Jest suite uses only literal, static describe/it titles; URLs, timeout values, and other test inputs remain in test bodies, with no generated identifiers or runtime interpolation.
Test Structure And Quality ✅ Passed Not applicable: the PR adds a Jest TypeScript unit test, and the repository contains no Ginkgo constructs for this change.
Microshift Test Compatibility ✅ Passed The PR changes only a Jest unit test; it adds no Ginkgo e2e tests and references no MicroShift-incompatible OpenShift APIs or features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only JSON, TypeScript/TSX, and one Jest spec; the PR-to-main diff adds no Go files or Ginkgo e2e tests, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only Helm UI, HTTPS probe logic, tests, and locale text; it adds no deployment, operator, controller, or topology-related scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The feature diff changes only frontend Helm plugin TypeScript/TSX, JSON, and Jest files; it adds no OTE binary or Go process-level stdout code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The added test is a Jest unit test, not a Ginkgo e2e test. It mocks fetch and uses no IPv4 addresses or real external connectivity.
No-Weak-Crypto ✅ Passed PR-added code only probes HTTP/HTTPS with fetch and AbortController; no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons are present.
Container-Privileges ✅ Passed The PR changes only Helm plugin locale and TypeScript files; the aggregate diff adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The full PR diff adds no console or logger calls. The existing telemetry event sends only repository scope, and the HTTPS probe does not log URLs, credentials, or errors.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

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.

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
`@frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts`:
- Around line 77-81: Normalize the HTTP scheme comparison case-insensitively so
tryHttpsUpgrade handles uppercase and mixed-case HTTP URLs while preserving the
existing HTTPS conversion behavior. Apply the same normalized check in
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx
at lines 145-156 so warnings and upgrades remain consistent. Extend
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
at lines 26-39 with an uppercase-scheme test case.
- Around line 85-86: Update the HTTPS probe in the Helm chart repository upgrade
utility to upgrade only when the response is observably successful; avoid
treating opaque or resolved non-OK no-cors responses as success, otherwise
retain the original HTTP URL. In
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts:85-86,
adjust the fetch validation while preserving the persisted URL behavior in
CreateHelmChartRepository.tsx. In
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts:10-24,
add resolved non-OK probe cases and assert that no HTTPS upgrade occurs.
🪄 Autofix (Beta)

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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9fee68d5-7901-448d-b146-febc0a18ca80

📥 Commits

Reviewing files that changed from the base of the PR and between 2390f86 and 60bbd46.

📒 Files selected for processing (5)
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts

Comment on lines +77 to +81
export const tryHttpsUpgrade = async (httpUrl: string): Promise<string | null> => {
if (!httpUrl?.startsWith('http://')) {
return null;
}
const httpsUrl = httpUrl.replace(/^http:\/\//, 'https://');

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in \
  frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts \
  frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx \
  frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
do
  echo "### $f"
  wc -l "$f"
  echo
done

echo "### utils excerpt"
sed -n '1,180p' frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts

echo "### form excerpt"
sed -n '120,190p' frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx

echo "### test excerpt"
sed -n '1,220p' frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts

Repository: openshift/console

Length of output: 9159


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
files = [
    Path('frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts'),
    Path('frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx'),
    Path('frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts'),
]
for p in files:
    text = p.read_text()
    print(f"\n### {p}")
    for i, line in enumerate(text.splitlines(), 1):
        if 'tryHttpsUpgrade' in line or "startsWith('http://')" in line or 'Alert' in line or 'HTTP is unencrypted' in line or 'https-upgrade' in line:
            start = max(1, i-8)
            end = min(len(text.splitlines()), i+20)
            for j in range(start, end+1):
                print(f"{j:4}: {text.splitlines()[j-1]}")
            break
PY

Repository: openshift/console

Length of output: 3792


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "startsWith\\('http://'\)|startsWith\\(\"http://\"\\)|tryHttpsUpgrade|HTTP is unencrypted" \
  frontend/packages/helm-plugin/src/components/forms/HelmChartRepository

Repository: openshift/console

Length of output: 3032


Normalize HTTP scheme checks

startsWith('http://') misses case variants like HTTP://repo.example, so both the warning and HTTPS upgrade path can be skipped. Reuse a normalized scheme check in helmchartrepository-create-utils.ts and CreateHelmChartRepositoryFormEditor.tsx, and add an uppercase-scheme test case.

📍 Affects 3 files
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts#L77-L81 (this comment)
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx#L145-L156
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts#L26-L39
🤖 Prompt for 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.

In
`@frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts`
around lines 77 - 81, Normalize the HTTP scheme comparison case-insensitively so
tryHttpsUpgrade handles uppercase and mixed-case HTTP URLs while preserving the
existing HTTPS conversion behavior. Apply the same normalized check in
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx
at lines 145-156 so warnings and upgrades remain consistent. Extend
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
at lines 26-39 with an uppercase-scheme test case.

@coderabbitai coderabbitai Bot left a comment

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.

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
`@frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts`:
- Around line 53-66: Move Jest timer cleanup for the “should return null when
fetch times out” test into an afterEach hook or a finally block so it always
executes, including when assertions fail. Remove the test-local
jest.useRealTimers() call after the assertions while preserving the existing
fake-timer setup and timeout assertions.

In
`@frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx`:
- Around line 114-115: Validate that
HelmChartRepositoryRes.spec?.connectionConfig?.url is a string before passing it
to tryHttpsUpgrade in the submission flow. If it is missing or invalid, set the
form error through the existing error-handling path and stop processing; only
invoke tryHttpsUpgrade for a valid URL.
🪄 Autofix (Beta)

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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 205dd47d-da6d-4d2c-b970-8addd4160abe

📥 Commits

Reviewing files that changed from the base of the PR and between 60bbd46 and d5e7cc7.

📒 Files selected for processing (5)
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-create-utils-https-upgrade.spec.ts
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx

Comment on lines +114 to +115
const currentUrl = HelmChartRepositoryRes.spec?.connectionConfig?.url;
const upgradedUrl = await tryHttpsUpgrade(currentUrl);

@coderabbitai coderabbitai Bot Jul 30, 2026

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show file sizes and relevant excerpts with line numbers
wc -l frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx
sed -n '1,220p' frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx

printf '\n--- helper search ---\n'
rg -n "tryHttpsUpgrade|safeLoad|connectionConfig?.url|setStatus|resourceCall" frontend/packages/helm-plugin -S

Repository: openshift/console

Length of output: 14649


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the helper implementation and any related types if present
helper_file=$(rg -l "function tryHttpsUpgrade|const tryHttpsUpgrade|export .*tryHttpsUpgrade" frontend/packages/helm-plugin -S | head -n 1 || true)
printf 'helper_file=%s\n' "${helper_file:-<none>}"
if [ -n "${helper_file:-}" ]; then
  wc -l "$helper_file"
  sed -n '1,220p' "$helper_file"
fi

printf '\n--- type definitions search ---\n'
rg -n "type HelmChartRepositoryType|interface HelmChartRepositoryType|connectionConfig" frontend/packages/helm-plugin -S

Repository: openshift/console

Length of output: 9023


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# If the helper uses string operations, inspect for explicit guards
rg -n "startsWith\\(|typeof .*url|isString|URL\\(" frontend/packages/helm-plugin/src -S

Repository: openshift/console

Length of output: 2336


Validate spec.connectionConfig.url before tryHttpsUpgrade. safeLoad(values.yamlData) as HelmChartRepositoryType doesn’t enforce runtime shape, so a non-string URL can hit .startsWith() and abort submission before the form sets an error.

🤖 Prompt for 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.

In
`@frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx`
around lines 114 - 115, Validate that
HelmChartRepositoryRes.spec?.connectionConfig?.url is a string before passing it
to tryHttpsUpgrade in the submission flow. If it is missing or invalid, set the
form error through the existing error-handling path and stop processing; only
invoke tryHttpsUpgrade for a valid URL.

Source: Path instructions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not a valid issue. tryHttpsUpgrade already handles missing/invalid input safely: line 78 checks if (!httpUrl?.startsWith('http://')) and returns null for undefined, null, empty string, or any non-HTTP URL. There's no crash path. Adding a separate string-type guard at the call site would be redundant defensive code.

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.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

helper=$(fd -a '^helmchartrepository-create-utils\.ts$' frontend/packages/helm-plugin | head -n 1)
types=$(fd -a '^helm-types\.ts$' frontend/packages/helm-plugin | head -n 1)

printf '%s\n' '--- utility outline ---'
ast-grep outline "$helper" --items all --view expanded
printf '%s\n' '--- tryHttpsUpgrade implementation ---'
rg -n -A30 -B5 'tryHttpsUpgrade' "$helper"

printf '%s\n' '--- relevant type declarations ---'
rg -n -A20 -B5 'HelmChartRepositoryType|connectionConfig|url' "$types"

Length of output: 4959


@sowmya-sl, the issue is still valid.

httpUrl?.startsWith('http://') safely handles null and undefined. It does not safely handle non-null, non-string YAML values.

For example, this valid YAML syntax passes through safeLoad:

spec:
  connectionConfig:
    url: 123

safeLoad(...) as HelmChartRepositoryType only changes the TypeScript view. It does not validate the runtime value. In this case, tryHttpsUpgrade(123) evaluates 123?.startsWith(...) and throws because 123 has no startsWith method.

The helper should check typeof httpUrl === 'string' before calling startsWith, or the submission flow should validate the value before calling the helper.

You are interacting with an AI system.

…o-upgrade to HTTPS

Show an inline warning when users enter an HTTP repository URL, alerting
them that credentials may be exposed and content may be tampered with in
transit. On submit, attempt to upgrade the URL to HTTPS by probing the
server; fall back to HTTP if HTTPS is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sowmya-sl
sowmya-sl marked this pull request as ready for review August 3, 2026 14:42
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 3, 2026
@sowmya-sl

Copy link
Copy Markdown
Contributor Author

/verified by @sowmya-sl

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sowmya-sl: This PR has been marked as verified by @sowmya-sl.

Details

In response to this:

/verified by @sowmya-sl

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.

@openshift-ci-robot

openshift-ci-robot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@sowmya-sl: This pull request references HELM-520 which is a valid jira issue.

Details

In response to this:

…o-upgrade to HTTPS

Show an inline warning when users enter an HTTP repository URL, alerting them that credentials may be exposed and content may be tampered with in transit. On submit, attempt to upgrade the URL to HTTPS by probing the server; fall back to HTTP if HTTPS is unavailable.

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

Summary by CodeRabbit

  • New Features
  • Added an inline warning when Helm chart repository URLs use unencrypted HTTP.
  • Automatically upgrades HTTP repository URLs to HTTPS when the secure endpoint is available.
  • Explains that unencrypted connections may expose credentials or allow downloaded content to be tampered with.
  • Bug Fixes
  • Preserves the original HTTP URL when HTTPS is unavailable, unreachable, or the check times out.
  • Tests
  • Added coverage for successful upgrades, unsupported URLs, failures, and timeouts.

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.

@openshift-ci
openshift-ci Bot requested review from baijum and webbnh August 3, 2026 14:43
Use plain { ok: true/false } objects instead of new Response() in
tryHttpsUpgrade tests since the CI Node.js version lacks the global
Response constructor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Aug 4, 2026
@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@sowmya-sl: all tests passed!

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. component/helm Related to helm-plugin jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants