Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update and rename synk-sls.yml to synk.yml #13

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 4 additions & 28 deletions .github/workflows/synk-sls.yml → .github/workflows/synk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,39 +72,15 @@ jobs:
- name: Build a Docker image
run: docker build --no-cache -f ./Dockerfile --build-arg NPM_TOKEN=${{ secrets.NPM_INSTALL_TOKEN }} --build-arg BUILD_VERSION=$BUILD_VERSION -t ncats/smartgraph_api:$BUILD_VERSION .

# Step 5: Run Snyk to check Docker image for vulnerabilities
# Step 5: Run Snyk to check Docker image for vulnerabilities
- name: Run Snyk to check Docker image for vulnerabilities
continue-on-error: true
uses: snyk/actions/docker@master
id: docker-image-scan
env:
SNYK_TOKEN: ${{ secrets.SNYK_CLI }}
ACTIONS_STEP_DEBUG: true
with:
command: monitor
image: ncats/smartgraph_api:$BUILD_VERSION
args: --sarif-file-output=snyk.sarif --file=Dockerfile

- name: Replace security-severity undefined for license-related findings
continue-on-error: true
run: |
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarif

# Step 6: Upload result to GitHub Code Scanning
- name: Upload result to GitHub Code Scanning
# continue-on-error: true
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif

# Step 7: Generate Security Report
- name: Generate Security Report
uses: rsdmike/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
sarifReportDir: .
# Step 8: Uploads artifacts (PDF reports) generated during the workflow to download.
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: reports
path: ./*.pdf
args: --file=Dockerfile
Loading