-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Archive pdf #82757
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
Archive pdf #82757
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,5 +44,10 @@ rc=$? | |
| if [[ $TELEMETRY_EVENTS_BACKUP == "True" ]]; then | ||
| cp /tmp/events.json ${ARTIFACT_DIR}/events.json | ||
| fi | ||
|
|
||
|
|
||
| if [[ -f /tmp/report.out.pdf ]]; then | ||
| cp /tmp/report.out.pdf ${ARTIFACT_DIR}/kraken.report.pdf | ||
| fi | ||
|
Comment on lines
+49
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major Preserve report collection on runner failure.
🧰 Tools🪛 ast-grep (0.45.0)[warning] 49-49: Writing to or reading from a hardcoded, predictable path under /tmp is vulnerable to symlink and TOCTOU attacks: a local attacker can pre-create the file (or a symlink pointing elsewhere) and hijack or corrupt the contents. Generate a unique, unpredictable temporary file with mktemp instead, e.g. (predictable-tmp-file-bash) 🪛 Shellcheck (0.11.0)[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086) 📍 Affects 3 files
🤖 Prompt for AI Agents |
||
| echo "Finished running memory hog scenario" | ||
| echo "Return code: $rc" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve the runner status while collecting the PDF.
All twelve wrappers can skip PDF collection when the chaos runner fails because
errexitterminates the script first.kubevirt-outagealso overwrites its captured failure status.ci-operator/step-registry/redhat-chaos/application-outages/console/redhat-chaos-application-outages-console-commands.sh#L53-L55: capture the runner status with|| rc=$?, collect artifacts, then exit withrc.ci-operator/step-registry/redhat-chaos/container-scenarios/etcd-hangup/redhat-chaos-container-scenarios-etcd-hangup-commands.sh#L49-L51: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/hog-scenarios/io/redhat-chaos-hog-scenarios-io-commands.sh#L50-L52: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/kubevirt-outage/redhat-chaos-kubevirt-outage-commands.sh#L78-L80: remove the laterrc=$?that resets the failure status.ci-operator/step-registry/redhat-chaos/network-chaos/redhat-chaos-network-chaos-commands.sh#L49-L51: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/node-disruptions/master-outage/redhat-chaos-node-disruptions-master-outage-commands.sh#L113-L115: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/pod-scenarios/etcd-disruption/redhat-chaos-pod-scenarios-etcd-disruption-commands.sh#L74-L76: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/power-outage/redhat-chaos-power-outage-commands.sh#L94-L96: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/service-disruption/redhat-chaos-service-disruption-commands.sh#L48-L50: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/syn-flood/redhat-chaos-syn-flood-commands.sh#L48-L50: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/time-scenarios/redhat-chaos-time-scenarios-commands.sh#L51-L53: capture the runner status before artifact collection.ci-operator/step-registry/redhat-chaos/zone-outage/redhat-chaos-zone-outage-commands.sh#L82-L84: capture the runner status before artifact collection.🧰 Tools
🪛 ast-grep (0.45.0)
[warning] 53-53: Writing to or reading from a hardcoded, predictable path under /tmp is vulnerable to symlink and TOCTOU attacks: a local attacker can pre-create the file (or a symlink pointing elsewhere) and hijack or corrupt the contents. Generate a unique, unpredictable temporary file with mktemp instead, e.g.
tmpfile="$(mktemp)"(ormktemp -dfor directories) and reference "$tmpfile".Context: /tmp/report.out.pdf
Note: [CWE-377] Insecure Temporary File.
(predictable-tmp-file-bash)
🪛 Shellcheck (0.11.0)
[info] 54-54: Double quote to prevent globbing and word splitting.
(SC2086)
📍 Affects 12 files
ci-operator/step-registry/redhat-chaos/application-outages/console/redhat-chaos-application-outages-console-commands.sh#L53-L55(this comment)ci-operator/step-registry/redhat-chaos/container-scenarios/etcd-hangup/redhat-chaos-container-scenarios-etcd-hangup-commands.sh#L49-L51ci-operator/step-registry/redhat-chaos/hog-scenarios/io/redhat-chaos-hog-scenarios-io-commands.sh#L50-L52ci-operator/step-registry/redhat-chaos/kubevirt-outage/redhat-chaos-kubevirt-outage-commands.sh#L78-L80ci-operator/step-registry/redhat-chaos/network-chaos/redhat-chaos-network-chaos-commands.sh#L49-L51ci-operator/step-registry/redhat-chaos/node-disruptions/master-outage/redhat-chaos-node-disruptions-master-outage-commands.sh#L113-L115ci-operator/step-registry/redhat-chaos/pod-scenarios/etcd-disruption/redhat-chaos-pod-scenarios-etcd-disruption-commands.sh#L74-L76ci-operator/step-registry/redhat-chaos/power-outage/redhat-chaos-power-outage-commands.sh#L94-L96ci-operator/step-registry/redhat-chaos/service-disruption/redhat-chaos-service-disruption-commands.sh#L48-L50ci-operator/step-registry/redhat-chaos/syn-flood/redhat-chaos-syn-flood-commands.sh#L48-L50ci-operator/step-registry/redhat-chaos/time-scenarios/redhat-chaos-time-scenarios-commands.sh#L51-L53ci-operator/step-registry/redhat-chaos/zone-outage/redhat-chaos-zone-outage-commands.sh#L82-L84🤖 Prompt for AI Agents