Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,9 @@ but you have not packaged yet.
BuildDropPath: '$(System.ArtifactsDirectory)/dotnetPublishOutput'
Build_Repository_Uri: 'https://github.com/powershell/powershell.git'
displayName: PowerShell SBOM
packageName: PowerShell Windows x64
packageVersion: 7.2.1
# Optional - Path to scan for components or CGManifest.json
# Same as source scan path for Component Governance
# sourceScanPath: <folderPath>
```
25 changes: 16 additions & 9 deletions Sbom.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
parameters:
- name: "BuildDropPath"
default: '$(System.ArtifactsDirectory)'
- name: BuildDropPath
default: $(System.ArtifactsDirectory)
# Use the public repo URL, such as `https://github.com/powershell/powershell`
- name: Build_Repository_Uri
- name: "displayName"
default: "SBOM"
- name: "SBOMGenerator_Formats"
default: "spdx:2.2"

- name: displayName
default: SBOM
- name: SBOMGenerator_Formats
default: spdx:2.2
- name: PackageName
- name: PackageVersion
- name: sourceScanPath
default: $(Build.SourcesDirectory)

steps:
- task: UseDotNet@2
Expand All @@ -21,18 +24,22 @@ steps:
env:
Build.Repository.Uri: ${{ parameters.Build_Repository_Uri }}
SBOMGenerator_Formats: '${{ parameters.SBOMGenerator_Formats }}'
sourceScanPath: ${{ parameters.sourceScanPath }}

- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: '${{ parameters.displayName }} - Generate'
inputs:
BuildDropPath: ${{ parameters.BuildDropPath }}
PackageName: ${{ parameters.PackageName }}
PackageVersion: ${{ parameters.PackageVersion }}
BuildComponentPath: ${{ parameters.sourceScanPath }}
env:
SBOMGenerator_Formats: '${{ parameters.SBOMGenerator_Formats }}'
# *** Leaving these as documentation of the rest of the inputs ***
# These should be implemented as needed with backwards compatibility for user that didn't supply the parameters
#
# this is the folder to put the BOM, defaults to _manifest
# ManifestDirPath: '_manifest'
# this is the folder to put the BOM, defaults to ${{ parameters.BuildDropPath }}
# ManifestDirPath: ${{ parameters.BuildDropPath }}
# configuration json for the tool
# ConfigFilePath: config.json
# This will break signing, but it is currently not enabled.
Expand Down