Skip to content

Commit 5a0ac10

Browse files
committed
fix: fix the code scanning
1 parent 8c0b06c commit 5a0ac10

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/pre_check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
actions: read
18+
checks: write
19+
pull-requests: read
20+
1521
jobs:
1622
lint:
1723
runs-on: ubuntu-latest
@@ -23,7 +29,7 @@ jobs:
2329
uses: ./.github/actions/setup
2430

2531
- name: Run golangci-lint
26-
uses: golangci/golangci-lint-action@v6
32+
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 #v6
2733
with:
2834
install-mode: goinstall
2935
version: latest

auth/veauth/ark_veauth.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func GetArkToken(region string) (string, error) {
103103

104104
firstApiKeyId := listResp.Result.Items[0].ID
105105
log.Println("By default, VeADK fetches the first API Key in the list.")
106-
log.Printf("Try to fetch ARK API Key with id=%d, name=%s\n", firstApiKeyId, listResp.Result.Items[0].Name)
107106

108107
// GetRawApiKey
109108
req2 := ve_sign.VeRequest{
@@ -138,11 +137,7 @@ func GetArkToken(region string) (string, error) {
138137
return "", fmt.Errorf("failed to get ARK api key: key not found in response")
139138
}
140139

141-
if len(apiKey) >= 8 {
142-
log.Printf("Successfully fetched ARK API Key (starts with %s).\n", apiKey[:8])
143-
} else {
144-
log.Println("Successfully fetched ARK API Key.")
145-
}
140+
log.Println("Successfully fetched ARK API Key.")
146141

147142
return apiKey, nil
148143
}

0 commit comments

Comments
 (0)