From 21931eeeefc3b3a14086732d3194b1abb91af0e1 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 12 Jan 2023 15:33:20 -0800 Subject: [PATCH 1/3] Install pipfile.lock dependencies before snyk monitor (per Snyk docs) --- .github/workflows/snyk.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index a7a1fd45..ec513036 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -16,6 +16,9 @@ jobs: with: fetch-depth: 0 + - name: Install Pipfile.lock dependencies + run: pipenv sync + - name: Run Snyk uses: snyk/actions/python@master with: From 0858daa788a583f94f0f957acb6e306a3dc6de51 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 17 Jan 2023 09:45:08 -0800 Subject: [PATCH 2/3] Install pipenv in snyk GH action --- .github/workflows/snyk.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index ec513036..4f150ba5 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -16,6 +16,10 @@ jobs: with: fetch-depth: 0 + - name: Install pipenv + run: | + python -m pip install --upgrade pipenv + - name: Install Pipfile.lock dependencies run: pipenv sync From efc500704c88efc150568a552b386d62711af906 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 17 Jan 2023 10:21:50 -0800 Subject: [PATCH 3/3] Add yarn.lock scanning and simplify to scanning Pipfile --- .github/workflows/snyk.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 4f150ba5..7858dd1a 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -9,7 +9,7 @@ env: SNYK_ORG: rstudio-connect jobs: - snyk-monitor: + python: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -20,11 +20,23 @@ jobs: run: | python -m pip install --upgrade pipenv - - name: Install Pipfile.lock dependencies - run: pipenv sync + - name: Install Pipfile dependencies (as required by Snyk) + run: pipenv install - name: Run Snyk uses: snyk/actions/python@master with: command: monitor - args: --file=Pipfile --org=${{ env.SNYK_ORG }} + args: --file=Pipfile --project-name=python --org=${{ env.SNYK_ORG }} + ui: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Run Snyk + uses: snyk/actions/node@master + with: + command: monitor + args: --file=yarn.lock --project-name=ui --org=${{ env.SNYK_ORG }}