Skip to content

Commit 38b251f

Browse files
committed
Fix failing CI checks
- Add gosec G704/G705 to exclusions (CLI inherently makes HTTP requests to user-configured API URLs) - Bump Go 1.23 → 1.24 to resolve stdlib vulnerabilities flagged by govulncheck - Replace gitleaks-action (requires paid license) with direct gitleaks CLI invocation - Add CodeQL autobuild step between init and analyze
1 parent ca25a59 commit 38b251f

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/security.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ jobs:
2121
- uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
24-
- uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Install gitleaks
25+
run: |
26+
VERSION=$(curl -sL https://api.github.com/repos/gitleaks/gitleaks/releases/latest | jq -r .tag_name)
27+
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/${VERSION}/gitleaks_${VERSION#v}_linux_x64.tar.gz" | tar -xz
28+
sudo mv gitleaks /usr/local/bin/
29+
- name: Run gitleaks
30+
run: gitleaks detect --source . --verbose --config .gitleaks.toml
2731

2832
trivy:
2933
name: Trivy vulnerability scan
@@ -75,4 +79,5 @@ jobs:
7579
with:
7680
languages: go
7781
config-file: .github/codeql/codeql-config.yml
82+
- uses: github/codeql-action/autobuild@v3
7883
- uses: github/codeql-action/analyze@v3

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ linters:
4444
- G501
4545
# File operations on user-provided paths are inherent to a CLI
4646
- G304
47+
# CLI is an HTTP client — requests to user-configured API URLs are expected
48+
- G704
49+
# CLI renders API responses to terminal, not a browser context
50+
- G705
4751
revive:
4852
rules:
4953
- name: blank-imports

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
go = "1.23"
2+
go = "1.24"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/basecamp/fizzy-cli
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/charmbracelet/huh v0.8.0

0 commit comments

Comments
 (0)