-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[StepSecurity] Apply security best practices (#6853)
Signed-off-by: StepSecurity Bot <[email protected]>
- Loading branch information
1 parent
ec03879
commit 8d2b2a8
Showing
6 changed files
with
73 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Test with Race Detector | ||
run: CGO_ENABLED=1 make ci-go-race-detector | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -30,14 +30,14 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- id: go_version | ||
name: Read go version | ||
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT | ||
|
||
- name: Install Go (${{ steps.go_version.outputs.go_version }}) | ||
uses: actions/setup-go@v5 | ||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version: ${{ steps.go_version.outputs.go_version }} | ||
|
||
|
@@ -49,7 +49,7 @@ jobs: | |
run: find ast/testdata/fuzz ! -name '*.stmt' ! -type d -print -exec cat {} \; | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -62,7 +62,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Benchmark Test Golang | ||
run: make ci-go-perf | ||
|
@@ -71,7 +71,7 @@ jobs: | |
DOCKER_RUNNING: 0 | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -84,14 +84,14 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Vendor without proxy | ||
run: make check-go-module | ||
timeout-minutes: 30 | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -104,14 +104,14 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code # needed for .trivyignore file | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- run: "docker pull openpolicyagent/opa:edge-static" | ||
|
||
# Equivalent to: | ||
# $ trivy image openpolicyagent/opa:edge-static | ||
- name: Run Trivy scan on image | ||
uses: aquasecurity/[email protected] | ||
uses: aquasecurity/trivy-action@7c2007bcb556501da015201bcba5aa14069b74e2 # 0.23.0 | ||
with: | ||
image-ref: 'openpolicyagent/opa:edge-static' | ||
format: table | ||
|
@@ -121,7 +121,7 @@ jobs: | |
severity: CRITICAL,HIGH | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -134,12 +134,12 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
# Equivalent to: | ||
# $ trivy fs . | ||
- name: Run Trivy scan on repo | ||
uses: aquasecurity/[email protected] | ||
uses: aquasecurity/trivy-action@7c2007bcb556501da015201bcba5aa14069b74e2 # 0.23.0 | ||
with: | ||
scan-type: fs | ||
format: table | ||
|
@@ -149,7 +149,7 @@ jobs: | |
severity: CRITICAL,HIGH | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
@@ -161,21 +161,21 @@ jobs: | |
name: Go vulnerability check | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- id: go_version | ||
name: Read go version | ||
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT | ||
|
||
- name: Install Go (${{ steps.go_version.outputs.go_version }}) | ||
uses: actions/setup-go@v5 | ||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version: ${{ steps.go_version.outputs.go_version }} | ||
|
||
- run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||
- run: govulncheck ./... | ||
|
||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }} | ||
if: ${{ failure() && env.SLACK_WEBHOOK_URL }} | ||
|
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.