## Formal Verification - Add TLA+ specs for UTXO conservation (formal/tla/UTXOConservation.tla) - Add TLA+ specs for GHOSTDAG ordering (formal/tla/GHOSTDAGOrdering.tla) - Add mathematical proof of DAA convergence (formal/proofs/) - Document Kani verification approach (formal/kani/) ## Bug Bounty Program - Add SECURITY.md with vulnerability disclosure process - Add docs/BUG_BOUNTY.md with $500-$100,000 reward tiers - Define scope, rules, and response SLA ## Web Wallet Dilithium3 WASM Integration - Build WASM module via Docker (498KB optimized) - Add wasm-crypto.ts lazy loader for Dilithium3 - Add createHybridSignatureLocal() for full client-side signing - Add createHybridSignatureSmart() for auto-mode selection - Add Dockerfile.wasm and build scripts ## Security Review ($0 Approach) - Add .github/workflows/security.yml CI workflow - Add deny.toml for cargo-deny license/security checks - Add Dockerfile.security for audit container - Add scripts/security-audit.sh for local audits - Configure cargo-audit, cargo-deny, cargo-geiger, gitleaks
54 lines
1.6 KiB
Text
54 lines
1.6 KiB
Text
# Dockerfile for building synor-crypto-wasm WASM module
|
|
# Produces optimized WASM binaries for web wallet integration
|
|
|
|
# =============================================================================
|
|
# Stage 1: Build WASM Module
|
|
# =============================================================================
|
|
FROM rust:1.85-bookworm AS builder
|
|
|
|
# Install wasm-pack and build dependencies
|
|
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && \
|
|
apt-get update && apt-get install -y \
|
|
cmake \
|
|
clang \
|
|
libclang-dev \
|
|
pkg-config \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Copy manifests (for caching)
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY crates/ crates/
|
|
|
|
# Build WASM module for bundlers (Vite/Webpack)
|
|
WORKDIR /app/crates/synor-crypto-wasm
|
|
RUN wasm-pack build \
|
|
--target bundler \
|
|
--out-dir /output/pkg \
|
|
--out-name synor_crypto \
|
|
--release
|
|
|
|
# Also build for direct web import (no bundler)
|
|
RUN wasm-pack build \
|
|
--target web \
|
|
--out-dir /output/pkg-web \
|
|
--out-name synor_crypto \
|
|
--release
|
|
|
|
# =============================================================================
|
|
# Stage 2: Output Stage (minimal image with just the artifacts)
|
|
# =============================================================================
|
|
FROM alpine:3.19 AS output
|
|
|
|
# Copy WASM artifacts
|
|
COPY --from=builder /output /wasm-output
|
|
|
|
# Create a simple script to copy files out
|
|
RUN echo '#!/bin/sh' > /copy-wasm.sh && \
|
|
echo 'cp -r /wasm-output/* /dest/' >> /copy-wasm.sh && \
|
|
chmod +x /copy-wasm.sh
|
|
|
|
# Default: list what's available
|
|
CMD ["ls", "-la", "/wasm-output/pkg"]
|