mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-11 04:07:47 +02:00
- Implement cloud provider infrastructure (DigitalOcean, AWS, GCP, Linode, Azure) with Pulumi integration for distributed scanning - Add nmap and tmux utility functions for port scanning results processing and long-running background session management - Introduce webhook-triggered run execution with unique UUID and authentication key support for external integrations
73 lines
2.1 KiB
Docker
73 lines
2.1 KiB
Docker
# Osmedeus Canary Test Dockerfile
|
|
# Multi-stage build that compiles from source and layers onto the toolbox image,
|
|
# ensuring canary tests exercise the CURRENT source code, not the last release.
|
|
|
|
# ── Stage 1: build from source ──────────────────────────────────────────────
|
|
FROM golang:1.26-bookworm AS builder
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -o /osmedeus ./cmd/osmedeus
|
|
|
|
# ── Stage 2: runtime (mirrors Dockerfile.toolbox) ───────────────────────────
|
|
FROM ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
build-essential \
|
|
curl \
|
|
wget \
|
|
git \
|
|
unzip \
|
|
jq \
|
|
bash \
|
|
xz-utils \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
chromium-browser \
|
|
sudo \
|
|
golang-go \
|
|
&& update-ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
|
|
ENV PATH="/root/go/bin:${PATH}"
|
|
ENV GOPATH="/root/go"
|
|
|
|
RUN mkdir -p /root/osmedeus-base /root/workspaces-osmedeus /root/go/bin
|
|
|
|
WORKDIR /root
|
|
|
|
# Copy the source-built binary first so install commands can use it
|
|
COPY --from=builder /osmedeus /root/.local/bin/osmedeus
|
|
COPY --from=builder /osmedeus /root/go/bin/osmedeus
|
|
|
|
ENV PATH="/root/.local/bin:/root/go/bin:/root/osmedeus-base/external-binaries:${PATH}"
|
|
|
|
# Install base workflows, tools, etc.
|
|
RUN osmedeus install base --preset
|
|
|
|
# This is for sast test
|
|
RUN osmedeus install binary --name trivy --name semgrep --name kingfisher --name bearer
|
|
|
|
# This is for general test (probe-dns, recon-http-fp, scan-content)
|
|
RUN osmedeus install binary --name dnsx --name httpx --name puredns --name massdns --name ffuf
|
|
|
|
# Copy the canary entrypoint
|
|
COPY build/docker/canary-entrypoint.sh /usr/local/bin/canary-entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/canary-entrypoint.sh
|
|
|
|
# Verify the source-built binary works
|
|
RUN osmedeus health
|
|
|
|
EXPOSE 8002
|
|
|
|
ENTRYPOINT ["/usr/local/bin/canary-entrypoint.sh"]
|