Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

security: prevent script injection in fuzz workflow (SonarCloud S7630)

Dylan M. Taylor59337939820e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba8243353..238029a86 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -427,7 +427,9 @@ jobs:
run: cargo install cargo-fuzz --locked
- name: Fuzz
working-directory: crates/${{ matrix.target.crate }}
- run: cargo fuzz run ${{ matrix.target.name }} ${{ matrix.target.args }} -- -max_total_time=${{ inputs.fuzz_seconds }}
+ env:
+ FUZZ_SECONDS: ${{ inputs.fuzz_seconds }}
+ run: cargo fuzz run ${{ matrix.target.name }} ${{ matrix.target.args }} -- -max_total_time="$FUZZ_SECONDS"
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v4