Skip to content

Commit 3817250

Browse files
authored
Merge pull request #486 from aws/scan-published-artifacts
fix(daily-scan): scan published artifacts instead of repo source
2 parents fb91200 + 3e8f38c commit 3817250

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/daily-scan.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ jobs:
3333
with:
3434
python-version: '3.x'
3535

36-
- name: Build Python project for scanning
36+
- name: Install published package for scanning
3737
run: |
38+
mkdir -p scan-target
3839
python -m venv scan-venv
3940
source scan-venv/bin/activate
40-
# Install the published SDK package to get all runtime dependencies
4141
pip install aws-xray-sdk
42-
# Generate requirements file for scanning
43-
pip freeze > requirements.txt
42+
pip freeze > scan-target/requirements.txt
4443
4544
- name: Install Java for dependency scan
4645
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 #v5.0.0
@@ -74,7 +73,7 @@ jobs:
7473
curl -Ls "https://github.com/dependency-check/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip.asc" --output dependency-check.zip.asc
7574
gpg --verify dependency-check.zip.asc
7675
unzip dependency-check.zip
77-
./dependency-check/bin/dependency-check.sh --enableExperimental --failOnCVSS 0 --nvdApiKey ${{ env.NVD_API_KEY_NVD_API_KEY }} --ossIndexUsername ${{ env.OSS_INDEX_USERNAME }} --ossIndexPassword ${{ env.OSS_INDEX_PASSWORD }} -s "."
76+
./dependency-check/bin/dependency-check.sh --enableExperimental --failOnCVSS 0 --nvdApiKey ${{ env.NVD_API_KEY_NVD_API_KEY }} --ossIndexUsername ${{ env.OSS_INDEX_USERNAME }} --ossIndexPassword ${{ env.OSS_INDEX_PASSWORD }} -s "scan-target/"
7877
7978
- name: Print dependency scan results on failure
8079
if: ${{ steps.dep_scan.outcome != 'success' }}

0 commit comments

Comments
 (0)