Skip to content
Merged
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
82c62bc
fix: Update golangci-lint version from v2.5.0 to v2.6.1
osterman Nov 26, 2025
6b7bb74
fix: Update to golangci-lint v2.6.2 and add GITHUB_TOKEN for rate limits
osterman Nov 26, 2025
b7e3300
fix: Add git config to use GITHUB_TOKEN for authenticated clones
osterman Nov 26, 2025
b09cd15
fix: Add git authentication test before custom build
osterman Nov 26, 2025
d1c18a6
fix: Add git safe.directory config and GOFLAGS=-buildvcs=false
osterman Nov 26, 2025
47f216b
Revert to golangci-lint v2.5.0 to match installed binary version
osterman Nov 26, 2025
aecf27a
fix: Fix HOME directory for git operations in GitHub Actions
osterman Nov 26, 2025
946f0c2
Revert to exact working configuration from Nov 25
osterman Nov 26, 2025
8e8129c
debug: Test if git clone works at all in CI environment
osterman Nov 26, 2025
38c8731
debug: Test exact git clone command used by golangci-lint custom
osterman Nov 26, 2025
4043c71
debug: Run golangci-lint custom with verbose output
osterman Nov 26, 2025
480a81b
fix: Pre-configure git advice.detachedHead to work around compatibili…
osterman Nov 26, 2025
2981009
fix: Correct comment - issue is leading space in -c flag
osterman Nov 26, 2025
651e7f8
debug: Test if git version supports advice.detachedHead config
osterman Nov 26, 2025
08d3ab8
fix: Use git wrapper to strip broken -c flag
osterman Nov 27, 2025
a774560
debug: Add logging to git wrapper to diagnose -c flag filtering
osterman Nov 27, 2025
1866a23
fix: Pin golangci-lint to commit with -c flag fix
osterman Nov 27, 2025
8321543
fix: Auto-install gh actions-cache extension in dev commands
osterman Nov 27, 2025
7369a5a
fix: Pin AWS provider to v5.x for LocalStack compatibility
osterman Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,58 @@ jobs:
- name: Build custom golangci-lint with lintroller plugin
run: |
set -e # Exit on any error

# Workaround for golangci-lint custom's broken -c flag usage
# The issue: golangci-lint v2.5.0 passes `-c advice.detachedHead=false`
# (note the leading space before "advice") which git rejects as invalid.
# Solution: Replace /usr/bin/git with wrapper that strips ALL -c flags.
# Since we can't fix the malformed flag, we remove it entirely.
echo "Installing git wrapper to strip broken -c flags from golangci-lint..."

# Backup original git
sudo mv /usr/bin/git /usr/bin/git.real

# Create wrapper that logs arguments for debugging and strips -c flags
sudo tee /usr/bin/git > /dev/null << 'WRAPPER_EOF'
#!/bin/bash
# Log original arguments for debugging
echo "[git wrapper] Original args: $@" >&2

# Filter out -c flags and their values
filtered_args=()
skip_next=false
for arg in "$@"; do
if [ "$skip_next" = true ]; then
echo "[git wrapper] Skipping -c value: '$arg'" >&2
skip_next=false
continue
fi
if [ "$arg" = "-c" ]; then
echo "[git wrapper] Found -c flag, will skip next arg" >&2
skip_next=true
continue
fi
filtered_args+=("$arg")
done

echo "[git wrapper] Filtered args: ${filtered_args[@]}" >&2
exec /usr/bin/git.real "${filtered_args[@]}"
WRAPPER_EOF

sudo chmod +x /usr/bin/git

echo "Git wrapper installed and configured"
echo "Testing wrapper:"
git --version

# Test the -c flag filtering
echo "Testing -c flag filtering:"
git -c test.value=true --version 2>&1 | head -5

# Ensure lintroller module is ready
cd tools/lintroller && go mod tidy && cd ../..

# Build custom golangci-lint with plugins
# Build custom golangci-lint with plugins using our git wrapper
if ! golangci-lint custom; then
echo "Error: golangci-lint custom build failed" >&2
exit 1
Expand Down
Loading