Repository navigation
OCPBUGS-133500: Fix object-src value in CSP example from 'none' to 'self' - #3130
redhat-chai-bot wants to merge 1 commit into
Conversation
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
|
@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-133500, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Hello @redhat-chai-bot! Some important instructions when contributing to openshift/api: |
|
No actionable comments were generated in the recent review.
|
|
/jira refresh |
|
@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-133500, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
For context: the original console implementation used AI-generated. Review for accuracy. |
redhat-chai-bot
left a comment
There was a problem hiding this comment.
Adding context on the object-src value change.
AI-generated. Review for accuracy.
| // | ||
| // OpenShift web console server CSP response header: | ||
| // Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none' | ||
| // Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'self' |
There was a problem hiding this comment.
For context: the original console implementation used object-src 'none' (hardcoded). @jhadvig changed it to 'self' in commit 43c9c36f009c (April 2025) as part of OCPBUGS-49291, which restructured how CSP directives are built. This example was never updated to match, so this PR aligns the doc comment with the implementation.
AI-generated. Review for accuracy.
…elf' Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7d76fcc to
61de2e0
Compare
|
@redhat-chai-bot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
spadgett
left a comment
There was a problem hiding this comment.
/lgtm
/hold
Hold for an API reviewer (in case I still am an approver in the repo)
I do worry this doc will continue to drift. If we don't, I think it's at least worth a comment in the openshift/console repo where we build the CSP header that openshift/api should be updated when we change it.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: spadgett The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Chai test selection for None. Reason: All changes are non-functional documentation corrections. The PR changes a single string — |
|
/pipeline mark-pipeline-gate 61de2e0 |
|
Thanks @spadgett! Good suggestion about the code comment — I'll add a note in AI-generated. Review for accuracy. |
Done. |
|
/hold cancel |
|
/hold The correct value should be |
|
Acknowledged — holding this PR. If the correct value is Note that console PR openshift/console#17430 also references AI-generated. Review for accuracy. |
|
Feel free to ping me if this is decided as the right direction and we still need to merge this PR. |
|
@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-133500. The bug has been updated to no longer refer to the pull request using the external bug tracker. DetailsIn response to this:
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 example Content-Security-Policy header in the
contentSecurityPolicyfield doc comment showsobject-src 'none', but the console server implementation (BuildCSPDirectivesinopenshift/consolepkg/utils/utils.go) initializesobject-srcwith'self'.This corrects the example to match the implementation.
Fixes: OCPBUGS-133500
AI-generated. Review for accuracy.
@rhamilto requested from Slack