- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing - Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives - Added LRU caching system for address validation with 10-minute TTL - Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures - Fixed duplicate function declarations and import conflicts across multiple files - Added error recovery mechanisms with multiple fallback strategies - Updated tests to handle new validation behavior for suspicious addresses - Fixed parser test expectations for improved validation system - Applied gofmt formatting fixes to ensure code style compliance - Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot - Resolved critical security vulnerabilities in heuristic address extraction - Progress: Updated TODO audit from 10% to 35% complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
66 lines
1.7 KiB
Bash
Executable File
66 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run CI pipeline inside a container (for isolation)
|
|
# Usage: ./scripts/ci-container.sh [quick|dev|full]
|
|
|
|
set -euo pipefail
|
|
|
|
MODE="${1:-dev}"
|
|
|
|
case $MODE in
|
|
quick)
|
|
echo "🐳 Running Quick CI in Container..."
|
|
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true -e HARNESS_SKIP_MATH_AUDIT=true -e HARNESS_SKIP_SECURITY=true"
|
|
;;
|
|
dev)
|
|
echo "🐳 Running Development CI in Container..."
|
|
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
|
;;
|
|
full)
|
|
echo "🐳 Running Full CI in Container (no Docker build)..."
|
|
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [quick|dev|full]"
|
|
echo " quick - Fast validation (30-60s)"
|
|
echo " dev - Development pipeline (1-2min)"
|
|
echo " full - Complete validation except Docker (2-3min)"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Check for container runtime
|
|
if command -v podman >/dev/null 2>&1; then
|
|
RUNTIME="podman"
|
|
elif command -v docker >/dev/null 2>&1; then
|
|
RUNTIME="docker"
|
|
else
|
|
echo "❌ Error: Neither podman nor docker found"
|
|
echo "Install with: sudo apt install podman"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Using container runtime: $RUNTIME"
|
|
echo ""
|
|
|
|
# Create cache directories for performance
|
|
mkdir -p .gocache .gomodcache
|
|
|
|
# Run pipeline in container
|
|
$RUNTIME run --rm \
|
|
-v "$(pwd)":/workspace \
|
|
-v "$(pwd)/.gocache":/root/.cache/go-build \
|
|
-v "$(pwd)/.gomodcache":/go/pkg/mod \
|
|
-w /workspace \
|
|
$SKIP_FLAGS \
|
|
golang:1.25-alpine \
|
|
sh -c "
|
|
echo 'Installing CI tools...' &&
|
|
apk add --no-cache git make bash curl &&
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest &&
|
|
echo 'Running pipeline...' &&
|
|
./harness/local-ci-pipeline.sh
|
|
"
|
|
|
|
echo ""
|
|
echo "✅ Container CI completed successfully!"
|
|
echo "📊 Check reports in: harness/reports/" |