Просмотр исходного кода

Add Snyk security scan for PHP

After I found https://github.com/PrivateBin/docker-nginx-fpm-alpine/pull/44 I saw they also support PHP, so let's do it here (one level before container packaging), too.
Also it complements the CodeQL analysis, which only covers the JS part.

I added the API token to the PrivateBIn org now.
rugk 5 лет назад
Родитель
Сommit
8bc97517fb
1 измененных файлов с 27 добавлено и 0 удалено
  1. 27 0
      .github/workflows/snyk-scan.yml

+ 27 - 0
.github/workflows/snyk-scan.yml

@@ -0,0 +1,27 @@
+# This is a basic workflow to help you get started with Actions
+
+name: Snyk scan
+
+on:
+  # Triggers the workflow on push or pull request events but only for the master branch
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+jobs:
+  # https://github.com/snyk/actions/tree/master/php
+  snyk-php:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@master
+      - name: Run Snyk to check for vulnerabilities
+        uses: snyk/actions/php@master
+        continue-on-error: true # To make sure that SARIF upload gets called
+        env:
+          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
+        with:
+          args: --sarif-file-output=snyk.sarif
+      - name: Upload result to GitHub Code Scanning
+        uses: github/codeql-action/upload-sarif@v1
+        with:
+          sarif_file: snyk.sarif