-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Fan Shang Xiang <[email protected]>
- Loading branch information
1 parent
debe0f5
commit e4e76ce
Showing
9 changed files
with
161 additions
and
100 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
name: Static check scanner - azclient | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master, 'release-**' ] | ||
paths: | ||
- '.github/workflows/staticcheck-azclient.yaml' | ||
- 'pkg/azclient/**.go' | ||
pull_request: | ||
branches: [ master, 'release-**' ] | ||
paths: | ||
- '.github/workflows/staticcheck-azclient.yaml' | ||
- 'pkg/azclient/**.go' | ||
schedule: | ||
- cron: '0 1 * * *' | ||
permissions: | ||
contents: read | ||
jobs: | ||
build: | ||
permissions: | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
pull-requests: write # for actions/dependency-review-action to comment on PRs | ||
checks: write # forgolangci/golangci-lint-action to annotate the code | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Setup Golang | ||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@0adbc47a5910e47adb692df88187ec8c73c76778 # v6.4.0 | ||
with: | ||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | ||
version: v1.64 | ||
args: -v | ||
install-mode: goinstall | ||
working-directory: './pkg/azclient' | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 | ||
with: | ||
show-openssf-scorecard: true | ||
comment-summary-in-pr: always | ||
- name: Run Trivy vulnerability scanner in repo mode | ||
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master | ||
with: | ||
scan-type: 'fs' | ||
format: 'sarif' | ||
output: 'aclient-results.sbom.json' | ||
scan-ref: './pkg/azclient' | ||
env: | ||
TRIVY_SKIP_DB_UPDATE: true | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'aclient-results.sarif' |
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