-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into iast_scan_skip_schedule_config
- Loading branch information
Showing
30 changed files
with
550 additions
and
43 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Security scan | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
schedule: | ||
- cron: '0 9 * * *' # Same time as CI Cron | ||
|
||
jobs: | ||
build: | ||
name: Trivy Scan | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Install Ruby 3.3 | ||
uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # tag v1.199.0 | ||
with: | ||
ruby-version: 3.3 | ||
|
||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | ||
|
||
- run: bundle # Generate a Gemfile.lock to scan | ||
|
||
- name: Run Trivy in table mode | ||
# Table output is only useful when running on a pull request or push. | ||
if: contains(fromJSON('["push", "pull_request"]'), github.event_name) | ||
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # tag v0.28.0 | ||
with: | ||
scan-type: fs | ||
format: table | ||
exit-code: 1 | ||
ignore-unfixed: true | ||
severity: CRITICAL,HIGH,MEDIUM,LOW | ||
|
||
- name: Run Trivy in report mode | ||
# Only generate sarif when running nightly on the dev branch. | ||
if: ${{ github.event_name == 'schedule' }} | ||
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # tag v0.28.0 | ||
with: | ||
scan-type: fs | ||
format: sarif | ||
output: trivy-results.sarif | ||
ignore-unfixed: true | ||
severity: 'CRITICAL,HIGH,MEDIUM,LOW' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
# Only upload sarif when running nightly on the dev branch. | ||
if: ${{ github.event_name == 'schedule' }} | ||
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # tag v3.27.0 | ||
with: | ||
sarif_file: trivy-results.sarif | ||
|
||
notify_slack_fail: | ||
name: Notify slack fail | ||
needs: [build] | ||
runs-on: ubuntu-22.04 | ||
if: ${{ github.event_name == 'schedule' && failure() }} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | ||
- uses: ./.github/actions/workflow-conclusion | ||
- uses: voxmedia/github-action-slack-notify-build@3665186a8c1a022b28a1dbe0954e73aa9081ea9e # tag v1.6.0 | ||
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }} | ||
with: | ||
channel: ruby-agent-notifications | ||
status: FAILED | ||
color: danger |
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
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
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
Oops, something went wrong.