Fix Sashiko Issues#127
Merged
augelu-tng merged 22 commits intomainfrom May 6, 2026
Merged
Conversation
Signed-off-by: Luis <luis.augenstein@tngtech.com>
…ly are not used within the kernel. Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
…aths Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
25ac27f to
ccb005c
Compare
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
Signed-off-by: Luis <luis.augenstein@tngtech.com>
ccb005c to
26eaf3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses issues highlighted by the AI review in
https://sashiko.dev/#/patchset/20260410212255.9883-1-luis.augenstein@tngtech.com
Most changes are Robustness related, i.e., things that didn't cause any failure so far but could so in the future when assumptions change, new functionality is added, or uncommon user inputs are encountered.
Additionally, Sashiko found 3 actual Bugs that caused wrong SBOM outputs.
Patch 3 -
scripts/sbom: setup sbom loggingPatch 4 —
scripts/sbom: add command parsersbin2ccommands into an output file (< input > output).printf '<some_path>/%s ' | xargs arcommands where trailingscharacters of<some_path>would have been removed. Replace incorrect usage ofrstripwithremovesuffix.IndexErrorin command parsers in case command invocation assumptions don't hold.awkcommands when an inline program argument (e.g.'{print $1}') is used.Patch 5 —
scripts/sbom: add cmd graph generation('filename.txt',)instead of the bare filename string..cmdfile parsing and provide clear error messages where previously a genericIndexErrorwas raised when cmd file structure assumptions didn't hold.os.path.realpathis still only used when strictly necessary due to its significant performance impact.VALID_PATH_PATTERNregex to also accept characters such as+,~,=, and@that can appear in legitimate kernel build paths.Patch 6 —
scripts/sbom: add additional dependency sources for cmd graphlistconstructor indataclass default_factoryinstead of a generic type alias.Patch 7 —
scripts/sbom: add SPDX classesto_dictfield filter use explicitis None/ empty-list checks instead of plain truthiness tests, so that legitimate falsy values such as0orFalseare not silently omitted from the serialized SPDX output.JsonLdDocumentby not clearingnamespaceMapon the original element, preventing data loss if the graph is reused after serialization.Patch 9 —
scripts/sbom: add shared SPDX elements--roots-filethat rejects an empty file early.datetimewhen recording the SBOM creation timestamp. Previously the local system timezone was used.Patch 10 —
scripts/sbom: collect file metadataos.path.exists()withos.path.isfile()before computing file hashes, so that directory nodes appearing in.cmddependency lists are skipped rather than triggering anIsADirectoryError.vmlinuxorbzImage.SPDX-License-Identifierregex to also handle XML comment terminators (-->) in captured license expressions.Patch 13 —
scripts/sbom: add SPDX build graphcontainsrelationship.Patch 14 —
scripts/sbom: add unit tests for command parsersos.environassignments in unit tests withunittest.mock.patch.dictso that environment variable changes are automatically restored after each test, eliminating cross-test pollution.Successful Workflow Run https://github.com/TNG/KernelSbom/actions/runs/25318807807