Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing CLI command injection in a debug mode #194

Merged

Conversation

jpodivin
Copy link
Contributor

@jpodivin jpodivin commented Jul 24, 2023

Also sets up a log message announcing that the operator is running in a debug mode and expands the test coverage.

I did forget about an edge case that may cause problems down the line. I haven't seen any yet, but I would rather err on the side of caution here.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 24, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jpodivin jpodivin changed the title Preventing CLI command injection in a debug mode [DNM] Preventing CLI command injection in a debug mode Jul 24, 2023
@jpodivin jpodivin marked this pull request as ready for review July 24, 2023 09:44
@openshift-ci openshift-ci bot requested review from jlarriba and rabi July 24, 2023 09:44
@jpodivin
Copy link
Contributor Author

recheck

@jpodivin
Copy link
Contributor Author

/retest

log message announcing that the operator is running
in a debug mode.

Kuttl tests were expanded to cover the new edge case and original
test cases were adjusted to unify their structure.

Signed-off-by: Jiri Podivin <[email protected]>
@jpodivin jpodivin changed the title [DNM] Preventing CLI command injection in a debug mode Preventing CLI command injection in a debug mode Jul 28, 2023
@@ -299,6 +299,7 @@ func (r *OpenStackAnsibleEEReconciler) jobForOpenStackAnsibleEE(
// Override args list if we are in a debug mode
if instance.Spec.Debug {
args = []string{"sleep", "1d"}
r.Log.Info(fmt.Sprintf("Instance %s will be running in debug mode.", instance.Name))
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fao89, jpodivin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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-robot openshift-merge-robot merged commit a1bb25e into openstack-k8s-operators:main Jul 31, 2023
2 checks passed
danpawlik pushed a commit to danpawlik/openstack-ansibleee-operator that referenced this pull request Oct 12, 2023
…rators/fix_edpm

Use Local storage in EDPM CI
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.

3 participants