Skip to content

Commit

Permalink
Snyk and Sonar.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vivek28058 authored Oct 24, 2024
1 parent a9e1b1b commit 13e237b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/Snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,28 @@ jobs:
- name: BDD test
run: npm run test:bdd

## Snyk integration

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/maven@master
continue-on-error: true
env:
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}}

## Sonar Cloud Integration

- name: Install SonarCloud Scanner
run: npm install -g sonar-scanner

- name: Run SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # SonarCloud token stored as a GitHub secret
run: |
sonar-scanner \
-Dsonar.projectKey=your_project_key \
-Dsonar.organization=your_organization_key \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}

0 comments on commit 13e237b

Please sign in to comment.