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

Generate and upload Semgrep SARIF report #247

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

ericcornelissen
Copy link
Owner

Relates to #218

Summary

Update the "Check / Semgrep" job to have Semgrep generate an output in SARIF format and upload that to GitHub using github/codeql-action/upload-sarif (which requires the added permissions).

Also don't run Semgrep for PRs by Dependabot as it doesn't have access to secrets.SEMGREP_APP_TOKEN. In turn the semgrep invocation doesn't do anything, as a result of which uploading the SARIF file will fail (leading to an job failure).

Update the "Check / Semgrep" job to have Semgrep generate an output in
SARIF format and upload that to GitHub using
`github/codeql-action/upload-sarif` (which requires the added
permissions).

Also don't run Semgrep for PRs by Dependabot as it doesn't have access
to `secrets.SEMGREP_APP_TOKEN`. In turn the `semgrep` invocation doesn't
do anything, as a result of which uploading the SARIF file will fail
(leading to an job failure).
@ericcornelissen ericcornelissen added the ci Relates to continuous integration label Apr 4, 2023
@github-advanced-security
Copy link

You have successfully added a new Semgrep configuration .github/workflows/check.yml:semgrep. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@ericcornelissen ericcornelissen added the dependencies Relates to the project's dependencies label Apr 4, 2023
@ericcornelissen ericcornelissen merged commit 499e42a into main Apr 4, 2023
@ericcornelissen ericcornelissen deleted the ci-sast-semgrep-sarif branch April 4, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Relates to continuous integration dependencies Relates to the project's dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant