Skip to content

Conversation

@rawagner
Copy link
Contributor

@rawagner rawagner commented Aug 11, 2025

UI will render the URLs as buttons

Screenshot From 2025-08-08 10-01-32 Screenshot From 2025-08-08 10-01-51 Screenshot From 2025-08-08 10-02-11

Summary by CodeRabbit

  • New Features
    • Enhanced privacy and clearer messaging: responses now omit URLs for Discovery ISO, kubeconfig, and kubeadmin password when returned by tools; messages now indicate those assets are available rather than offering direct download links.
  • Documentation
    • Updated templates and guidance to reflect the new URL-omission and asset-availability messaging rules.

@openshift-ci openshift-ci bot requested review from carbonin and maorfr August 11, 2025 11:47
@coderabbitai
Copy link

coderabbitai bot commented Aug 11, 2025

Walkthrough

Revisions to template.yaml update assistant messaging: the assistant should deliver the Discovery ISO itself (not a URL) and must not include tool-returned URLs for the Discovery ISO, kubeconfig, or kubeadmin password in responses. No code, API, or control-flow changes.

Changes

Cohort / File(s) Summary of Changes
Template policy updates
template.yaml
Added guidance lines instructing the assistant to (1) provide the Discovery ISO itself rather than an ISO URL and not to include tool-returned ISO URLs in responses, and (2) not to include tool-returned URLs/links for the kubeconfig file or kubeadmin password. No exported signatures or control-flow changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • omertuc

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 350d3ab and ddc9533.

📒 Files selected for processing (1)
  • template.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • template.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Red Hat Konflux / assisted-chat-saas-main-on-pull-request
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rawagner rawagner changed the title Tweak the systemprompt to not return ISO, kubeconfig and credentials Tweak the systemprompt to not return ISO, kubeconfig and credentials URLs Aug 11, 2025
@rawagner rawagner changed the title Tweak the systemprompt to not return ISO, kubeconfig and credentials URLs MGMT-21376: Tweak the systemprompt to not return ISO, kubeconfig and credentials URLs Aug 11, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 11, 2025

@rawagner: This pull request references MGMT-21376 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 "4.20.0" version, but no target version was set.

Details

In response to this:

UI will render the URLs as buttons

Screenshot From 2025-08-08 10-01-32 Screenshot From 2025-08-08 10-01-51 Screenshot From 2025-08-08 10-02-11

Summary by CodeRabbit

  • New Features
  • Enhanced privacy: responses now omit URLs for Discovery ISO, kubeconfig, and kubeadmin password links returned by tools.
  • Documentation
  • Updated template guidance to reflect new URL-omission rules for sensitive artifacts.

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.

@omertuc
Copy link
Member

omertuc commented Aug 11, 2025

/lgtm

@omertuc
Copy link
Member

omertuc commented Aug 11, 2025

/approve

@openshift-ci
Copy link

openshift-ci bot commented Aug 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: omertuc, rawagner

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3770c54 and 350d3ab.

📒 Files selected for processing (1)
  • template.yaml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Red Hat Konflux / assisted-chat-saas-main-on-pull-request

Comment on lines 172 to 210
2. **Infrastructure Setup / ISO Download:**
* After a cluster is created, the next step is typically to **download the Discovery ISO**.
* Proactively offer to provide the ISO download URL.
* **Crucially, if a tool returns a URL for the Discovery ISO, do not include the URL in your response.**
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Resolve contradiction and reference UI button for ISO download

Line 174 asks to “offer to provide the ISO download URL” while Line 175 says not to include the URL. Reword to remove the URL mention and guide the assistant to reference the UI button.

Apply this diff:

       2.  **Infrastructure Setup / ISO Download:**
           * After a cluster is created, the next step is typically to **download the Discovery ISO**.
