From 9a7d6309d63ddcddbfbcf24218fbc1c3c890edbf Mon Sep 17 00:00:00 2001 From: Dimitris Gkizanis <124158138+dgkizanis-nex@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:54:46 +0000 Subject: [PATCH] Create pipeline.yml with the Snyk job --- .github/workflows/pipeline.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..aa5bf3b --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,32 @@ +name: Snyk Security Scan + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + snyk-scan: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Snyk CLI + run: npm install -g snyk + + - name: Run Snyk to test for code vulnerabilities + run: snyk code test + + - name: Run Snyk to test dependencies for vulnerabilities + run: snyk test + + - name: Upload Snyk report as artifact + uses: actions/upload-artifact@v3 + with: + name: snyk-report + path: snyk-report.json