-
Notifications
You must be signed in to change notification settings - Fork 0
Fix CodeQL SARIF upload error: "1 item required; only 0 were supplied" #1
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
base: main
Are you sure you want to change the base?
Conversation
Kusari Analysis Results:
Combined security analysis shows minimal risk. Dependency analysis found no pinned version changes, code issues, or exposed secrets. Code analysis identified only one informational-level template injection flag with low confidence, which was determined to be a false positive as it uses internal step outputs rather than user-controllable input. No secrets, code vulnerabilities, or high/medium severity issues were detected across both analyses. The cumulative risk profile remains low with no critical security concerns that would warrant blocking the PR. Note View full detailed analysis result for more information on the output and the checks that were run.
Found this helpful? Give it a 👍 or 👎 reaction! |
Co-authored-by: eddie-knight <[email protected]>
Co-authored-by: eddie-knight <[email protected]>
Kusari PR Analysis rerun based on - f471bc1 performed at: 2025-09-27T21:44:08Z - link to updated analysis |
Kusari PR Analysis rerun based on - f471bc1 performed at: 2025-09-27T21:44:09Z - link to updated analysis |
Kusari PR Analysis rerun based on - 940cccf performed at: 2025-09-27T21:44:31Z - link to updated analysis |
Kusari PR Analysis rerun based on - 940cccf performed at: 2025-09-27T21:44:32Z - link to updated analysis |
Co-authored-by: eddie-knight <[email protected]>
Kusari PR Analysis rerun based on - 03db63d performed at: 2025-09-27T21:46:01Z - link to updated analysis |
Kusari PR Analysis rerun based on - 03db63d performed at: 2025-09-27T21:46:11Z - link to updated analysis |
Problem
The GitHub Actions workflow was failing with the error
Invalid request. 1 item required; only 0 were supplied.
when uploading SARIF files to CodeQL usinggithub/codeql-action/upload-sarif@v3
. Despite the SARIF file being generated successfully (23KB) and passing local validation, the upload step consistently failed.Root Cause
The error occurs when the SARIF file contains an empty
runs
array. While this passes the basic SARIF schema validation, GitHub's CodeQL API requires at least one run entry to process the upload successfully.Solution
Added a SARIF validation and fixing script that runs before the CodeQL upload step:
Example Fix
Before (causes error):
After (uploads successfully):
Changes
.github/workflows/action-test.yml
- Added validation step before SARIF uploadvalidate-sarif.sh
- New validation and fixing script with comprehensive error handlingREADME.md
- Documentation explaining the fix and usage.gitignore
- Excludes temporary files created during validationTesting
The solution has been tested with multiple SARIF file scenarios:
This fix requires no changes to the upstream
revanite-io/pvtr-runner
action and maintains full backward compatibility while resolving the CodeQL upload error.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
productionresultssa3.blob.core.windows.net
curl -L REDACTED -o evaluation_results.zip
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.