Skip to content

Conversation

@jhadvig
Copy link
Member

@jhadvig jhadvig commented Jan 30, 2026

User description

/assign @JoelSpeed


PR Type

Enhancement


Description

  • Remove ConsolePluginContentSecurityPolicy feature gate

  • Make CSP configuration always available for ConsolePlugin

  • Move CSP tests from gated to ungated test suite

  • Update feature gate manifests and documentation


Diagram Walkthrough

flowchart LR
  A["ConsolePluginContentSecurityPolicy<br/>Feature Gate"] -->|Remove| B["CSP Always Available"]
  C["Gated Test Suite<br/>ConsolePluginContentSecurityPolicy.yaml"] -->|Migrate| D["Ungated Test Suite<br/>AAA_ungated.yaml"]
  E["Feature Gate Definition<br/>features.go"] -->|Delete| F["No Feature Gate"]
  B -->|Update| G["CRD Manifests"]
  D -->|Add| G
Loading

File Walkthrough

Relevant files
Enhancement
5 files
types_console_plugin.go
Remove feature gate annotation from CSP field                       
+0/-1     
features.go
Delete ConsolePluginContentSecurityPolicy feature gate definition
+0/-8     
zz_generated.featuregated-crd-manifests.yaml
Clear FeatureGates list for ConsolePlugin CRD                       
+1/-2     
AAA_ungated.yaml
Add full CSP schema to ungated CRD manifest                           
+123/-0 
ConsolePluginContentSecurityPolicy.yaml
Remove feature-gated CRD manifest file                                     
+0/-353 
Tests
2 files
AAA_ungated.yaml
Add comprehensive CSP validation tests to ungated suite   
+186/-0 
ConsolePluginContentSecurityPolicy.yaml
Remove feature-gated CSP test file entirely                           
+0/-194 
Documentation
1 files
features.md
Remove ConsolePluginContentSecurityPolicy from feature matrix
+0/-1     
Configuration changes
8 files
featureGate-Hypershift-Default.yaml
Remove CSP feature gate from Hypershift Default profile   
+0/-3     
featureGate-Hypershift-DevPreviewNoUpgrade.yaml
Remove CSP feature gate from Hypershift DevPreview profile
+0/-3     
featureGate-Hypershift-OKD.yaml
Remove CSP feature gate from Hypershift OKD profile           
+0/-3     
featureGate-Hypershift-TechPreviewNoUpgrade.yaml
Remove CSP feature gate from Hypershift TechPreview profile
+0/-3     
featureGate-SelfManagedHA-Default.yaml
Remove CSP feature gate from SelfManagedHA Default profile
+0/-3     
featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
Remove CSP feature gate from SelfManagedHA DevPreview profile
+0/-3     
featureGate-SelfManagedHA-OKD.yaml
Remove CSP feature gate from SelfManagedHA OKD profile     
+0/-3     
featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
Remove CSP feature gate from SelfManagedHA TechPreview profile
+0/-3     

@openshift-ci-robot
Copy link

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 Jan 30, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

Hello @jhadvig! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jan 30, 2026
@openshift-ci-robot
Copy link

@jhadvig: This pull request references Jira Issue OCPBUGS-74506, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/assign @JoelSpeed

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 a review from yapei January 30, 2026 11:26
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

This pull request removes the ConsolePluginContentSecurityPolicy feature gate from the codebase. Test cases for ConsolePlugin content security policy validation are migrated from a feature-gated test file to an ungated test file. The feature gate declaration is removed from the features registry, and all references to it are deleted from feature gate manifests across multiple deployment configurations including Hypershift and SelfManagedHA. The feature gate annotation is also removed from the ConsolePluginSpec documentation.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing the ConsolePluginContentSecurityPolicy feature gate. It is specific, concise, and clearly identifies the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description includes a user description section that clearly describes the intent: removing the ConsolePluginContentSecurityPolicy feature gate, making CSP configuration always available, migrating tests, and updating manifests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@openshift-ci openshift-ci bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 30, 2026
@openshift-ci-robot
Copy link

@jhadvig: This pull request references Jira Issue OCPBUGS-74506, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

Details

In response to this:

User description

/assign @JoelSpeed


PR Type

Enhancement


Description

  • Remove ConsolePluginContentSecurityPolicy feature gate

  • Make CSP configuration always available for ConsolePlugin

  • Move CSP tests from gated to ungated test suite

  • Update feature gate manifests and documentation


Diagram Walkthrough

flowchart LR
 A["ConsolePluginContentSecurityPolicy<br/>Feature Gate"] -->|Remove| B["CSP Always Available"]
 C["Gated Test Suite<br/>ConsolePluginContentSecurityPolicy.yaml"] -->|Migrate| D["Ungated Test Suite<br/>AAA_ungated.yaml"]
 E["Feature Gate Definition<br/>features.go"] -->|Delete| F["No Feature Gate"]
 B -->|Update| G["CRD Manifests"]
 D -->|Add| G
Loading

File Walkthrough

