|
1 |
| -name: Security |
| 1 | +name: Security Test |
2 | 2 | run-name: ${{ github.actor }} is running Security Actions
|
3 | 3 | on: [pull_request]
|
4 | 4 | jobs:
|
5 |
| - security: |
| 5 | + secrets: |
6 | 6 | runs-on: ubuntu-latest
|
7 | 7 | steps:
|
8 | 8 | - run: echo "Triggered by a ${{ github.event_name }} event."
|
|
27 | 27 | name: scan_results
|
28 | 28 | path: /tmp/scan_output.json
|
29 | 29 | retention-days: 7
|
| 30 | + sast-dependencies: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v3 |
| 34 | + # Node.js dependencies scan |
| 35 | + - name: Setup Node.js |
| 36 | + uses: actions/setup-node@v4 |
| 37 | + with: |
| 38 | + node-version: "22" |
| 39 | + cache: "npm" |
| 40 | + - name: Install Node dependencies |
| 41 | + run: npm ci |
| 42 | + - name: Run Snyk for Node.js |
| 43 | + uses: snyk/actions/node@master |
| 44 | + env: |
| 45 | + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 46 | + with: |
| 47 | + command: test |
| 48 | + args: > |
| 49 | + --severity-threshold=high |
| 50 | + --show-vulnerable-paths=all |
| 51 | + # Python dependencies scan |
| 52 | + - name: Setup Python |
| 53 | + uses: actions/setup-python@v4 |
| 54 | + with: |
| 55 | + python-version: "3.9" |
| 56 | + - name: Install Python dependencies |
| 57 | + run: pip install -r requirements.txt |
| 58 | + - name: Run Snyk for Python |
| 59 | + uses: snyk/actions/python@master |
| 60 | + env: |
| 61 | + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 62 | + with: |
| 63 | + command: test |
| 64 | + args: > |
| 65 | + --file=requirements.txt |
| 66 | + --severity-threshold=high |
| 67 | + --show-vulnerable-paths=all |
| 68 | + sast-code: |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v3 |
| 72 | + - name: Setup Node.js |
| 73 | + uses: actions/setup-node@v4 |
| 74 | + with: |
| 75 | + node-version: "22" |
| 76 | + cache: "npm" |
| 77 | + - name: Install dependencies |
| 78 | + run: npm ci |
| 79 | + - name: Run Snyk to check for vulnerabilities |
| 80 | + uses: snyk/actions/node@master |
| 81 | + env: |
| 82 | + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 83 | + with: |
| 84 | + command: code test |
| 85 | + args: > |
| 86 | + --severity-threshold=high |
| 87 | + --json-file-output=snyk-code-test.json |
0 commit comments