-          * Proactively offer to provide the ISO download URL.
-          * **Crucially, if a tool returns a URL for the Discovery ISO, do not include the URL in your response.**
+          * Proactively offer to provide the Discovery ISO. Do not include or echo any direct download URL.
+          * **If a tool returns a URL for the Discovery ISO, do not include the URL in your response. Instead, tell the user that a "Download Discovery ISO" button is available in the UI.**

I can propagate this phrasing consistently if there are other prompt files.


🏁 Script executed:

#!/bin/bash
# Scan for other guidance that suggests pasting ISO URLs directly.
rg -n "ISO.*URL|Discovery ISO.*URL|download URL" -A2 -B2

Length of output: 546


Resolve ISO download guidance contradiction in template.yaml

Lines 172–176 currently ask to “offer to provide the ISO download URL” yet immediately forbid including it. Update to remove the URL reference and point users to the UI button instead.

• File: template.yaml
• Lines: 172–176

Suggested diff:

       2.  **Infrastructure Setup / ISO Download:**
           * After a cluster is created, the next step is typically to **download the Discovery ISO**.
-          * Proactively offer to provide the ISO download URL.
-          * **Crucially, if a tool returns a URL for the Discovery ISO, do not include the URL in your response.**
+          * Proactively offer to provide the Discovery ISO. Do not include or echo any direct download URL.
+          * **If a tool returns a URL for the Discovery ISO, do not include the URL in your response. Instead, instruct the user to click the “Download Discovery ISO” button in the UI.**

A quick repo scan shows no other occurrences of ISO URL guidance.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
2. **Infrastructure Setup / ISO Download:**
* After a cluster is created, the next step is typically to **download the Discovery ISO**.
* Proactively offer to provide the ISO download URL.
* **Crucially, if a tool returns a URL for the Discovery ISO, do not include the URL in your response.**
2. **Infrastructure Setup / ISO Download:**
* After a cluster is created, the next step is typically to **download the Discovery ISO**.
* Proactively offer to provide the Discovery ISO. Do not include or echo any direct download URL.
* **If a tool returns a URL for the Discovery ISO, do not include the URL in your response. Instead, instruct the user to click the “Download Discovery ISO” button in the UI.**
🤖 Prompt for AI Agents
In template.yaml around lines 172 to 176, the guidance currently contradicts
itself by saying to “offer to provide the ISO download URL” and then forbidding
including the URL; remove any mention of providing or offering the ISO URL and
replace it with a pointer to use the web UI download button (e.g., instruct
users to click the “Download Discovery ISO” button in the cluster UI); update
the wording so it no longer references returning or offering a URL and instead
directs users to the UI for obtaining the ISO; ensure the surrounding text reads
smoothly and that no other lines in this block imply providing an external ISO
URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've updated the systemprompt. But without mentioning UI, which should be given.

Comment on lines 210 to 247
7. **Installation Complete:**
* **Once the installation is successfully completed**, proactively inform the user and offer to provide the **kubeconfig file** and the **kubeadmin password**. This is crucial for accessing their new OpenShift cluster.
* **Crucially, if a tool returns a URL for the kubeconfig file or a URL/link for the kubeadmin password, do not include the URL/link in your response.**
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Prevent disclosure of secret contents and URLs for kubeconfig/kubeadmin

Current text blocks URLs/links but still “offers to provide” kubeconfig and the kubeadmin password, which could be read as pasting secret contents. Explicitly forbid including both URLs and secret contents; reference UI buttons instead.

Apply this diff:

       7.  **Installation Complete:**
-          * **Once the installation is successfully completed**, proactively inform the user and offer to provide the **kubeconfig file** and the **kubeadmin password**. This is crucial for accessing their new OpenShift cluster.
-          * **Crucially, if a tool returns a URL for the kubeconfig file or a URL/link for the kubeadmin password, do not include the URL/link in your response.**
+          * **Once the installation is successfully completed**, proactively inform the user and offer to provide access to the **kubeconfig** and the **kubeadmin password** via the UI. Do not paste the kubeconfig content or the password value into the response.
+          * **If a tool returns a URL for the kubeconfig file or a URL/link for the kubeadmin password, do not include the URL/link in your response. Instead, inform the user that UI buttons are available to retrieve these securely.**

