Skip to content

Commit 75c01db

Browse files
authored
sync(ci): update tool versions and add fuzz config (#103)
1 parent a771847 commit 75c01db

File tree

11 files changed

+62
-22
lines changed

11 files changed

+62
-22
lines changed

.github/env/00-core.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GO_PRIMARY_VERSION=1.24.x
2929
GO_SECONDARY_VERSION=1.24.x
3030

3131
# Govulncheck-specific Go version for vulnerability scanning
32-
GOVULNCHECK_GO_VERSION=1.25.7
32+
GOVULNCHECK_GO_VERSION=1.26.0
3333

3434
# ================================================================================================
3535
# 📦 GO MODULE CONFIGURATION

.github/env/10-coverage.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ GO_COVERAGE_PROVIDER=internal
3232
CODECOV_TOKEN_REQUIRED=false
3333

3434
# Go Coverage Tool Version
35-
GO_COVERAGE_VERSION=v1.3.1
35+
GO_COVERAGE_VERSION=v1.3.5
3636
GO_COVERAGE_USE_LOCAL=false
3737

3838
# ================================================================================================

.github/env/10-mage-x.env

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# ================================================================================================
3737

3838
# MAGE-X version
39-
MAGE_X_VERSION=v1.20.1
39+
MAGE_X_VERSION=v1.20.4
4040

4141
# For mage-x development, set to 'true' to use local version instead of downloading from releases
4242
MAGE_X_USE_LOCAL=false
@@ -61,17 +61,17 @@ MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea
6161

6262
MAGE_X_GITLEAKS_VERSION=8.30.0
6363
MAGE_X_GOFUMPT_VERSION=v0.9.2
64-
MAGE_X_GOLANGCI_LINT_VERSION=v2.8.0
64+
MAGE_X_GOLANGCI_LINT_VERSION=v2.9.0
6565
MAGE_X_GORELEASER_VERSION=v2.13.3
6666
MAGE_X_GOVULNCHECK_VERSION=v1.1.4
6767
MAGE_X_GO_SECONDARY_VERSION=1.24.x
6868
MAGE_X_GO_VERSION=1.24.x
6969
MAGE_X_MOCKGEN_VERSION=v0.6.0
7070
MAGE_X_NANCY_VERSION=v1.2.0
71-
MAGE_X_STATICCHECK_VERSION=2025.1.1
71+
MAGE_X_STATICCHECK_VERSION=2026.1
7272
MAGE_X_SWAG_VERSION=v1.16.6
7373
MAGE_X_YAMLFMT_VERSION=v0.21.0
74-
MAGE_X_BENCHSTAT_VERSION=v0.0.0-20260112171951-5abaabe9f1bd
74+
MAGE_X_BENCHSTAT_VERSION=v0.0.0-20260211190930-8161c38c6cdc
7575
MAGE_X_MAGE_VERSION=v1.15.0
7676

7777
# ================================================================================================
@@ -102,3 +102,25 @@ MAGE_X_MAGE_VERSION=v1.15.0
102102
# MAGE_X_TEST_EXCLUDE_MODULES=module1,module2
103103
# MAGE_X_TEST_RACE=false
104104
# MAGE_X_VERBOSE=true
105+
106+
# ================================================================================================
107+
# 🧪 FUZZ TEST CONFIGURATION
108+
# ================================================================================================
109+
110+
# Timeout for pre-compiling fuzz test binaries with coverage instrumentation.
111+
# This warms the Go build cache before running individual fuzz tests, preventing
112+
# the first test per package from timing out in projects with large dependency trees.
113+
# Set to "0s" to disable warmup.
114+
MAGE_X_FUZZ_WARMUP_TIMEOUT=5m
115+
116+
# Buffer time added to each fuzz test timeout for setup/teardown overhead
117+
# MAGE_X_FUZZ_BASELINE_BUFFER=90s
118+
119+
# Estimated time per seed during baseline gathering phase
120+
# MAGE_X_FUZZ_BASELINE_OVERHEAD_PER_SEED=500ms
121+
122+
# Minimum timeout for any fuzz test
123+
# MAGE_X_FUZZ_MIN_TIMEOUT=90s
124+
125+
# Maximum timeout cap for fuzz tests
126+
# MAGE_X_FUZZ_MAX_TIMEOUT=30m

.github/env/10-pre-commit.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ GO_PRE_COMMIT_ALL_FILES=true
5252
# 🛠️ TOOL VERSIONS
5353
# ================================================================================================
5454

55-
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.8.0
55+
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.9.0
5656
GO_PRE_COMMIT_FUMPT_VERSION=v0.9.2
5757
GO_PRE_COMMIT_GOIMPORTS_VERSION=latest
5858
GO_PRE_COMMIT_GITLEAKS_VERSION=v8.30.0

.github/env/load-env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ _env_loader_dir() {
2424
[[ "$source" != /* ]] && source="$dir/$source"
2525
done
2626
cd -P "$(dirname "$source")" && pwd
27+
return $?
2728
}
2829

2930
# Main loader logic

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
49+
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -57,7 +57,7 @@ jobs:
5757
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5858
# If this step fails, then you should remove it and run the build manually (see below)
5959
- name: Autobuild
60-
uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
60+
uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
6161

6262
# ℹ️ Command-line programs to run using the OS shell.
6363
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# uses a compiled language
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
70+
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3

.github/workflows/fortress-completion-statistics.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,12 @@ jobs:
538538
LOC_OUTPUT=$(magex metrics:loc json 2>&1 || true)
539539
LOC_FOUND=false
540540
541+
# Save raw JSON for loc-stats artifact (consumed by go-broadcast analytics)
542+
if [[ -n "$LOC_OUTPUT" ]] && echo "$LOC_OUTPUT" | jq empty 2>/dev/null; then
543+
echo "$LOC_OUTPUT" > loc-stats.json
544+
echo "📦 Saved loc-stats.json for artifact upload"
545+
fi
546+
541547
if [[ -n "$LOC_OUTPUT" ]]; then
542548
echo "📋 magex metrics:loc json output:"
543549
echo "$LOC_OUTPUT"
@@ -677,6 +683,14 @@ jobs:
677683
# --------------------------------------------------------------------
678684
# Upload statistics section
679685
# --------------------------------------------------------------------
686+
- name: 📤 Upload LOC Stats JSON
687+
if: always() && hashFiles('loc-stats.json') != ''
688+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
689+
with:
690+
name: loc-stats
691+
path: loc-stats.json
692+
retention-days: 7
693+
680694
- name: 📤 Upload Statistics Section
681695
id: upload-section
682696
if: always()

.github/workflows/fortress-test-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ jobs:
248248
echo "🏁 Running tests with race detection (timeout: $TEST_TIMEOUT)..."
249249
else
250250
TEST_TIMEOUT="${TEST_TIMEOUT_UNIT:-20m}"
251-
TEST_TYPE="unit"
252-
echo "🏁 Running tests without coverage or race detection (timeout: $TEST_TIMEOUT)..."
251+
TEST_TYPE="short"
252+
echo "🏁 Running short tests (skipping integration tests) (timeout: $TEST_TIMEOUT)..."
253253
fi
254254
255255
# magex CI mode auto-detects GitHub Actions and produces structured output

.github/workflows/fortress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ------------------------------------------------------------------------------------
22
# 🏰 GoFortress - Enterprise-grade CI/CD fortress for Go applications
33
#
4-
# Version: 1.7.0 | Released: 2026-02-06
4+
# Version: 1.7.1 | Released: 2026-02-13
55
#
66
# Built Strong. Tested Harder.
77
#

.github/workflows/pull-request-management-fork.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Purpose: Automate labeling, assignment, and welcoming of pull requests for forked PRs.
55
#
6-
# Configuration: All settings are loaded from modular .github/env/ files for
6+
# Configuration: All settings are loaded from modular .github/env/*.env files for
77
# centralized management across all workflows.
88
#
99
# Triggers: Pull request events (opened, reopened, ready for review, closed, synchronize)
@@ -108,7 +108,7 @@ concurrency:
108108
# --------------------------------------------------------------------
109109
# Environment Variables
110110
# --------------------------------------------------------------------
111-
# Note: Configuration variables are loaded from modular .github/env/ files
111+
# Note: Configuration variables are loaded from modular .github/env/*.env files
112112

113113
jobs:
114114
# ------------------------------------------------------------
@@ -117,8 +117,8 @@ jobs:
117117
load-env:
118118
name: 🌍 Load Environment (Base Repo)
119119
runs-on: ubuntu-latest
120-
# Early exit: Skip entire workflow for same-repo PRs (handled by main workflow)
121-
if: github.event.pull_request.head.repo.full_name != github.repository
120+
# Only run for fork PRs - same-repo PRs are handled by pull-request-management.yml
121+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
122122
# No write perms here
123123
permissions:
124124
contents: read
@@ -127,14 +127,14 @@ jobs:
127127
steps:
128128
# ┌─────────────────────────────────────────────────────────────────────┐
129129
# │ SECURITY SCANNERS: This checkout is SAFE despite pull_request_target│
130-
# │ │
131-
# │ Justification: │
130+
#
131+
# │ Justification:
132132
# │ - Only checks out TRUSTED base branch (ref: github.base_ref) │
133133
# │ - NEVER checks out PR head code from untrusted fork │
134134
# │ - Implements recommended two-workflow security pattern │
135135
# │ - Uses sparse checkout (minimal attack surface) │
136136
# │ - No executable code from PR is ever run │
137-
# │ │
137+
#
138138
# │ Pattern: Two-workflow security model (see SECURITY.md) │
139139
# │ References: githubactions:S7631, semgrep:github-actions-checkout │
140140
# └─────────────────────────────────────────────────────────────────────┘
@@ -177,6 +177,8 @@ jobs:
177177
detect-fork:
178178
name: 🔍 Detect Fork PR
179179
runs-on: ubuntu-latest
180+
# Only run for fork PRs - same-repo PRs are handled by pull-request-management.yml
181+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
180182
permissions:
181183
contents: read
182184
outputs:
@@ -478,7 +480,8 @@ jobs:
478480
summary:
479481
name: 📊 Summary
480482
runs-on: ubuntu-latest
481-
if: always()
483+
# Only run for fork PRs, but always show summary regardless of job status
484+
if: always() && github.event.pull_request.head.repo.full_name != github.repository
482485
needs: [load-env, detect-fork, handle-fork, clean-cache]
483486
steps:
484487
- name: 📄 Write summary

0 commit comments

Comments
 (0)