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

feat: [SRE-826] add GH action and CI workflows #2

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

willstord
Copy link
Contributor

@willstord willstord commented Jun 20, 2024

Adding GH Action to support SRE-826 . Output sample slack notification and github PR comment in comment section in jira ticket.

@willstord willstord requested a review from a team June 20, 2024 15:51
Comment on lines +72 to +78
- name: Upload Trivy Report as PR Comment and parse Critical vulnerabilities
id: trivy_report_notification
if: steps.trivy_scan.outcome == 'failure' && inputs.github-token != ''
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
SCAN_TYPE: ${{ inputs.scan-type }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified by using the Trivy SARIF output and uploading it to GitHub security scanning. That will give native alerts and CI status for anything reported, which should plug into any code security software we setup later down the line.

https://aquasecurity.github.io/trivy/v0.28.1/docs/vulnerability/examples/report/#sarif
https://github.com/github/codeql-action/blob/main/upload-sarif/action.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btkostner I saw this option but didn't see that we GH advanced security license for this to work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good call. Looks like we don't have it. I've only ever used it in public repos so I didn't know it was behind a license for enterprise. 👍

@willstord willstord merged commit 5e64a59 into main Jun 20, 2024
1 check passed
@willstord willstord deleted the SRE-826 branch June 20, 2024 18:49
willstord pushed a commit that referenced this pull request Jun 20, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>1.1.0</summary>

##
[1.1.0](v1.0.0...v1.1.0)
(2024-06-20)


### Features

* [SRE-826] add GH action and CI workflows
([#2](#2))
([5e64a59](5e64a59))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

[SRE-826]:
https://stord.atlassian.net/browse/SRE-826?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants