chore(deps): update github-actions #18
Workflow file for this run
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
name: Secrets Scan with Trivy | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.actor, '[bot]') }} # [bot]を含む場合は除外する | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Aqua Security Trivy | |
uses: aquasecurity/[email protected] | |
with: | |
scan-type: fs | |
scan-ref: . # default | |
severity: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL # default | |
scanners: secret | |
output: trivy.txt | |
exit-code: 1 | |
- name: Post PR comments | |
if: failure() | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
URL: ${{ github.event.pull_request.html_url }} | |
run: | | |
sed -i -e '1i ```' -e '$a ```\nこのactionについては [Notion](https://www.notion.so/globisorg/GitHub-dcb884f8df2646df8d8e686bd6290d46) を参照。' trivy.txt | |
gh pr comment -F ./trivy.txt "${URL}" |