Skip to content

Commit ebd9baa

Browse files
committed
run on workflow containing pack
1 parent fd65193 commit ebd9baa

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

.github/workflows/main.yaml

+46-4
Original file line numberDiff line numberDiff line change
@@ -880,12 +880,11 @@ jobs:
880880
if: github.event_name == 'push'
881881
uses: advanced-security/spdx-dependency-submission-action@5530bab9ee4bbe66420ce8280624036c77f89746 # ratchet:advanced-security/[email protected]
882882

883-
vendor-analysis:
884-
name: Vendor Vulnerability Scanning
883+
extract-deps:
884+
name: Extract Dependencies
885885
runs-on: ubuntu-latest
886886
needs:
887-
- pack
888-
887+
- pack
889888
steps:
890889
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/[email protected]
891890
- uses: ./.github/actions/build-base-image
@@ -898,6 +897,49 @@ jobs:
898897
docker run -v $PWD/:/github -v $HOME:$HOME otp \
899898
"/github/.github/scripts/otp-compliance.es sbom osv-scan"
900899
900+
- name: "upload osv-scanner deps" # Upload the deps
901+
uses: actions/upload-artifact@v4
902+
with:
903+
name: converted-OSV-Scanner-deps
904+
path: osv-scanner.json
905+
retention-days: 2
906+
907+
scan-pr:
908+
# run-scheduled-scan triggers this job
909+
# PRs and pushes trigger this job
910+
needs: extract-deps
911+
permissions:
912+
# Require writing security events to upload SARIF file to security tab
913+
security-events: write
914+
# Required to upload SARIF file to CodeQL.
915+
# See: https://github.com/github/codeql-action/issues/2117
916+
actions: read
917+
contents: read
918+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@6fc714450122bda9d00e4ad5d639ad6a39eedb1f" # ratchet:google/osv-scanner-action/.github/workflows/[email protected]
919+
with:
920+
download-artifact: converted-OSV-Scanner-deps
921+
upload-sarif: ${{ github.repository == 'erlang/otp' }}
922+
scan-args: |-
923+
--lockfile=osv-scanner:osv-scanner.json
924+
925+
# vendor-analysis:
926+
# name: Vendor Vulnerability Scanning
927+
# runs-on: ubuntu-latest
928+
# needs:
929+
# - pack
930+
931+
# steps:
932+
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/[email protected]
933+
# - uses: ./.github/actions/build-base-image
934+
# with:
935+
# BASE_BRANCH: ${{ env.BASE_BRANCH }}
936+
937+
# # check that PRs do not introduce vulnerabilities in vendor dependencies
938+
# - name: 'Vendor Vulnerability Scanning'
939+
# run: |
940+
# docker run -v $PWD/:/github -v $HOME:$HOME otp \
941+
# "/github/.github/scripts/otp-compliance.es sbom osv-scan"
942+
901943
## If this is an "OTP-*" tag that has been pushed we do some release work
902944
release:
903945
name: Release Erlang/OTP

.github/workflows/osv-scanner-scheduled.yml

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
scan-pr:
102102
# run-scheduled-scan triggers this job
103103
# PRs and pushes trigger this job
104+
needs: extract-deps
104105
if: github.event_name != 'schedule'
105106
permissions:
106107
# Require writing security events to upload SARIF file to security tab
@@ -111,6 +112,7 @@ jobs:
111112
contents: read
112113
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@6fc714450122bda9d00e4ad5d639ad6a39eedb1f" # ratchet:google/osv-scanner-action/.github/workflows/[email protected]
113114
with:
115+
download-artifact: converted-OSV-Scanner-deps
114116
upload-sarif: ${{ github.repository == 'erlang/otp' }}
115117
scan-args: |-
116118
--lockfile=osv-scanner:osv-scanner.json

0 commit comments

Comments
 (0)