Feature/update actions #82
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🔍 Snyk Security Analysis | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| schedule: | |
| - cron: '30 2 * * 1' # Weekly on Monday | |
| jobs: | |
| snyk: | |
| name: 🔍 Snyk Security Scan | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: 🗄️ Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: 🔧 Restore Dependencies | |
| run: dotnet restore QRCoder.Core.sln | |
| - name: 🏗️ Build Solution | |
| run: | | |
| dotnet build QRCoder.Core.sln \ | |
| --configuration Release \ | |
| --no-restore | |
| - name: 🔍 Run Snyk to check for vulnerabilities | |
| uses: snyk/actions/dotnet@master | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| with: | |
| args: | | |
| --severity-threshold=high | |
| --all-projects | |
| --detection-depth=6 | |
| - name: 📤 Upload Snyk results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v3 | |
| if: always() | |
| with: | |
| sarif_file: snyk.sarif |