generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouples security scanning analysis and add FOSSA
- Loading branch information
1 parent
8e3c8ee
commit 6aa4251
Showing
2 changed files
with
53 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Security Scanning | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
# Run every day at 5am UTC | ||
schedule: | ||
- cron: "0 5 * * *" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
security-action: | ||
name: Security Analysis | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install Snyk | ||
uses: snyk/actions/setup@master | ||
|
||
- name: Snyk VULN and License Check Test | ||
run: snyk test --all-projects --sarif-file-output=snyk.sarif | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
||
- name: Run FOSSA Scan | ||
uses: fossas/fossa-action@main | ||
with: | ||
api-key: ${{ secrets.FOSSA_API_KEY }} | ||
|
||
- name: Run FOSSA Test | ||
uses: fossas/fossa-action@main | ||
with: | ||
api-key: ${{ secrets.FOSSA_API_KEY }} | ||
run-tests: true | ||
|
||
- name: Upload SARIF result to GitHub Code Scanning | ||
uses: github/codeql-action/upload-sarif@v2 | ||
if: always() | ||
with: | ||
sarif_file: snyk.sarif |
This file contains 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