summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorCarlos Sampaio Ribeiro <otakurack@gmail.com>2026-07-19 05:18:59 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-31 14:19:36 +0200
commitc16ce856e422e73a54c41131e0332de1afe09b8b (patch)
treece990849a567631b65dbda6ba225be7119c6baa6 /tools/perf/scripts/python
parentd07b6f53f0908e3014d9db901ef9ebcfc3d40743 (diff)
scripts/sbom: catch ValueError from malformed shell quoting
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. The issue was found while reviewing the exception handling around the saved-command parser after running its existing tests. It can be reproduced with: parse_inputs_from_commands('gcc "unterminated', fail_on_unknown_build_command=False) 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 malformed shell quoting and a missing positional argument. Signed-off-by: Carlos Sampaio Ribeiro <otakurack@gmail.com> Link: https://patch.msgid.link/20260719081859.1001-1-otakurack@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions