Files
Redflag/scripts/build-secure-agent.sh
Fimeg ec3ba88459 feat: machine binding and version enforcement
migration 017 adds machine_id to agents table
middleware validates X-Machine-ID header on authed routes
agent client sends machine ID with requests
MIN_AGENT_VERSION config defaults 0.1.22
version utils added for comparison

blocks config copying attacks via hardware fingerprint
old agents get 426 upgrade required
breaking: <0.1.22 agents rejected
2025-11-02 09:30:04 -05:00

24 lines
473 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# RedFlag Agent Build Script
# Builds agent binary (public key fetched from server at runtime)
set -e
echo "🔨 RedFlag Agent Build"
echo "====================="
# Build agent
echo "Building agent..."
cd aggregator-agent
go build \
-o redflag-agent \
./cmd/agent
cd ..
echo "✅ Agent build complete!"
echo " Binary: aggregator-agent/redflag-agent"
echo ""
echo " Note: Agent will fetch the server's public key automatically at startup"