OTA-2108: restrict console plugin NetworkPolicy to openshift-console namespace - #1450
Conversation
…nsole namespace The allow-console-ingress NetworkPolicy opened port 9001 to any pod in the cluster. Restrict ingress to the openshift-console namespace using a namespaceSelector, matching the annotation's stated intent and enforcing least-privilege networking. Fixes OTA-2108 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@jrangelramos: This pull request references OTA-2108 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. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe NetworkPolicy now allows ingress only from the ChangesNetworkPolicy ingress restriction
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change restricts console plugin network access to the openshift-console namespace. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jrangelramos 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 |
|
@jrangelramos: 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. |
Summary
allow-console-ingressNetworkPolicy opened port 9001/TCP to any pod in the cluster,despite the annotation stating it allows ingress "from the console" only.
from: namespaceSelectormatchingkubernetes.io/metadata.name: openshift-consoleto enforce least-privilege networking and align the policy with its stated intent.
Fixes https://redhat.atlassian.net/browse/OTA-2108
Test plan
gotestsum --packages="./pkg/agenticrun/..."— 49 tests)🤖 Generated with Claude Code
Summary by CodeRabbit