Skip to content

CowDogMoo/warpgate

Repository files navigation

Warp Gate

License Go Report Card 🚨 CodeQL Analysis 🚨 Semgrep Analysis Pre-Commit Renovate

Warp Gate Logo

Warp Gate employs Blueprints, YAML configurations that define the provisioning logic for creating Odysseys. These can be either multi-architecture container images or AWS Golden Images, serving a variety of use cases from security simulations to rapid deployment. Odysseys offer a broad spectrum of applications, including, but not limited to:

  1. Security Simulations:

    • Golden images pre-configured with vulnerabilities for penetration testing or cyber range exercises.
    • Container images with specific configurations for simulating attack scenarios.
  2. Development and Testing:

    • Container images ensure consistent environments across development, staging, and production, reducing compatibility issues.

    • Golden images provide a standardized base for development and testing, ensuring uniformity.

  3. Rapid Deployment and Scaling:

    • Container images facilitate quick deployment and scaling in microservices architectures.
    • Golden images allow for rapid VM deployments with pre-installed configurations.
  4. Disaster Recovery:

    • Golden images enable quick service restoration through pre-configured VMs.
    • Container images ensure minimal downtime by facilitating rapid redeployment.
  5. Immutable Infrastructure:

    • Container images support deploying immutable infrastructures where updates are made by replacing containers.
    • Golden images help in setting up immutable servers that are frequently recycled and redeployed.

Getting Started

  1. Download and install the gh cli tool.

  2. Clone the repo:

    gh repo clone CowDogMoo/warpgate
    cd warpgate
  3. Get latest warpgate release:

    OS="$(uname | python3 -c 'print(open(0).read().lower().strip())')"
    ARCH="$(uname -a | awk '{ print $NF }')"
    gh release download -p "*${OS}_${ARCH}.tar.gz"
    tar -xvf *tar.gz

Usage

Warp image from existing blueprint

This example will create a container image using the existing attack-box blueprint and the attack-box playbook found in the cowdogmoo.workstation collection.

wg imageBuilder \
  -b attack-box \
  -p ~/cowdogmoo/ansible-collection-workstation

This next example will create a container image using the existing runzero-explorer blueprint and the runzero-explorrer ansible playbook playbook found in the cowdogmoo.workstation collection.

Additionally, a $GITHUB_TOKEN is provided for the commit and push operations.

wg imageBuilder \
  -b runzero-explorer \
  -p ~/cowdogmoo/ansible-collection-workstation \
  -t $GITHUB_TOKEN

Create new blueprint skeleton

Create a new blueprint called new-blueprint that builds a regular and a systemd-based container using kalilinux/kali-rolling:latest and cisagov/docker-kali-ansible:latest as the base images.

NAME=yourusername
IMG_NAME=yourcontainerimagename

wg blueprint create new-blueprint \
    --systemd \
    --base kalilinux/kali-rolling:latest,cisagov/docker-kali-ansible:latest \
    --tag $NAME/$IMG_NAME:latest

Be sure to add provisioning logic to blueprints/new-blueprint/scripts/provision.sh and address any relevant TODOs in config.yaml.


Additional Documentation