Skip to content

[18.0-fr6] Fix shell injection in trust_flush CronJob - #728

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18.0-fr6from
stuggi:fix_cron_arg_fr6
Jul 14, 2026
Merged

[18.0-fr6] Fix shell injection in trust_flush CronJob#728
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18.0-fr6from
stuggi:fix_cron_arg_fr6

Conversation

@stuggi

@stuggi stuggi commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Replace the bash -c string concatenation of TrustFlushArgs with a direct argv array, preventing shell metacharacter injection. The CronJob now executes keystone-manage as Command: ["keystone-manage", "trust_flush", ...args] instead of Command: ["/bin/bash"] Args: ["-c", "keystone-manage trust_flush" + args].

Jira: OSPRH-32064

Replace the bash -c string concatenation of TrustFlushArgs with a
direct argv array, preventing shell metacharacter injection. The
CronJob now executes keystone-manage as Command: ["keystone-manage",
"trust_flush", ...args] instead of Command: ["/bin/bash"] Args:
["-c", "keystone-manage trust_flush" + args].

Jira: OSPRH-32064

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@openshift-ci
openshift-ci Bot requested review from abays and afaranha July 14, 2026 15:19
@stuggi
stuggi requested review from Deydra71 and removed request for abays and afaranha July 14, 2026 15:19
@stuggi
stuggi requested a review from abays July 14, 2026 15:31
@Deydra71

Copy link
Copy Markdown
Contributor

@stuggi a question - I assume we are not adding the kubebuilder pattern validation like in the original PR on purpose because of CR compatibility?

@stuggi

stuggi commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@stuggi a question - I assume we are not adding the kubebuilder pattern validation like in the original PR on purpose because of CR compatibility?

yes, the CRD changes are not a must for the fix and to not introduce it in the maintenance release I removed them

@Deydra71 Deydra71 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Deydra71, stuggi

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-merge-bot
openshift-merge-bot Bot merged commit 17efb11 into openstack-k8s-operators:18.0-fr6 Jul 14, 2026
7 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.

2 participants