Skip to content

πŸ›‘οΈ Security Scanning #16

πŸ›‘οΈ Security Scanning

πŸ›‘οΈ Security Scanning #16

Workflow file for this run

name: πŸ›‘οΈ Security Scanning
on:
schedule:
- cron: '0 6 * * 1' # Every Monday at 6 AM
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
security-scan:
name: πŸ” Comprehensive Security Scan
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
- name: πŸ“¦ Install dependencies
run: npm ci
- name: πŸ”’ NPM Audit
run: |
npm audit --audit-level=high
npm audit fix --dry-run
- name: 🚨 Snyk Security Scan
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high --sarif-file-output=snyk.sarif
- name: πŸ“Š Snyk Code Scan
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: code test --sarif-file-output=snyk-code.sarif
- name: πŸ“ Upload Security Reports
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif
- name: πŸ” Secret Scanning
uses: trufflesecurity/trufflehog-actions-scan@v1
with:
path: ./
base: ${{ github.event.before }}
head: ${{ github.event.after }}
- name: πŸ›‘οΈ OWASP Dependency Check
uses: dependency-check/[email protected]
with:
project: 'EM-Zilla'
path: ./
format: 'HTML'
out: 'reports/'
- name: πŸ“€ Upload Security Report
uses: actions/upload-artifact@v4
with:
name: security-reports
path: |
reports/
*.sarif
retention-days: 90