fix: mitigate command injection issue

fix: mitigate command injection issue
This commit is contained in:
Mehmet Leblebici
2025-12-12 11:25:24 +01:00
committed by GitHub
parent 2d2b6c0aa4
commit fcc23666bd

View File

@@ -17,10 +17,12 @@ runs:
steps: steps:
- name: Rustfmt Job Summary - name: Rustfmt Job Summary
shell: bash shell: bash
env:
MANIFEST_PATH: ${{ inputs.manifest-path }}
run: | run: |
# Run cargo and store the original output # Run cargo and store the original output
CARGO_STATUS=0 CARGO_STATUS=0
CARGO_OUTPUT=$(cargo fmt --all --manifest-path=${{ inputs.manifest-path }} -- --color=always --check 2>/dev/null) || CARGO_STATUS=$? CARGO_OUTPUT=$(cargo fmt --all --manifest-path="$MANIFEST_PATH" -- --color=always --check 2>/dev/null) || CARGO_STATUS=$?
if [ ${CARGO_STATUS} -eq 0 ]; then if [ ${CARGO_STATUS} -eq 0 ]; then
cat <<MARKDOWN_INTRO >> $GITHUB_STEP_SUMMARY cat <<MARKDOWN_INTRO >> $GITHUB_STEP_SUMMARY