Re: [PATCH] scripts/sbom: catch ValueError from malformed shell quoting

From: Greg KH

Date: Sun Jul 19 2026 - 01:24:16 EST


On Sat, Jul 18, 2026 at 03:44:57PM -0300, kadu04t wrote:
> parse_inputs_from_commands() only caught CmdParsingError and IndexError
> when dispatching to command parsers, but several parsers call
> shlex.split() internally, which raises ValueError on malformed shell
> quoting (e.g. an unterminated quote). This exception was not caught,
> so a single malformed build command would abort SBOM generation
> entirely, even with fail_on_unknown_build_command=False, defeating the
> purpose of tolerant mode.
>
> Catch ValueError alongside CmdParsingError and IndexError so such
> commands are logged as a warning/error and skipped instead of aborting
> the whole run.
>
> Add tests covering a malformed quoting command and a command missing a
> required positional argument.
>
> Signed-off-by: kadu04t <otakurack@xxxxxxxxx>

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file,
Documentation/process/submitting-patches.rst for how to do this
correctly.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot