Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Quote the pattern and avoid plain
xargs.Bash expands
*.ko*beforefindreceives it. If the working directory contains a matching filename,findcan receive the filename instead of the pattern. This can omit compressed modules or fail the command. Becausescripts/package-build/linux-kernel/build.py:212-216runs this script withcheck=True, the firmware build can abort.Quote the path and pattern. Use
-exec modinfo {} +or-print0 | xargs -0for filename-safe processing.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 23-23: Use 'find .. -print0 | xargs -0 ..' or 'find .. -exec .. +' to allow non-alphanumeric filenames.
(SC2038)
[info] 23-23: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 23-23: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 23-23: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 23-23: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 23-23: Double quote to prevent globbing and word splitting.
(SC2086)
[warning] 23-23: Quote the parameter to -name so the shell won't interpret it.
(SC2061)
[info] 23-23: Use ./glob or -- glob so names with dashes won't become options.
(SC2035)
🤖 Prompt for AI Agents
Source: Linters/SAST tools