Skip to content

Add input/output sanitization and security improvements - #24

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
umago:input-output-sanitization
Jul 21, 2026
Merged

Add input/output sanitization and security improvements#24
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
umago:input-output-sanitization

Conversation

@umago

@umago umago commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator
  • Change operator logger from development to production mode to avoid leaking heavy stack traces that can contain internal information on warning+ log levels. Development logs can still be enabled using the --zap-devel argument [0].

  • Add RunAsNonRoot and drop all Linux capabilities on the Postgres container.

  • Add kubebuilder validation constraints:

    • URL pattern on LLMEndpoint
    • Format pattern on OGXLogLevel
    • minimum=1 on MaxTokensForResponse
  • Add HTTP security headers to the console plugin nginx config (X-Frame-Options, X-Content-Type-Options, Referrer-Policy)

[0] https://sdk.operatorframework.io/docs/building-operators/golang/references/logging/#setting-flags-when-running-locally

* Change operator logger from development to production mode to avoid
  leaking heavy stack traces that can contain internal information on
  warning+ log levels. Development logs can still be enabled using the
  --zap-devel argument.

* Add RunAsNonRoot and drop all Linux capabilities on the Postgres
  container.

* Add kubebuilder validation constraints:
  - URL pattern on LLMEndpoint
  - Format pattern on OGXLogLevel
  - minimum=1 on MaxTokensForResponse

* Add HTTP security headers to the console plugin nginx config
  (X-Frame-Options, X-Content-Type-Options, Referrer-Policy)

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
@openshift-ci
openshift-ci Bot requested review from Akrog and lpiwowar July 17, 2026 10:39
@umago

umago commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

Unrelated error: "failed to wait for the created cluster claim to become ready: timed out waiting for the condition"

@umago

umago commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@umago

umago commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

failed to wait for the created cluster claim to become ready: timed out waiting for the condition

@umago

umago commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@lpiwowar

Copy link
Copy Markdown
Collaborator

/retest

could not run steps: step openstack-lightspeed-kuttl-4-18 failed: failed to wait for the created cluster claim to become ready: timed out waiting for the condition 

This looks painful. We should figure out whether we can do something about it. I'm thinking we might be maybe requesting too much resources (?) idk.

@umago

umago commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

@lpiwowar yeah I think it's broken somehow, super painful. I just ran the kuttl tests again locally and everything is good. Yeah I will take a look at other projects and see if it's failing too, but as u said, maybe it's the amount of resource ? Idk

=== NAME  kuttl
    harness.go:403: run tests finished
    harness.go:510: cleaning up
    harness.go:567: removing temp folder: ""
--- PASS: kuttl (1209.42s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/basic-openstack-lightspeed-configuration (844.44s)
        --- PASS: kuttl/harness/update-openstacklightspeed (266.54s)
        --- PASS: kuttl/harness/persistent-database (98.41s)
PASS

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

LGTM 👍 , let's see whether the jobs pass.

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lpiwowar, umago

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 commented Jul 21, 2026

Copy link
Copy Markdown

@umago: The following test 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/openstack-lightspeed-kuttl-4-18 16c0ec1 link true /test openstack-lightspeed-kuttl-4-18

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.

@umago

umago commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-merge-bot
openshift-merge-bot Bot merged commit f3816ec into openstack-k8s-operators:main Jul 21, 2026
9 checks passed
@umago
umago deleted the input-output-sanitization branch July 21, 2026 12:12
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.

2 participants