commit TS change #24
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
name: Truffle Security Secrets Scanner | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: TruffhleHog Secret Scanning | |
id: trufflehog | |
uses: trufflesecurity/trufflehog@main | |
with: | |
extra_args: --only-verified--json | |
continue-on-error: true | |
- name: Save TruffleHog Output | |
run: echo "${{ steps.trufflehog.outputs.json }}" > trufflehog-secrets.json | |
- name: List files | |
run: ls -al | |
- name: Monitor dependencies with Snyk | |
uses: snyk/actions/node@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN_2 }} | |
with: | |
command: auth | |
- name: Monitor TruffleHog identified secrets with Snyk | |
uses: snyk/actions/node@master | |
with: | |
command: monitor --all-projects --json-file=trufflehog-secrets.json | |
continue-on-error: true | |
- name: Upload TruffleHog JSON | |
uses: actions/upload-artifact@v4 | |
with: | |
name: trufflehog-json | |
path: trufflehog-secrets.json | |
#With Enterprise Plan | |
- name: Send results to Snyk | |
run: | | |
curl --request GET \ | |
--url "https://api.snyk.io/rest/orgs/{ORG_ID}/projects?version=2024-06-10" \ | |
--header "Content-Type: application/vnd.api+json" \ | |
--header "Authorization: token API_TOKEN" | |
continue-on-error: true | |