Skip to content

Commit cda251b

Browse files
authored
fix fuzz_report script (#7141)
Use the fuzz_target instead of the fuzz_name for the templated commands in the the fuzzer issues. Before it would use the name as the target, e.g. array_ops_unstable_encodings which when you copy-paste would fail due to no such fuzzer target. <!-- Thank you for submitting a pull request! We appreciate your time and effort. Please make sure to provide enough information so that we can review your pull request. The Summary and Testing sections below contain guidance on what to include. --> ## Summary <!-- If this PR is related to a tracked effort, please link to the relevant issue here (e.g., `Closes: #123`). Otherwise, feel free to ignore / delete this. In this section, please: 1. Explain the rationale for this change. 2. Summarize the changes included in this PR. A general rule of thumb is that larger PRs should have larger summaries. If there are a lot of changes, please help us review the code by explaining what was changed and why. If there is an issue or discussion attached, there is no need to duplicate all the details, but clarity is always preferred over brevity. --> Closes: #000 <!-- ## API Changes Uncomment this section if there are any user-facing changes. Consider whether the change affects users in one of the following ways: 1. Breaks public APIs in some way. 2. Changes the underlying behavior of one of the engine integrations. 3. Should some documentation be updated to reflect this change? If a public API is changed in a breaking manner, make sure to add the appropriate label. You can run `./scripts/public-api.sh` locally to see if there are any public API changes (and this also runs in our CI). --> ## Testing <!-- Please describe how this change was tested. Here are some common categories for testing in Vortex: 1. Verifying existing behavior is maintained. 2. Verifying new behavior and functionality works correctly. 3. Serialization compatibility (backwards and forwards) should be maintained or explicitly broken. --> Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 04776cc commit cda251b

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/scripts/fuzz_report/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,9 @@ def cmd_report(args: argparse.Namespace) -> int:
363363
print(f"Commented on #{existing_issue}", file=sys.stderr)
364364
_write_github_output("issue_number", str(existing_issue))
365365
else:
366-
fuzz_target = variables.get("FUZZ_TARGET", "unknown")
367-
title = f"Fuzzing Crash: {crash_info.error_variant} in {fuzz_target}"
366+
# Use FUZZ_NAME for the title (descriptive name), fall back to FUZZ_TARGET
367+
fuzz_name = variables.get("FUZZ_NAME") or variables.get("FUZZ_TARGET", "unknown")
368+
title = f"Fuzzing Crash: {crash_info.error_variant} in {fuzz_name}"
368369

369370
body = render_template(str(TEMPLATES_DIR / "new_issue.md"), variables, use_env=False)
370371
body_file = Path("issue_body.md")

.github/workflows/fuzz.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ jobs:
125125
pull-requests: read
126126
uses: ./.github/workflows/report-fuzz-crash.yml
127127
with:
128-
fuzz_target: array_ops_unstable_encodings
128+
fuzz_target: array_ops
129+
fuzz_name: array_ops_unstable_encodings
129130
crash_file: ${{ needs.ops_fuzz_unstable.outputs.first_crash_name }}
130131
artifact_url: ${{ needs.ops_fuzz_unstable.outputs.artifact_url }}
131132
artifact_name: array_ops_unstable_encodings-crash-artifacts

.github/workflows/report-fuzz-crash.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
fuzz_target:
77
required: true
88
type: string
9+
fuzz_name:
10+
required: false
11+
type: string
912
crash_file:
1013
required: true
1114
type: string
@@ -148,6 +151,7 @@ jobs:
148151
--dedup-result dedup_result.json \
149152
--claude-analysis claude_analysis.txt \
150153
-v "FUZZ_TARGET=${{ inputs.fuzz_target }}" \
154+
-v "FUZZ_NAME=${{ inputs.fuzz_name || inputs.fuzz_target }}" \
151155
-v "CRASH_FILE=${{ inputs.crash_file }}" \
152156
-v "BRANCH=${{ inputs.branch }}" \
153157
-v "COMMIT=${{ inputs.commit }}" \

0 commit comments

Comments
 (0)