-
Notifications
You must be signed in to change notification settings - Fork 3
Semgrep Integration #571
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
base: master
Are you sure you want to change the base?
Semgrep Integration #571
Changes from all commits
9975ca1
f2c6933
622a637
0f1d0d7
adbeead
a5a0c49
fdfa073
9302f3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: SecurityChecks | ||
| on: | ||
| pull_request: {} | ||
| push: | ||
| branches: ["master"] | ||
| schedule: | ||
| - cron: '30 20 * * *' | ||
| jobs: | ||
| semgrep: | ||
| name: Scan | ||
| runs-on: [ubuntu-latest] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: returntocorp/semgrep-action@v1 | ||
| with: | ||
| publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
| publishDeployment: 339 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| workflow_status: | ||
| runs-on: [ ubuntu-latest ] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Github action should use self hosted runner insted of the github provided runners Click a link below to tell your Security Team if this comment was: This comment is advisory. You do not need to address it before merging this pull request. |
||
| name: Update Status Check | ||
| needs: [ semgrep ] | ||
| if: always() | ||
| env: | ||
| githubCommit: ${{ github.event.pull_request.head.sha }} | ||
| steps: | ||
| - name: Set github commit id | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "push" ] || "${{ github.event_name }}" = "schedule" ]; then | ||
| echo "githubCommit=${{ github.sha }}" >> $GITHUB_ENV | ||
| fi | ||
| exit 0 | ||
| - name: Failed | ||
| id: failed | ||
| if: (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && github.ref != 'refs/heads/master' | ||
| run: | | ||
| echo 'Failing the workflow for github security status check.' | ||
| curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \ | ||
| -d '{ "state" : "failure" , "context" : "github/security-status-check" , "description" : "github/security-status-check", "target_url" : "https://github.com/${{ github.repository }}" }' \ | ||
| https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.githubCommit }} | ||
| exit 1 | ||
| - name: Success | ||
| if: steps.failed.conclusion == 'skipped' || github.ref != 'refs/heads/master' | ||
| run: | | ||
| echo 'Status check has passed!' | ||
| curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \ | ||
| -d '{ "state" : "success" , "context" : "github/security-status-check" , "description" : "github/security-status-check", "target_url" : "https://github.com/${{ github.repository }}" }' \ | ||
| https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.githubCommit }} | ||
| exit 0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .github/workflows/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github action should use self hosted runner insted of the github provided runners
Click a link below to tell your Security Team if this comment was:
👍 useful
👎 not useful (false positive)
🤔 confusing
This comment is advisory. You do not need to address it before merging this pull request.
(non-self-hosted-runner in OrgWideCustomRules)