From 40c9181d97a6ed16a7ffc11ee0c318f5e036491d Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Fri, 19 Jan 2024 15:24:16 -0500 Subject: [PATCH] add explanation --- .github/workflows/snyk.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 9b818457..061cc0f5 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -41,12 +41,18 @@ jobs: # Update requirements.in with the snyk fix suggestions python tools/snyk-update.py - # Remove unnecessary file so that it doesn't get added to the repo - rm scan.json - # Update requirements.txt make update-dependencies + # Check if there are any changes + if [ -z "$(git status --porcelain)" ]; then + echo "Found vulnerable issues but no upgrade or patch available" + cat scan.json | jq '[.vulnerabilities[] | .id] | unique[]' + else + echo "Changes made to add into PR: " + git diff + fi + # Fail so that PR is created exit 1 - name: Create Pull Request