Optional: Add a general security principle to make this policy global:

# Under **General Proactive Principles:**
      * Never paste or echo credentials, tokens, passwords, kubeconfig contents, or direct download URLs. 
      * When tools return such items or URLs, inform the user that the UI provides secure buttons/controls to access them.

I can submit a follow-up patch adding the general principle and synchronizing wording across prompts.


🏁 Script executed:

#!/bin/bash
# Scan for any remaining guidance that suggests sharing kubeconfig or kubeadmin password directly.
rg -n "kubeconfig|kubeadmin password|password URL|kubeconfig URL" -A2 -B2

Length of output: 667


Prevent disclosure of kubeconfig and kubeadmin secrets via chat

File: template.yaml
Lines: 210–213

The current guidance still “offers to provide” the kubeconfig file and kubeadmin password directly, which could be misunderstood as pasting secret contents. We need to explicitly forbid sharing both URLs and secret contents, and instead point users to secure UI controls.

Apply this diff:

       7.  **Installation Complete:**
-          * **Once the installation is successfully completed**, proactively inform the user and offer to provide the **kubeconfig file** and the **kubeadmin password**. This is crucial for accessing their new OpenShift cluster.
-          * **Crucially, if a tool returns a URL for the kubeconfig file or a URL/link for the kubeadmin password, do not include the URL/link in your response.**
+          * **Once the installation is successfully completed**, inform the user that the **kubeconfig** and **kubeadmin password** are available via secure UI controls. Do not paste the kubeconfig content or password value into the response.
+          * **If a tool returns a URL for the kubeconfig file or for the kubeadmin password, do not include the link in your response.** Instead, tell the user to use the UI buttons to retrieve them securely.

Optional: Under General Proactive Principles, add:

  * Never paste or echo credentials, tokens, passwords, kubeconfig contents, or direct download URLs.
  * When tools return such items or URLs, inform users that the UI provides secure buttons/controls to access them.
🤖 Prompt for AI Agents
In template.yaml around lines 210 to 213, the wording currently "offer to
provide the kubeconfig file and the kubeadmin password" risks encouraging
pasting secrets or URLs; update the text to explicitly forbid sharing kubeconfig
contents, kubeadmin passwords, tokens, or direct download URLs in chat and
instead instruct the assistant to tell users to use the secure UI
controls/buttons to retrieve those items; also add the optional bullets under
"General Proactive Principles" that state "Never paste or echo credentials,
tokens, passwords, kubeconfig contents, or direct download URLs" and "When tools
return such items or URLs, inform users that the UI provides secure
buttons/controls to access them."

@omertuc
Copy link
Member

omertuc commented Aug 11, 2025

/hold Code rabbit is making some good points

@eranco74
Copy link
Collaborator

/lgtm

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 13, 2025

@rawagner: This pull request references MGMT-21376 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 "4.20.0" version, but no target version was set.

Details

In response to this:

UI will render the URLs as buttons

Screenshot From 2025-08-08 10-01-32 Screenshot From 2025-08-08 10-01-51 Screenshot From 2025-08-08 10-02-11

Summary by CodeRabbit

  • New Features
  • Enhanced privacy and clearer messaging: responses now omit URLs for Discovery ISO, kubeconfig, and kubeadmin password when returned by tools; messages now indicate those assets are available rather than offering direct download links.
  • Documentation
  • Updated templates and guidance to reflect the new URL-omission and asset-availability messaging rules.

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.

@rawagner
Copy link
Contributor Author

@eranco74 @omertuc i've updated the systemprompt. But without explicitly mentioning UI, which we do not want to have in the LLM response IMO.

@eranco74
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 13, 2025
@eranco74
Copy link
Collaborator

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit ac0445e into rh-ecosystem-edge:main Aug 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants