Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
1c6f1f7
ISBOMReaderForExternalDocumentReference => ISBOMReaderForExternalDocu…
DaveTryon Feb 22, 2025
cb0de1a
ISBOMReaderForExternalDocumentReference_ => ISbomReaderForExternalDoc…
DaveTryon Feb 22, 2025
0d11372
IValidatedSBOM => IValidatedSBOM_
DaveTryon Feb 22, 2025
2b8e3cc
IValidatedSBOM_ => IValidatedSbom
DaveTryon Feb 22, 2025
ecf7b87
InternalSBOMFileInfoDeduplicator => InternalSBOMFileInfoDeduplicator_
DaveTryon Feb 22, 2025
0691e0b
InternalSBOMFileInfoDeduplicator_ => InternalSbomFileInfoDeduplicator
DaveTryon Feb 22, 2025
de8f674
ISBOMGenerator => ISBOMGenerator_
DaveTryon Feb 22, 2025
15327d8
ISBOMGenerator_ => ISbomGenerator
DaveTryon Feb 22, 2025
b9b8268
ISBOMValidator => ISBOMValidator_
DaveTryon Feb 22, 2025
72b7bd2
ISBOMValidator_ => ISbomValidator
DaveTryon Feb 22, 2025
a941f8d
InternalSBOMFileInfo => InternalSBOMFileInfo_
DaveTryon Feb 22, 2025
9c0c205
ComponentDetectionToSBOMPackageAdapter => ComponentDetectionToSBOMPac…
DaveTryon Feb 22, 2025
b1d4218
ComponentDetectionToSBOMPackageAdapter => ComponentDetectionToSbomPac…
DaveTryon Feb 22, 2025
1a3eb7c
SBOMGenerator => SBOMGenerator_
DaveTryon Feb 22, 2025
32b263b
SBOMGenerator_ => SbomGenerator
DaveTryon Feb 22, 2025
4668890
SBOMValidator => SBOMValidator_
DaveTryon Feb 22, 2025
d606f46
SBOMValidator_ => SbomValidator
DaveTryon Feb 22, 2025
1745d8c
SBOMComponentsWalker => SBOMComponentsWalker_
DaveTryon Feb 22, 2025
dfd08b6
SBOMComponentsWalker_ => SbomComponentsWalker
DaveTryon Feb 22, 2025
0a49c7b
SBOMFileToFileInfoConverter => SBOMFileToFileInfoConverter_
DaveTryon Feb 22, 2025
e9deeb6
SBOMFileToFileInfoConverter_ => SbomFileToFileInfoConverter
DaveTryon Feb 22, 2025
fbb283e
ValidatedSBOM => ValidatedSBOM_
DaveTryon Feb 22, 2025
230dee6
ValidatedSBOM_ => ValidatedSbom
DaveTryon Feb 22, 2025
f478670
ValidatedSBOMFactory => ValidatedSBOMFactory_
DaveTryon Feb 22, 2025
03b33a3
ValidatedSBOMFactory_ => ValidatedSbomFactory
DaveTryon Feb 22, 2025
4150f93
SBOMConfig => SBOMConfig_
DaveTryon Feb 22, 2025
53ca669
SBOMConfig_ => SbomConfig
DaveTryon Feb 22, 2025
c89de83
SBOMApiMetadataProvider => SBOMApiMetadataProvider_
DaveTryon Feb 22, 2025
4600c34
SBOMApiMetadataProvider_ => SbomApiMetadataProvider
DaveTryon Feb 22, 2025
a3ac1cd
SBOMFile => SBOMFile_
DaveTryon Feb 22, 2025
dc7a86f
SBOMFile_ => SbomFile
DaveTryon Feb 22, 2025
f5a1fcd
SBOMTelemetry => SBOMTelemetry_
DaveTryon Feb 22, 2025
34f4aa3
SBOMTelemetry_ => SbomTelemetry
DaveTryon Feb 22, 2025
d4f14ed
SBOMFileBasedFileToJsonProvider => SBOMFileBasedFileToJsonProvider_
DaveTryon Feb 22, 2025
921ca40
SBOMFileBasedFileToJsonProvider_ => SbomFileBasedFileToJsonProvider
DaveTryon Feb 22, 2025
4899df1
SBOMPackagesProvider => SBOMPackagesProvider_
DaveTryon Feb 22, 2025
9b40fda
SBOMPackagesProvider_ => SbomPackagesProvider
DaveTryon Feb 22, 2025
f40d68c
SBOMPackageDetailsRecorder => SBOMPackageDetailsRecorder_
DaveTryon Feb 22, 2025
5aa8387
SBOMPackageDetailsRecorder_ => SbomPackageDetailsRecorder
DaveTryon Feb 22, 2025
01f4352
SBOMFormatExtensions => SBOMFormatExtensions_
DaveTryon Feb 22, 2025
c2b9335
SBOMFormatExtensions_ => SbomFormatExtensions
DaveTryon Feb 22, 2025
afe633e
SBOMGenerationWorkflow => SBOMGenerationWorkflow_
DaveTryon Feb 22, 2025
c146111
SBOMGenerationWorkflow_ => SbomGenerationWorkflow
DaveTryon Feb 22, 2025
112509d
SBOMParserBasedValidationWorkflow => SBOMParserBasedValidationWorkflow_
DaveTryon Feb 22, 2025
4c1d0e3
SBOMParserBasedValidationWorkflow_ => SbomParserBasedValidationWorkflow
DaveTryon Feb 22, 2025
f403a5e
SBOMRedactionWorkflow => SBOMRedactionWorkflow_
DaveTryon Feb 22, 2025
89e1205
SBOMRedactionWorkflow_ => SbomRedactionWorkflow
DaveTryon Feb 22, 2025
6acba33
SBOMFile => SBOMFile_
DaveTryon Feb 22, 2025
70000fe
SBOMFile_ => SbomFile
DaveTryon Feb 22, 2025
f0fb714
SBOMGenerationResult => SBOMGenerationResult_
DaveTryon Feb 22, 2025
12c893f
SBOMGenerationResult_ => SbomGenerationResult
DaveTryon Feb 22, 2025
d4f87dc
SBOMMetadata => SBOMMetadata_
DaveTryon Feb 22, 2025
99ceb8d
SBOMMetadata_ => SbomMetadata
DaveTryon Feb 22, 2025
2b34f9c
SBOMPackage => SBOMPackage_
DaveTryon Feb 22, 2025
682aca0
SBOMPackage_ => SbomPackage
DaveTryon Feb 22, 2025
59c3c65
SBOMReference => SBOMReference_
DaveTryon Feb 22, 2025
ef80e81
SBOMReference_ => SbomReference
DaveTryon Feb 22, 2025
672ee76
SBOMRelationship => SBOMRelationship_
DaveTryon Feb 22, 2025
86f5e6e
SBOMRelationship_ => SbomRelationship
DaveTryon Feb 22, 2025
0a221c8
SBOMSpecification => SBOMSpecification_
DaveTryon Feb 22, 2025
10dbd9c
SBOMSpecification_ => SbomSpecification
DaveTryon Feb 22, 2025
7275de0
SBOMValidationResult => SBOMValidationResult_
DaveTryon Feb 22, 2025
9faf65f
SBOMValidationResult_ => SbomValidationResult
DaveTryon Feb 22, 2025
42ac381
ComponentDetectionToSBOMPackageAdapterTests => ComponentDetectionToSB…
DaveTryon Feb 22, 2025
d8c8ffe
ComponentDetectionToSBOMPackageAdapterTests_ => ComponentDetectionToS…
DaveTryon Feb 22, 2025
cde9012
SBOMValidationResult => SBOMValidationResult_
DaveTryon Feb 22, 2025
381843a
SBOMValidationResult_ => SbomValidationResult
DaveTryon Feb 22, 2025
0227195
SBOMRelationship => SBOMRelationship_
DaveTryon Feb 22, 2025
4d0682e
SBOMRelationship_ => SbomRelationship
DaveTryon Feb 22, 2025
4128336
Docs: SbomSpecification
DaveTryon Feb 22, 2025
bdef15c
Docs: SbomMetadata
DaveTryon Feb 22, 2025
118a701
Docs: SbomGenerationResult
DaveTryon Feb 22, 2025
25cc5cd
Docs: SbomFile
DaveTryon Feb 22, 2025
2309bc5
Docs: SbomPackage
DaveTryon Feb 22, 2025
0e825c6
Docs: SbomValidator
DaveTryon Feb 22, 2025
c0b9a36
Docs: SbomMetadata that I missed
DaveTryon Feb 22, 2025
9bcc95e
GetSupportedSBOMSpecifications => GetSupportedSbomSpecifications
DaveTryon Feb 23, 2025
b1dd572
GenerateSBOMAsync => GenerateSbomAsync
DaveTryon Feb 23, 2025
4e68ed2
Fix comment
DaveTryon Feb 23, 2025
d1512f7
SettingSource.SBOMApi => SettingSource.SbomApi
DaveTryon Feb 23, 2025
3a0adb6
DefaultSBOMNamespaceBaseUri => DefaultSbomNamespaceBaseUri
DaveTryon Feb 23, 2025
767dcb0
SBOMToolVersion => SbomTooLVersion
DaveTryon Feb 23, 2025
1aa7101
MetadataKey.SBOM* => MeatadataKey.Sbom*
DaveTryon Feb 23, 2025
e70f893
ParseSBOMFile => ParseSbomFile
DaveTryon Feb 23, 2025
8da819d
SBOMFileHash => SbomFileHash
DaveTryon Feb 23, 2025
5650827
filesArraySupportingSBOMs => filesArraySupportingSboms
DaveTryon Feb 23, 2025
3a5aa5d
RecordSBOMFormat => RecordSbomFormat
DaveTryon Feb 24, 2025
5f49abe
GetSBOMNamespaceUri => GetSbomNamespaceUri
DaveTryon Feb 24, 2025
7c41b98
SBOMFormatsUsed => SbomFormatsUsed
DaveTryon Feb 24, 2025
011642a
SBOMGenerationWorkflow => SbomGenerationWorkflow
DaveTryon Feb 24, 2025
d889ec4
SBOMParseMetadata => SbomParseMetadata
DaveTryon Feb 24, 2025
7f2ecc5
SBOMValidationWorkflow => SbomValidationWorkflow
DaveTryon Feb 24, 2025
392067a
internalSBOMFileInfoDeduplicator => internalSbomFileInfoDeduplicator
DaveTryon Feb 24, 2025
80183cf
ToSBOMSpecification => ToSbomSpecification
DaveTryon Feb 24, 2025
52f450a
DefaultSBOMBaseNamespaceUri => DefaultSbomBaseNamespaceUri
DaveTryon Feb 24, 2025
42c2269
RedactSBOMAsync => RedactSbomAsync
DaveTryon Feb 24, 2025
eccb780
deleteSBOMDir => delete SbomDir
DaveTryon Feb 24, 2025
22499f5
InternalSBOMFileInfo => InternalSbomFileInfo (comments)
DaveTryon Feb 24, 2025
eb09f7d
ISBOMReaderForExternalDocumentReference => ISBOMReaderForExternalDocu…
DaveTryon Feb 22, 2025
089e8f5
ISBOMReaderForExternalDocumentReference_ => ISbomReaderForExternalDoc…
DaveTryon Feb 22, 2025
b4d74b1
IValidatedSBOM => IValidatedSBOM_
DaveTryon Feb 22, 2025
99094f5
IValidatedSBOM_ => IValidatedSbom
DaveTryon Feb 22, 2025
c348359
InternalSBOMFileInfoDeduplicator => InternalSBOMFileInfoDeduplicator_
DaveTryon Feb 22, 2025
2a0deeb
InternalSBOMFileInfoDeduplicator_ => InternalSbomFileInfoDeduplicator
DaveTryon Feb 22, 2025
703c0a4
ISBOMGenerator => ISBOMGenerator_
DaveTryon Feb 22, 2025
b65fee2
ISBOMGenerator_ => ISbomGenerator
DaveTryon Feb 22, 2025
c1c6a80
ISBOMValidator => ISBOMValidator_
DaveTryon Feb 22, 2025
c402944
ISBOMValidator_ => ISbomValidator
DaveTryon Feb 22, 2025
e08ff42
InternalSBOMFileInfo => InternalSBOMFileInfo_
DaveTryon Feb 22, 2025
394c5dd
ComponentDetectionToSBOMPackageAdapter => ComponentDetectionToSBOMPac…
DaveTryon Feb 22, 2025
8ccf4c0
ComponentDetectionToSBOMPackageAdapter => ComponentDetectionToSbomPac…
DaveTryon Feb 22, 2025
5ccc2fa
SBOMGenerator => SBOMGenerator_
DaveTryon Feb 22, 2025
fdcd176
SBOMGenerator_ => SbomGenerator
DaveTryon Feb 22, 2025
a062a71
SBOMValidator => SBOMValidator_
DaveTryon Feb 22, 2025
a11dae1
SBOMValidator_ => SbomValidator
DaveTryon Feb 22, 2025
08e9ad9
SBOMComponentsWalker => SBOMComponentsWalker_
DaveTryon Feb 22, 2025
21fa125
SBOMComponentsWalker_ => SbomComponentsWalker
DaveTryon Feb 22, 2025
cbe693b
SBOMFileToFileInfoConverter => SBOMFileToFileInfoConverter_
DaveTryon Feb 22, 2025
998411b
SBOMFileToFileInfoConverter_ => SbomFileToFileInfoConverter
DaveTryon Feb 22, 2025
895febd
ValidatedSBOM => ValidatedSBOM_
DaveTryon Feb 22, 2025
4fa90cd
ValidatedSBOM_ => ValidatedSbom
DaveTryon Feb 22, 2025
e503a99
ValidatedSBOMFactory => ValidatedSBOMFactory_
DaveTryon Feb 22, 2025
7ab0175
ValidatedSBOMFactory_ => ValidatedSbomFactory
DaveTryon Feb 22, 2025
1733c89
SBOMConfig => SBOMConfig_
DaveTryon Feb 22, 2025
ffbc446
SBOMConfig_ => SbomConfig
DaveTryon Feb 22, 2025
d17e005
SBOMApiMetadataProvider => SBOMApiMetadataProvider_
DaveTryon Feb 22, 2025
6a7cdfc
SBOMApiMetadataProvider_ => SbomApiMetadataProvider
DaveTryon Feb 22, 2025
0dda17d
SBOMFile => SBOMFile_
DaveTryon Feb 22, 2025
56b307c
SBOMFile_ => SbomFile
DaveTryon Feb 22, 2025
2692db2
SBOMTelemetry => SBOMTelemetry_
DaveTryon Feb 22, 2025
f484937
SBOMTelemetry_ => SbomTelemetry
DaveTryon Feb 22, 2025
ce74725
SBOMFileBasedFileToJsonProvider => SBOMFileBasedFileToJsonProvider_
DaveTryon Feb 22, 2025
ad99838
SBOMFileBasedFileToJsonProvider_ => SbomFileBasedFileToJsonProvider
DaveTryon Feb 22, 2025
ff9b0b6
SBOMPackagesProvider => SBOMPackagesProvider_
DaveTryon Feb 22, 2025
19454be
SBOMPackagesProvider_ => SbomPackagesProvider
DaveTryon Feb 22, 2025
514c788
SBOMPackageDetailsRecorder => SBOMPackageDetailsRecorder_
DaveTryon Feb 22, 2025
db64065
SBOMPackageDetailsRecorder_ => SbomPackageDetailsRecorder
DaveTryon Feb 22, 2025
62b191c
SBOMFormatExtensions => SBOMFormatExtensions_
DaveTryon Feb 22, 2025
0d42392
SBOMFormatExtensions_ => SbomFormatExtensions
DaveTryon Feb 22, 2025
6e2b39d
SBOMGenerationWorkflow => SBOMGenerationWorkflow_
DaveTryon Feb 22, 2025
03df1a0
SBOMGenerationWorkflow_ => SbomGenerationWorkflow
DaveTryon Feb 22, 2025
b9349de
SBOMParserBasedValidationWorkflow => SBOMParserBasedValidationWorkflow_
DaveTryon Feb 22, 2025
2a93d29
SBOMParserBasedValidationWorkflow_ => SbomParserBasedValidationWorkflow
DaveTryon Feb 22, 2025
82377a7
SBOMRedactionWorkflow => SBOMRedactionWorkflow_
DaveTryon Feb 22, 2025
ff63115
SBOMRedactionWorkflow_ => SbomRedactionWorkflow
DaveTryon Feb 22, 2025
08a4a8f
SBOMFile => SBOMFile_
DaveTryon Feb 22, 2025
af9b2b1
SBOMFile_ => SbomFile
DaveTryon Feb 22, 2025
516cd54
SBOMGenerationResult => SBOMGenerationResult_
DaveTryon Feb 22, 2025
cdde616
SBOMGenerationResult_ => SbomGenerationResult
DaveTryon Feb 22, 2025
9d740a2
SBOMMetadata => SBOMMetadata_
DaveTryon Feb 22, 2025
62c8660
SBOMMetadata_ => SbomMetadata
DaveTryon Feb 22, 2025
d6a08c7
SBOMPackage => SBOMPackage_
DaveTryon Feb 22, 2025
1dc0371
SBOMPackage_ => SbomPackage
DaveTryon Feb 22, 2025
caaa336
SBOMReference => SBOMReference_
DaveTryon Feb 22, 2025
47b4a63
SBOMReference_ => SbomReference
DaveTryon Feb 22, 2025
257d93f
SBOMRelationship => SBOMRelationship_
DaveTryon Feb 22, 2025
ba49f02
SBOMRelationship_ => SbomRelationship
DaveTryon Feb 22, 2025
8fa265b
SBOMSpecification => SBOMSpecification_
DaveTryon Feb 22, 2025
0ad2344
SBOMSpecification_ => SbomSpecification
DaveTryon Feb 22, 2025
854075e
SBOMValidationResult => SBOMValidationResult_
DaveTryon Feb 22, 2025
fe45045
SBOMValidationResult_ => SbomValidationResult
DaveTryon Feb 22, 2025
df1a4c0
ComponentDetectionToSBOMPackageAdapterTests => ComponentDetectionToSB…
DaveTryon Feb 22, 2025
b7dcc22
ComponentDetectionToSBOMPackageAdapterTests_ => ComponentDetectionToS…
DaveTryon Feb 22, 2025
b37954b
SBOMValidationResult => SBOMValidationResult_
DaveTryon Feb 22, 2025
58d6eb5
SBOMValidationResult_ => SbomValidationResult
DaveTryon Feb 22, 2025
2b31b4b
SBOMRelationship => SBOMRelationship_
DaveTryon Feb 22, 2025
d11e857
SBOMRelationship_ => SbomRelationship
DaveTryon Feb 22, 2025
266e218
Docs: SbomSpecification
DaveTryon Feb 22, 2025
774fc58
Docs: SbomMetadata
DaveTryon Feb 22, 2025
445ddff
Docs: SbomGenerationResult
DaveTryon Feb 22, 2025
d7d5840
Docs: SbomFile
DaveTryon Feb 22, 2025
b6b0146
Docs: SbomPackage
DaveTryon Feb 22, 2025
d7c9e08
Docs: SbomValidator
DaveTryon Feb 22, 2025
d0c9509
Docs: SbomMetadata that I missed
DaveTryon Feb 22, 2025
02561d6
GetSupportedSBOMSpecifications => GetSupportedSbomSpecifications
DaveTryon Feb 23, 2025
388dd83
GenerateSBOMAsync => GenerateSbomAsync
DaveTryon Feb 23, 2025
29a498a
Fix comment
DaveTryon Feb 23, 2025
f7a6441
SettingSource.SBOMApi => SettingSource.SbomApi
DaveTryon Feb 23, 2025
87d1632
DefaultSBOMNamespaceBaseUri => DefaultSbomNamespaceBaseUri
DaveTryon Feb 23, 2025
b0aa0fb
SBOMToolVersion => SbomTooLVersion
DaveTryon Feb 23, 2025
4b109bd
MetadataKey.SBOM* => MeatadataKey.Sbom*
DaveTryon Feb 23, 2025
342783e
ParseSBOMFile => ParseSbomFile
DaveTryon Feb 23, 2025
cf95a21
SBOMFileHash => SbomFileHash
DaveTryon Feb 23, 2025
0fc0539
filesArraySupportingSBOMs => filesArraySupportingSboms
DaveTryon Feb 23, 2025
b2a66c0
RecordSBOMFormat => RecordSbomFormat
DaveTryon Feb 24, 2025
e0b4f72
GetSBOMNamespaceUri => GetSbomNamespaceUri
DaveTryon Feb 24, 2025
0a5ff83
SBOMFormatsUsed => SbomFormatsUsed
DaveTryon Feb 24, 2025
204da5e
SBOMGenerationWorkflow => SbomGenerationWorkflow
DaveTryon Feb 24, 2025
335f314
SBOMParseMetadata => SbomParseMetadata
DaveTryon Feb 24, 2025
48d56cc
SBOMValidationWorkflow => SbomValidationWorkflow
DaveTryon Feb 24, 2025
42e8158
internalSBOMFileInfoDeduplicator => internalSbomFileInfoDeduplicator
DaveTryon Feb 24, 2025
fd82825
ToSBOMSpecification => ToSbomSpecification
DaveTryon Feb 24, 2025
6c0cade
DefaultSBOMBaseNamespaceUri => DefaultSbomBaseNamespaceUri
DaveTryon Feb 24, 2025
ee535ab
RedactSBOMAsync => RedactSbomAsync
DaveTryon Feb 24, 2025
83d8ab3
deleteSBOMDir => delete SbomDir
DaveTryon Feb 24, 2025
0647fc2
InternalSBOMFileInfo => InternalSbomFileInfo (comments)
DaveTryon Feb 24, 2025
78b78cf
Update references after rebase
DaveTryon Feb 27, 2025
bd2ec33
SPDXSBOMReaderForExternalDocumentReference => SPDXSBOMReaderForExtern…
DaveTryon Feb 27, 2025
b57f93e
SPDXSBOMReaderForExternalDocumentReference_ => SPDXSbomReaderForExter…
DaveTryon Feb 27, 2025
454a951
Merge branch 'DaveTryon/pascal-casing' of https://github.com/microsof…
DaveTryon Feb 27, 2025
d48fc89
Remove ComplianceStandard...surprised it's no longer there
DaveTryon Feb 27, 2025
b118bd9
Delete ManifestInfoValidator.cs
DaveTryon Feb 27, 2025
225f02a
Revert "Delete ManifestInfoValidator.cs"
DaveTryon Feb 27, 2025
b51f0b4
Revert "Remove ComplianceStandard...surprised it's no longer there"
DaveTryon Feb 27, 2025
d8896ad
Remove unintended change
DaveTryon Feb 27, 2025
af9af54
Fix typo (RecordSbomormat => RecordSbomFormat)
DaveTryon Feb 27, 2025
f38c75f
Fix unit tests
DaveTryon Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The sbom tool code is designed to be as extensible as possible. All the interfac

The `Microsoft.Sbom.Common` project contains the base of common code, constants, etc. that all the projects can call.

The `Microsoft.Sbom.Contracts` project defines the interfaces that the tool uses to call the SBOM tool using a C# API. The `ISBOMGenerator` class defines two methods that the tool uses to directly call the SBOM tool from C# code. The `Microsoft.Sbom.Tool` project defines a command line interface (CLI) interface to talk to the SBOM tool.
The `Microsoft.Sbom.Contracts` project defines the interfaces that the tool uses to call the SBOM tool using a C# API. The `ISbomGenerator` class defines two methods that the tool uses to directly call the SBOM tool from C# code. The `Microsoft.Sbom.Tool` project defines a command line interface (CLI) interface to talk to the SBOM tool.

## Building on Visual Studio

Expand Down
54 changes: 27 additions & 27 deletions docs/sbom-tool-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Add a reference to the [Microsoft.Sbom.Api](https://www.nuget.org/packages/Micro

## Getting started

The main entry point for the SBOM generator is in the `SBOMGenerator` class. In order to create an instance of the SBOMGenerator class there are a few arguments that need to be provided. These arguments can be resolved through the dependency injection framework. The following code snippet shows one way to create an instance of the SBOMGenerator class using the dependency injection framework in a pattern that is common when using this approach. Note that this approach is not the only one which will work. For example, if you'd like to avoid implementing the `IHostedService` interface, it should be possible to create a ServiceCollection without using ASP.NET as well.
The main entry point for the SBOM generator is in the `SbomGenerator` class. In order to create an instance of the SbomGenerator class there are a few arguments that need to be provided. These arguments can be resolved through the dependency injection framework. The following code snippet shows one way to create an instance of the SbomGenerator class using the dependency injection framework in a pattern that is common when using this approach. Note that this approach is not the only one which will work. For example, if you'd like to avoid implementing the `IHostedService` interface, it should be possible to create a ServiceCollection without using ASP.NET as well.

Following our suggested approach, you can create a Host and add a hosted service that will call the SBOM API along with its dependencies. By calling `.AddSbomTool()` on the service collection, the SBOM API will be added to the dependency injection framework and can be resolved by the hosted service. The hosted service can then be started by calling `RunConsoleAsync` on the host.

Expand Down Expand Up @@ -56,7 +56,7 @@ class Program
Now that the entry point is set up, we can define the hosted service. In this example, we will use the `GenerationService` class (This class is user defined) as the hosted service. The `GenerationService` class will be responsible for calling the SBOM API and generating the SBOM.
The following snippet shows how to set up the `GenerationService` class so that arguments are resolved through DI.

In this approach, your class must implement the `IHostedService` interface and provide an implementation for the `StartAsync` and `StopAsync` methods. Now you can pass an instance of the `ISBOMGenerator` interface to the constructor of your class. This interface is provided by the SBOM API and can be resolved by the DI framework. The `ISBOMGenerator` interface provides the methods to generate the SBOM.
In this approach, your class must implement the `IHostedService` interface and provide an implementation for the `StartAsync` and `StopAsync` methods. Now you can pass an instance of the `ISbomGenerator` interface to the constructor of your class. This interface is provided by the SBOM API and can be resolved by the DI framework. The `ISbomGenerator` interface provides the methods to generate the SBOM.

Descriptions of the arguments to the `GenerateSbomAsync` method can be found [here](#scan-based-sbom-generator-api) and [here](#self-provided-data-based-sbom-generator-api) and can be defined anywhere necessary as long as they are passed to the `GenerateSbomAsync` method.

Expand All @@ -68,9 +68,9 @@ namespace SBOMApiExample
{
public class GenerationService: IHostedService
{
private readonly ISBOMGenerator generator;
private readonly ISbomGenerator generator;
private readonly IHostApplicationLifetime hostApplicationLifetime;
public GenerationService(ISBOMGenerator generator, IHostApplicationLifetime hostApplicationLifetime)
public GenerationService(ISbomGenerator generator, IHostApplicationLifetime hostApplicationLifetime)
{
this.generator = generator;
this.hostApplicationLifetime = hostApplicationLifetime;
Expand Down Expand Up @@ -99,22 +99,22 @@ The generator object provides two different API implementations for creating the

Below are 2 additional helper methods.

### GetSupportedSBOMSpecifications
### `GetSupportedSbomSpecifications`

The `SBOMSpecification` object represents a SBOM format. Each `SBOMSpecification` contains a `name` and a `version`. This structure defines a single format of SBOM. Sample SPDX version 2.2 format representations include:
The `SbomSpecification` object represents a SBOM format. Each `SbomSpecification` contains a `name` and a `version`. This structure defines a single format of SBOM. Sample SPDX version 2.2 format representations include:

```C#
using Microsoft.Sbom.Contracts;

var spdx22Specification = new SBOMSpecification("SPDX", "2.2");
var spdx22Specification = new SbomSpecification("SPDX", "2.2");
```

While this API supports the creation of a SBOM output file in multiple formats, it currently only supports the SPDX version 2.2 architecture. Users looking to implement other SBOM architectures can use this API call, which provides the full list of all supported formats.

```C#
using Xunit;

var specifications = generator.GetSupportedSBOMSpecifications();
var specifications = generator.GetSupportedSbomSpecifications();

Assert.True(specifications.Count() == 1);
Assert.Equal("SPDX", specifications.First().Name);
Expand All @@ -139,12 +139,12 @@ This API is a useful tool when utilizing the self-provided data-based API. The A

In order to call the API, the user must first include a minimum of one required object and one optional data object.

### SBOM Metadata
### SbomMetadata

The `SBOMMetadata` object provides the API with additional metadata for use in configuring output metadata values in the SBOM file, e.g., product name or version:
The `SbomMetadata` object provides the API with additional metadata for use in configuring output metadata values in the SBOM file, e.g., product name or version:

```C#
SBOMMetadata metadata = new SBOMMetadata()
SbomMetadata metadata = new SbomMetadata()
{
PackageName = "MyProject", //Required
PackageVersion = "0.0.1", // Required
Expand Down Expand Up @@ -190,23 +190,23 @@ Assert.False(result.Errors.Any());
* The `rootPath` dictates the destination path for publishing the build artifacts. The API will scan all files in 'rootPath' and will subsequently add them to the 'files' section in the SBOM output file. If the command does not include the `manifestDirPath` parameter, the tool will generate the SBOM inside the default `_manifest` folder.
* The `componentPath` parameter normally contains the source folder, which the API will search for dependency components. The 'packages' section in the SBOM file will list the discovered components.

* The `metadata` and `configuration` parameters accept the [`SBOMMetadata`](#sbommetadata) and [`RuntimeConfiguration`](#runtimeconfiguration) objects respectively.
* The `metadata` and `configuration` parameters accept the [`SbomMetadata`](#sbommetadata) and [`RuntimeConfiguration`](#runtimeconfiguration) objects respectively.
* As desired, the `manifestDirPath` parameter allows users to specify a full folder path if they want the API to save the SBOM to a directory other than the default `_manifest` location. The API will store the SBOM file in the `_manifest` subfolder under the user-specified path.

The API asynchronously returns a `SBOMGenerationResult` object. A successful SBOM file generation will set the `IsSuccessful` flag value to `true`. A failed generation run will add the errors to the `Errors` list.
The API asynchronously returns a `SbomGenerationResult` object. A successful SBOM file generation will set the `IsSuccessful` flag value to `true`. A failed generation run will add the errors to the `Errors` list.

## Self-provided data-based SBOM generator API

There might be occasions where users do not want the API to scan for the target components. The self-provided data-based API is an ideal choice for those scenarios where users have the list of files and packages for inclusion in the SBOM file. The self-provided data-based SBOM generator API gives users the ability to serialize the data in the desired format.

Users will still have to provide the metadata and runtime objects for this API.

### SBOMFile
### SbomFile

`Path` and `Checksum` are the only required properties for use in the `SBOMFile` object in order to represent a file inside the SBOM. The API will serialize any additional values unchanged "as-is" in the output SBOM file.
`Path` and `Checksum` are the only required properties for use in the `SbomFile` object in order to represent a file inside the SBOM. The API will serialize any additional values unchanged "as-is" in the output SBOM file.

```C#
var file = new SBOMFile
var file = new SbomFile
{
Path = "./tmp/file2.txt",
Checksum = new List<Checksum>
Expand All @@ -219,12 +219,12 @@ var file = new SBOMFile

The API looks for a relative path starting with a period `.`. All path separators should include forward slashes `/` in compliance with the SPDX version 2.2 specification.

### SBOMPackage
### SbomPackage

'SBOMPackage' represents a dependency component for the product. The `PackageName` is the only required property. The API will serialize all other properties unchanged "as-is" in the final output SBOM file.
'SbomPackage' represents a dependency component for the product. The `PackageName` is the only required property. The API will serialize all other properties unchanged "as-is" in the final output SBOM file.

```C#
var package = new SBOMPackage
var package = new SbomPackage
{
PackageName = "com.test.Foo",

Expand All @@ -236,7 +236,7 @@ You can call the API as shown below:
```C#
using Microsoft.Sbom.Contracts.Enums;

var result = await generator.GenerateSBOMAsync(rootPath: scanPath,
var result = await generator.GenerateSbomAsync(rootPath: scanPath,
files: sbomFiles,
packages: sbomPackages,
metadata: metadata,
Expand All @@ -245,14 +245,14 @@ var result = await generator.GenerateSBOMAsync(rootPath: scanPath,
```

* The `rootPath` specifies the path for placing the output SBOM file. User specifying the destination path with the `manifestDirPath` parameter can utilize the `null` value for `rootPath`.
* The `files` parameter contains a list of `SBOMFile` objects.
* The `packages` parameter contains a list of `SBOMPackage` objects.
* The `metadata` and `runtimeConfiguration` parameters accept the [`SBOMMetadata`](#sbommetadata) and [`RuntimeConfiguration`](#runtimeconfiguration) objects (respectively).
* The `files` parameter contains a list of `SbomFile` objects.
* The `packages` parameter contains a list of `SbomPackage` objects.
* The `metadata` and `runtimeConfiguration` parameters accept the [`SbomMetadata`](#sbommetadata) and [`RuntimeConfiguration`](#runtimeconfiguration) objects (respectively).
* If users want the API to generate the output SBOM in a different folder other the default location, they need to provide the path in the `manifestDirPath` parameter. Users will find the SBOM file under the `_manifest` directory at the user-specified path.

## SBOM Validation

Now that you have generated the SBOM file, you can validate it using the `SBOMValidator` class. Setup for this will be very similar to the `SBOMGenerator` class. Here is an example:
Now that you have generated the SBOM file, you can validate it using the `SbomValidator` class. Setup for this will be very similar to the `SbomGenerator` class. Here is an example:

```C#
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -276,7 +276,7 @@ class Program
}
```

After the Host is set up, you can inject the `ISBOMValidator` interface into your service and use it to validate the SBOM file. Here is an example:
After the Host is set up, you can inject the `ISbomValidator` interface into your service and use it to validate the SBOM file. Here is an example:
Note that the only arguments required are the `buildDropPath`, the `outputPath`, and the `SbomSpecification`. The `buildDropPath` is the path to the directory containing the _manifest directory. The `outPath` is the path to the file where the validation output will be written. The only `SbomSpecification` currently supported is `SPDX 2.2`.
All other arguments are optional.

Expand All @@ -288,11 +288,11 @@ namespace SBOMApiExample
{
public class ValidationService : IHostedService
{
private readonly ISBOMValidator sbomValidator;
private readonly ISbomValidator sbomValidator;
private readonly IHostApplicationLifetime hostApplicationLifetime;

public ValidationService(
ISBOMValidator sbomValidator,
ISbomValidator sbomValidator,
IHostApplicationLifetime hostApplicationLifetime)
{
this.sbomValidator = sbomValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Microsoft.Sbom.Adapters;

public class ComponentDetectionToSBOMPackageAdapter
public class ComponentDetectionToSbomPackageAdapter
{
/// <summary>
/// Parses the output from Component Detection and converts it into a list of <see cref="SbomPackage"/> objects.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Sbom.Api/Config/ApiConfigurationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static InputConfiguration GetConfiguration(
string manifestDirPath,
IEnumerable<SbomFile> files,
IEnumerable<SbomPackage> packages,
SBOMMetadata metadata,
SbomMetadata metadata,
IList<SbomSpecification> specifications = null,
RuntimeConfiguration runtimeConfiguration = null,
string externalDocumentReferenceListFile = null,
Expand Down Expand Up @@ -195,7 +195,7 @@ private static ConfigurationSetting<T> GetConfigurationSetting<T>(T value)
return new ConfigurationSetting<T>
{
Value = value,
Source = SettingSource.SBOMApi
Source = SettingSource.SbomApi
};
}

Expand Down
12 changes: 6 additions & 6 deletions src/Microsoft.Sbom.Api/Config/ConfigSanitizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ConfigSanitizer
private readonly IFileSystemUtils fileSystemUtils;
private readonly IAssemblyConfig assemblyConfig;

internal static string SBOMToolVersion => VersionValue.Value;
internal static string SbomToolVersion => VersionValue.Value;

private static readonly Lazy<string> VersionValue = new Lazy<string>(() => typeof(SbomToolCmdRunner).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? string.Empty);

Expand Down Expand Up @@ -208,15 +208,15 @@ private ConfigurationSetting<AlgorithmName> GetHashAlgorithmName(IConfiguration
private ConfigurationSetting<string> GetNamespaceBaseUri(IConfiguration configuration, ILogger logger)
{
// If assembly name is not defined but a namespace was provided, then return the current value.
if (string.IsNullOrWhiteSpace(assemblyConfig.DefaultSBOMNamespaceBaseUri) && !string.IsNullOrEmpty(configuration.NamespaceUriBase?.Value))
if (string.IsNullOrWhiteSpace(assemblyConfig.DefaultSbomNamespaceBaseUri) && !string.IsNullOrEmpty(configuration.NamespaceUriBase?.Value))
{
return configuration.NamespaceUriBase;
}

// If assembly name is not defined and namespace was not provided then return the default namespace as per spdx spec https://spdx.github.io/spdx-spec/v2.2.2/document-creation-information/#653-examples.
if (string.IsNullOrWhiteSpace(assemblyConfig.DefaultSBOMNamespaceBaseUri) && string.IsNullOrEmpty(configuration.NamespaceUriBase?.Value))
if (string.IsNullOrWhiteSpace(assemblyConfig.DefaultSbomNamespaceBaseUri) && string.IsNullOrEmpty(configuration.NamespaceUriBase?.Value))
{
var defaultNamespaceUriBase = $"https://spdx.org/spdxdocs/sbom-tool-{SBOMToolVersion}-{Guid.NewGuid()}";
var defaultNamespaceUriBase = $"https://spdx.org/spdxdocs/sbom-tool-{SbomToolVersion}-{Guid.NewGuid()}";

logger.Information($"No namespace URI base provided, using unique generated default value {defaultNamespaceUriBase}");

Expand All @@ -231,7 +231,7 @@ private ConfigurationSetting<string> GetNamespaceBaseUri(IConfiguration configur
// show a warning on the console.
if (!string.IsNullOrWhiteSpace(configuration.NamespaceUriBase?.Value))
{
if (!string.IsNullOrWhiteSpace(assemblyConfig.DefaultSBOMNamespaceBaseUri))
if (!string.IsNullOrWhiteSpace(assemblyConfig.DefaultSbomNamespaceBaseUri))
{
logger.Information("Custom namespace URI base provided, using provided value instead of default");
}
Expand All @@ -242,7 +242,7 @@ private ConfigurationSetting<string> GetNamespaceBaseUri(IConfiguration configur
return new ConfigurationSetting<string>
{
Source = SettingSource.Default,
Value = assemblyConfig.DefaultSBOMNamespaceBaseUri
Value = assemblyConfig.DefaultSbomNamespaceBaseUri
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.Sbom.Api.Config;
[ArgProductName("sbom-tool")]
public class SbomToolCmdRunner
{
internal static string SBOMToolVersion => VersionValue.Value;
internal static string SbomToolVersion => VersionValue.Value;

private static readonly Lazy<string> VersionValue = new Lazy<string>(() =>
{
Expand Down Expand Up @@ -86,9 +86,9 @@ public RedactArgs Redact(RedactArgs redactArgs)
[ArgDescription("Displays the version of the tool being used. Can be used as '--version'")]
public void Version()
{
if (!string.IsNullOrEmpty(SBOMToolVersion))
if (!string.IsNullOrEmpty(SbomToolVersion))
{
Console.WriteLine(SBOMToolVersion);
Console.WriteLine(SbomToolVersion);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void Validate(string propertyName, object propertyValue, AttributeCollect

private bool NamespaceUriBaseIsNullOrHasDefaultValue(object propertyValue)
{
var defaultProperty = assemblyConfig.DefaultSBOMNamespaceBaseUri;
var defaultProperty = assemblyConfig.DefaultSbomNamespaceBaseUri;

if (propertyValue == null || !string.IsNullOrEmpty(defaultProperty))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private async Task Validate(InternalSbomFileInfo internalFileInfo, Channel<FileV
// If we have the files from both locations present in the hash, validate if the hashes match.
if (newValue?.FileLocation == Sbom.Entities.FileLocation.All)
{
if (string.Equals(newValue.OnDiskHash?.ChecksumValue, newValue.SBOMFileHash?.ChecksumValue, StringComparison.InvariantCultureIgnoreCase))
if (string.Equals(newValue.OnDiskHash?.ChecksumValue, newValue.SbomFileHash?.ChecksumValue, StringComparison.InvariantCultureIgnoreCase))
{
await output.Writer.WriteAsync(new FileValidationResult { Path = internalFileInfo.Path });
}
Expand Down
Loading