Skip to content

Commit c4bb7a0

Browse files
committed
set go to 1.23.6
Signed-off-by: Fan Shang Xiang <[email protected]>
1 parent debe0f5 commit c4bb7a0

File tree

27 files changed

+330
-121
lines changed

27 files changed

+330
-121
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL-azclient"
13+
14+
on:
15+
workflow_dispatch:
16+
push:
17+
branches: [ master ]
18+
paths:
19+
- '.github/workflows/codeql-analysis-azclient.yml'
20+
- 'pkg/azclient/'
21+
pull_request:
22+
# The branches below must be a subset of the branches above
23+
branches: [ master ]
24+
paths:
25+
- '.github/workflows/codeql-analysis-azclient.yml'
26+
- 'pkg/azclient/'
27+
schedule:
28+
- cron: '0 */4 * * *'
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
analyze:
34+
name: Analyze
35+
runs-on: ubuntu-latest
36+
permissions:
37+
actions: read
38+
contents: read
39+
security-events: write
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
language: [ 'go' ]
45+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
46+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
47+
48+
steps:
49+
- name: Harden Runner
50+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
51+
with:
52+
egress-policy: audit
53+
54+
- name: Checkout repository
55+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
- name: Set up Go 1.x
57+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
58+
with:
59+
go-version-file: ./pkg/azclient/go.mod
60+
cache-dependency-path: ./pkg/azclient/go.sum
61+
id: go
62+
63+
# Initializes the CodeQL tools for scanning.
64+
- name: Initialize CodeQL
65+
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
66+
with:
67+
languages: ${{ matrix.language }}
68+
# If you wish to specify custom queries, you can do so here or in a config file.
69+
# By default, queries listed here will override any specified in a config file.
70+
# Prefix the list here with "+" to use these queries and those in the config file.
71+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
72+
73+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
74+
# If this step fails, then you should remove it and run the build manually (see below)
75+
- name: Autobuild
76+
run: |
77+
go test -covermode=count ./pkg/azclient/
78+
79+
80+
- name: Perform CodeQL Analysis
81+
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,24 @@ on:
1616
push:
1717
branches: [ master, 'release-**' ]
1818
paths:
19-
- 'pkg/**.go'
19+
- '.github/workflows/codeql-analysis.yml'
2020
- 'cmd/**.go'
21-
- 'tests/**.go'
21+
- 'pkg/**.go'
2222
- 'go.*'
23-
- 'hack/verify-updates.sh'
2423
- '!vendor/**'
24+
- 'health-probe-proxy/**'
25+
- '!pkg/azclient/'
2526
pull_request:
2627
# The branches below must be a subset of the branches above
2728
branches: [ master, 'release-**' ]
2829
paths:
30+
- '.github/workflows/codeql-analysis.yml'
2931
- 'pkg/**.go'
30-
- 'cmd/**.go'
31-
- 'tests/**.go'
3232
- 'go.*'
3333
- 'hack/verify-updates.sh'
3434
- '!vendor/**'
35+
- 'health-probe-proxy/**'
36+
- '!pkg/azclient/'
3537
schedule:
3638
- cron: '0 */4 * * *'
3739
permissions:
@@ -64,8 +66,8 @@ jobs:
6466
- name: Set up Go 1.x
6567
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
6668
with:
67-
go-version: '>=1.20'
68-
check-latest: true
69+
go-version-file: go.mod
70+
cache-dependency-path: go.sum
6971
id: go
7072

7173
# Initializes the CodeQL tools for scanning.
@@ -82,7 +84,6 @@ jobs:
8284
# If this step fails, then you should remove it and run the build manually (see below)
8385
- name: Autobuild
8486
run: |
85-
make all
8687
go test -covermode=count -coverprofile=profile.cov.tmp ./pkg/...
8788
grep -v mock profile.cov.tmp > profile.cov
8889

.github/workflows/dependency-review.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/lint.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3434
with:
3535
go-version-file: go.mod
36+
cache-dependency-path: go.sum
3637
- name: Build binary
3738
run: |
3839
rm -rf ./bin
@@ -69,7 +70,7 @@ jobs:
6970
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
7071
with:
7172
go-version-file: go.mod
72-
cache: true
73+
cache-dependency-path: go.sum
7374
- name: Build binary for linux
7475
if: matrix.os == 'linux'
7576
run: |
@@ -121,6 +122,7 @@ jobs:
121122
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
122123
with:
123124
go-version-file: go.mod
125+
cache-dependency-path: go.sum
124126
- name: Build binary for linux
125127
if: matrix.os == 'linux'
126128
run: |
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Static check scanner - azclient
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master, 'release-**' ]
7+
paths:
8+
- '.github/workflows/staticcheck-azclient.yaml'
9+
- 'pkg/azclient/'
10+
pull_request:
11+
branches: [ master, 'release-**' ]
12+
paths:
13+
- '.github/workflows/staticcheck-azclient.yaml'
14+
- 'pkg/azclient/'
15+
schedule:
16+
- cron: '0 1 * * *'
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
jobs:
21+
build:
22+
permissions:
23+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
24+
pull-requests: write # for actions/dependency-review-action to comment on PRs
25+
checks: write # forgolangci/golangci-lint-action to annotate the code
26+
name: Build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Harden Runner
30+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
31+
with:
32+
egress-policy: audit
33+
- name: Checkout code
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
- name: Setup Golang
36+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
37+
with:
38+
go-version-file: ./pkg/azclient/go.mod
39+
cache-dependency-path: ./pkg/azclient/go.sum
40+
- name: golangci-lint
41+
uses: golangci/golangci-lint-action@0adbc47a5910e47adb692df88187ec8c73c76778 # v6.4.0
42+
with:
43+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
44+
version: v1.64
45+
args: -v
46+
install-mode: goinstall
47+
working-directory: './pkg/azclient'
48+
- name: 'Dependency Review'
49+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
50+
if: ${{ github.event_name == 'pull_request' }}
51+
with:
52+
show-openssf-scorecard: true
53+
comment-summary-in-pr: always
54+
- name: Run Trivy vulnerability scanner in repo mode
55+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master
56+
with:
57+
scan-type: 'fs'
58+
format: 'sarif'
59+
output: 'aclient-results.sarif'
60+
scan-ref: './pkg/azclient'
61+
env:
62+
TRIVY_SKIP_DB_UPDATE: true
63+
- name: Upload Trivy scan results to GitHub Security tab
64+
uses: github/codeql-action/upload-sarif@v3
65+
with:
66+
sarif_file: 'aclient-results.sarif'

0 commit comments

Comments
 (0)