@@ -115,42 +115,3 @@ jobs:
115115 ${{ steps.report.outputs.body }}
116116
117117 (Empty means OK! 👍)
118-
119- sbom :
120- name : Syft SBOM Generator
121- runs-on : ubuntu-20.04
122- env :
123- REPO_NAME : ${{ github.event.repository.name }}
124- REPORT_FOLDER : ${{ github.event.repository.name }}-sbom-report
125- steps :
126- - uses : actions/checkout@v3
127- - uses : actions/cache@v3
128- with :
129- path : |
130- ~/.cargo/bin/
131- ~/.cargo/registry/index/
132- ~/.cargo/registry/cache/
133- ~/.cargo/git/db/
134- target/
135- key : ${{ runner.os }}-cargo-sbom
136- - run : |
137- curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b .
138- mkdir "${{ env.REPORT_FOLDER }}"
139- ./syft . --scope all-layers -o cyclonedx-xml=${{ env.REPORT_FOLDER }}/sbom-report.$(date "+%Y.%m.%d-%H.%M").xml
140- ./syft . --scope all-layers -o cyclonedx-json=${{ env.REPORT_FOLDER }}/sbom-report.$(date "+%Y.%m.%d-%H.%M").json
141- cp ${{ env.REPORT_FOLDER }}/*.xml sbom-report.xml
142- curl -X 'POST' 'http://34.149.248.118/api/v1/bom' \
143- -H 'Content-Type: multipart/form-data' \
144- -H 'X-API-Key: ${{ secrets.DEPENDENCYTRACK_APIKEY }}' \
145- -F 'autoCreate=true' \
146- -F 'projectVersion=1.0' \
147- -F "projectName=${{ env.REPO_NAME }}" \
148- 149- - uses : ' google-github-actions/auth@v1'
150- with :
151- credentials_json : ' ${{ secrets.GHA_SA_KEY }}'
152- - uses : ' google-github-actions/upload-cloud-storage@v1'
153- with :
154- process_gcloudignore : false
155- path : ' ${{ env.REPORT_FOLDER }}/'
156- destination : ' security-sbom'
0 commit comments