Relevant files
Enhancement
5 files
types_console_plugin.go
Remove feature gate annotation from CSP field                       
+0/-1     
features.go
Delete ConsolePluginContentSecurityPolicy feature gate definition
+0/-8     
zz_generated.featuregated-crd-manifests.yaml
Clear FeatureGates list for ConsolePlugin CRD                       
+1/-2     
AAA_ungated.yaml
Add full CSP schema to ungated CRD manifest                           
+123/-0 
ConsolePluginContentSecurityPolicy.yaml
Remove feature-gated CRD manifest file                                     
+0/-353 
Tests
2 files
AAA_ungated.yaml
Add comprehensive CSP validation tests to ungated suite   
+186/-0 
ConsolePluginContentSecurityPolicy.yaml
Remove feature-gated CSP test file entirely                           
+0/-194 
Documentation
1 files
features.md
Remove ConsolePluginContentSecurityPolicy from feature matrix
+0/-1     
Configuration changes
8 files
featureGate-Hypershift-Default.yaml
Remove CSP feature gate from Hypershift Default profile   
+0/-3     
featureGate-Hypershift-DevPreviewNoUpgrade.yaml
Remove CSP feature gate from Hypershift DevPreview profile
+0/-3     
featureGate-Hypershift-OKD.yaml
Remove CSP feature gate from Hypershift OKD profile           
+0/-3     
featureGate-Hypershift-TechPreviewNoUpgrade.yaml
Remove CSP feature gate from Hypershift TechPreview profile
+0/-3     
featureGate-SelfManagedHA-Default.yaml
Remove CSP feature gate from SelfManagedHA Default profile
+0/-3     
featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
Remove CSP feature gate from SelfManagedHA DevPreview profile
+0/-3     
featureGate-SelfManagedHA-OKD.yaml
Remove CSP feature gate from SelfManagedHA OKD profile     
+0/-3     
featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
Remove CSP feature gate from SelfManagedHA TechPreview profile
+0/-3     

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.

@qodo-code-review
Copy link

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@openshift-ci openshift-ci bot requested review from JoelSpeed and spadgett January 30, 2026 11:26
@qodo-code-review
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix quote detection rule

Fix the CEL validation rule for detecting single quotes in CSP directive values.
The current rule incorrectly matches two single quotes instead of one. Update
the rule to properly escape and check for a single quote character.

console/v1/zz_generated.featuregated-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml [197-198]

 - message: CSP directive value cannot contain a quote
-  rule: '!self.contains("''")'
+  rule: '!self.contains("\'")'

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies and fixes a bug in the CRD validation rule for detecting single quotes, which is critical for ensuring proper CSP value validation.

Medium
  • More

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: 1

🤖 Fix all issues with AI agents
In `@console/v1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml`:
- Around line 264-275: The test text and value are inconsistent: the test claims
a “tab” but the CSP value uses spaces; update the YAML so
spec.contentSecurityPolicy[0].values[0] contains an actual tab character (escape
it) in the URI (replace the series of spaces in the initial block value
"https://scri    pt1.com/" with a single \t where intended) or alternatively
rename the test description from “tab” to “spaces” so it accurately reflects the
current input; ensure you only modify the initial block value or the test name
and keep the expectedError unchanged.

Comment on lines +264 to +275
initial: |
apiVersion: console.openshift.io/v1
kind: ConsolePlugin
spec:
displayName: foo
backend:
type: Service
contentSecurityPolicy:
- directive: ScriptSrc
values:
- https://scri pt1.com/
expectedError: "spec.contentSecurityPolicy[0].values[0]: Invalid value: \"string\": CSP directive value cannot contain a whitespace"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test description says “tab” but the value uses spaces.
Either use an actual tab (escaped) or rename the test to “spaces” to avoid confusion.

🔧 Suggested fix (use a tab escape)
-    - name: Should throw an error for invalid CSP directive values with whitespace, using tab
+    - name: Should throw an error for invalid CSP directive values with whitespace, using tab
       initial: |
         apiVersion: console.openshift.io/v1
         kind: ConsolePlugin
         spec:
           displayName: foo
           backend:
             type: Service
           contentSecurityPolicy:
           - directive: ScriptSrc
             values:
-            - https://scri    pt1.com/
+            - "https://scri\tpt1.com/"
🤖 Prompt for AI Agents
In `@console/v1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml` around
lines 264 - 275, The test text and value are inconsistent: the test claims a
“tab” but the CSP value uses spaces; update the YAML so
spec.contentSecurityPolicy[0].values[0] contains an actual tab character (escape
it) in the URI (replace the series of spaces in the initial block value
"https://scri    pt1.com/" with a single \t where intended) or alternatively
rename the test description from “tab” to “spaces” so it accurately reflects the
current input; ensure you only modify the initial block value or the test name
and keep the expectedError unchanged.

@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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 Jan 30, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

@jhadvig: 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-aws-serial-2of2 262f93d link true /test e2e-aws-serial-2of2
ci/prow/e2e-gcp 262f93d link true /test e2e-gcp
ci/prow/e2e-aws-ovn-hypershift-conformance 262f93d link true /test e2e-aws-ovn-hypershift-conformance
ci/prow/e2e-aws-ovn 262f93d link true /test e2e-aws-ovn
ci/prow/e2e-aws-serial-techpreview-1of2 262f93d link true /test e2e-aws-serial-techpreview-1of2
ci/prow/e2e-upgrade 262f93d link true /test e2e-upgrade
ci/prow/e2e-aws-ovn-techpreview 262f93d link true /test e2e-aws-ovn-techpreview
ci/prow/e2e-aws-ovn-hypershift 262f93d link true /test e2e-aws-ovn-hypershift
ci/prow/minor-e2e-upgrade-minor 262f93d link true /test minor-e2e-upgrade-minor
ci/prow/e2e-aws-serial-techpreview-2of2 262f93d link true /test e2e-aws-serial-techpreview-2of2
ci/prow/e2e-upgrade-out-of-change 262f93d link true /test e2e-upgrade-out-of-change
ci/prow/e2e-aws-serial-1of2 262f93d link true /test e2e-aws-serial-1of2
ci/prow/e2e-azure 262f93d link true /test e2e-azure

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. Review effort 2/5 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants