Genesis poisoning:fix/hardening docker entrypoint#13
Conversation
…s validator model, and IPFS-powered data registry map onto the DATU reference architecture and detailed the changes needed across consensus, modules, data anchoring, governance, application, and security layers to reach feature parity
…rint a skip message when secrets are absent, and guard the scan and quality gate steps so they only run when both the token and host URL are available.
… so the workflow can run successfully
…ials, skip analysis when secrets are unavailable, and pass both the token and host URL when present to prevent scanner failures.
…plicit mapping and clarified how to add optional local variables without breaking schema validation.
…ne while having my local sonarqube setup
…rk supplies one, so the upstream pipeline keeps using the key in sonar-project.properties.
…r, DisbursementTracker, AccountabilityScores, and GovernanceVoting—with placeholder AppModule definitions to prepare for future Cosmos SDK wiring. Added baseline genesis structures and key-prefix helpers for each new module so state initialization and store wiring can evolve alongside the DATU roadmap.
…urable genesis download settings, checksum verification, and safer temporary file handling to prevent silent bootstrap tampering. Updated the volunteer onboarding script with fail-fast downloads, optional checksum validation, and cleanup traps so contributors can securely provision nodes from verified genesis data. Documented the identified loopholes, implemented mitigations, and operator follow-up actions in a new security assessment reference.
Genesis Poisoning Proof-of-ConceptThis walkthrough demonstrates how the original bootstrap process (prior to the
Prerequisites
All of these tools are pre-installed in the development container. Running the PoC./genesis_poisoning.shWhat the script does
Expected outputIf you do not see the checksum failure, ensure no other process is bound to What does the attacker gain?The
This is why checksum validation is essential: it is the only way for a node to How a man-in-the-middle fools a new operator
The hardened workflow blocks step 4 by requiring the downloaded file to match ELI5: What happens if the fix is missing?Imagine you're copying a treasure map from a friend. If you never check whether The hardened patch makes you compare the map to a known-good fingerprint before |
Security Assessment Summary
This document captures the primary security weaknesses identified during the review and the remediation steps implemented in this change-set. A hands-on proof-of-concept that recreates the original vulnerability and demonstrates the hardened mitigation is available in
docs/poc/genesis_poisoning.md.1. Insecure Genesis File Bootstrap
Issue
docker-entrypoint.sh) and the volunteer helper script (scripts/join-as-volunteer.sh) downloaded the network genesis file directly from themainbranch without integrity checks.curlinvocations that ignored HTTP errors and offered no tamper detection. Any man-in-the-middle attack, compromised CDN, or unexpected upstream change could silently deliver a malicious genesis file. A poisoned genesis file allows an attacker to modify the validator set or bootstrap nodes onto a hostile fork.Remediation
curl -fSL --retry 3 --retry-delay 2) so HTTP failures surface immediately.GENESIS_URLandGENESIS_SHA256overrides and checksum verification in both scripts.curl,jq, andsha256sumto fail fast when prerequisites are missing.set -euo pipefail, temporary-file handling, and cleanup traps to avoid partial writes.Operator Action Items
GENESIS_SHA256alongside every release and configure the environment variables (or script arguments) accordingly.GENESIS_URLto an immutable tag or release asset rather than a moving branch reference.2. General Operational Guidance
jqandsha256sumstay available in container images.The combination of these mitigations closes the immediate loophole around silent genesis tampering and establishes a clearer operational posture for secure node provisioning.