File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,11 @@ jobs:
228228 # If detection was skipped, use all languages or the provided language-matrix
229229 if [ "${{ needs.pre-check.outputs.skip_detection }}" = "true" ]; then
230230 if [ "${{ github.event_name }}" = "workflow_call" ] && [ -n "${{ inputs.language-matrix }}" ]; then
231+ # Validate that language-matrix is valid JSON
232+ if ! echo '${{ inputs.language-matrix }}' | python3 -c "import sys, json; json.load(sys.stdin)" 2>/dev/null; then
233+ echo "::error::Invalid language-matrix input: must be valid JSON array"
234+ exit 1
235+ fi
231236 echo "languages=${{ inputs.language-matrix }}" >> "$GITHUB_OUTPUT"
232237 else
233238 echo 'languages=["cpp", "python", "actions"]' >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments