You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Spdx30ComponentDetector (SPDX30SBOM) as a default-off detector for SPDX 3.0.0 and 3.0.1 compact JSON-LD documents.
Discover only *.spdx.json files and register each document as one existing SpdxComponent, rather than importing its packages or dependency relationships.
Resolve embedded or referenced creation information and creator tool/organization nodes.
Record the document IRI, name, first root element, file path, and lowercase SHA1 checksum. Use the document IRI when the name or root element is absent, and warn when selecting among multiple roots.
Reject unsupported versions, ambiguous documents, and duplicate element identifiers.
Register the detector in DI and add focused unit tests plus a local verification fixture. Leave the existing SPDX 2.2 detector unchanged.
Combined scans containing both SPDX 2.2 and 3.0 documents also found both document components. Default-off behavior and exclusion of alternate filename suffixes were checked locally.
The full solution test suite and snapshot verification suite were not run. The fixture is included in this repository; a separate verification-repository PR has not been created. No README feature-table changes are included.
New Detector Checklist
I have gone through the docs for creating a new detector here
My new detector implements IDefaultOffComponentDetector
I have created a PR to the verification repo with components that my new detector can find
(If necessary) I have updated the Feature Overview table in the README
Detect SPDX 3.0.0 and 3.0.1 compact JSON-LD documents as SBOM references, including root elements and creator metadata. Register the detector and add focused tests and a verification fixture.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 74ac0491-574a-40fc-bf08-180aea181b07
Update detector tests and rename the verification fixture to match the sole supported search pattern.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 74ac0491-574a-40fc-bf08-180aea181b07
Rename the detector, its ID, tests, and verification fixture to reserve distinct identities for future SPDX minor versions. Continue accepting SPDX 3.0.0 and 3.0.1 only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 74ac0491-574a-40fc-bf08-180aea181b07
Extract shared SPDX metadata, SHA1 hashing, JSON loading, and component registration into SpdxComponentDetector. Keep format-specific parsing and exception handling in the concrete detectors, with regression coverage for their differing error policies.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 74ac0491-574a-40fc-bf08-180aea181b07
This guard skips compact SPDX documents that put SpdxDocument directly at the JSON root. The SPDX project's 3.0.0 example uses this form with embedded creationInfo and no @graph. It therefore produces no component here even though the remaining parsing logic supports its fields and version. Normalize a standalone document into a one-element sequence while retaining graph support, and add a regression test for this form.
Preserve stable 3.0.x matching, including multi-digit patches, while rejecting leading zeros and non-ASCII digits.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3e4f54f6-111a-4ceb-85fb-5b08c49779af
👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:
The detector detects more or fewer components than before
The detector generates different parent/child graph relationships than before
The detector generates different devDependencies values than before
If none of the above scenarios apply, feel free to ignore this comment 🙂
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
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.
Add
Spdx30ComponentDetector(SPDX30SBOM) as a default-off detector for SPDX 3.0.0 and 3.0.1 compact JSON-LD documents.*.spdx.jsonfiles and register each document as one existingSpdxComponent, rather than importing its packages or dependency relationships.Enable alongside SPDX 2.2 with:
Validation
dotnet build test\Microsoft.ComponentDetection.Detectors.Tests\Microsoft.ComponentDetection.Detectors.Tests.csproj --no-restore --verbosity quiet— passed, zero warnings or errors.dotnet run --project test\Microsoft.ComponentDetection.Detectors.Tests\Microsoft.ComponentDetection.Detectors.Tests.csproj --no-build -- --filter "FullyQualifiedName~Spdx"— passed, all 36 SPDX tests.dotnet build src\Microsoft.ComponentDetection\Microsoft.ComponentDetection.csproj --no-restore --verbosity quiet— passed, zero warnings or errors.SPDX30SBOMdocument component with both detectors enabled:Combined scans containing both SPDX 2.2 and 3.0 documents also found both document components. Default-off behavior and exclusion of alternate filename suffixes were checked locally.
The full solution test suite and snapshot verification suite were not run. The fixture is included in this repository; a separate verification-repository PR has not been created. No README feature-table changes are included.
New Detector Checklist
IDefaultOffComponentDetector