RepositoryPython
ChiefGyk3D

ChiefGyk3D/Clouds-Against-Humanity

Learn cloud security by building it! An open-source homelab teaching Zero Trust, DevSecOps, IaC, and cloud architecture from the ground up.

4.6ksao
303fork
104issue
17lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: homelab

#1 Repository của ngày

1
TINIX TRENDING·Chủ đề: gcp

#1 Repository của ngày

1
TINIX TRENDING·Chủ đề: cloud-computing

#1 Repository của ngày

Clouds Against Humanity

A small, cheap, locked-down DigitalOcean environment built with OpenTofu, applied by Spacelift, fed secrets by Doppler, and reachable only through Twingate. No droplet has a single public inbound port open. There is no VPN, no bastion host and no SSH on the internet.

It is a cloud extension of a homelab and a teaching repository at the same time: every stage is costed and approved before it runs, and every decision is written down with the reason for it, including the ones that were wrong the first time.

Read the wiki for flowcharts and the what and why of every component. The same pages live in docs/wiki/ if you prefer reading them in the repo.

How it fits together

flowchart LR
    you["You<br/>Twingate client"]:::you
    tg["Twingate<br/>controller + relays"]:::ctrl
    subgraph do["DigitalOcean VPC (tor1)"]
        ca["connector a"]:::cloud
        cb["connector b"]:::cloud
    end
    net["Public internet"]:::ext
    subgraph cp["Control plane"]
        gh["GitHub PR + CI"]:::ctrl
        sl["Spacelift<br/>plan, human confirms, apply"]:::ctrl
        dp["Doppler<br/>every secret"]:::secret
    end
    you -- "per-resource access" --> tg
    ca -- "outbound only" --> tg
    cb -- "outbound only" --> tg
    you == "end-to-end encrypted" ==> ca
    net -. "no inbound rule exists" .-x do
    gh --> sl
    dp -- "read-only token" --> sl
    sl -- "OpenTofu" --> do

    classDef you fill:#132a1f,stroke:#4ade80,color:#dcfce7
    classDef ext fill:#3b1d1d,stroke:#f87171,color:#fde2e2
    classDef ctrl fill:#1e1b3a,stroke:#a78bfa,color:#ede9fe
    classDef cloud fill:#0f2a3d,stroke:#38bdf8,color:#e0f2fe
    classDef secret fill:#3a2a0f,stroke:#fbbf24,color:#fef3c7
PieceJobWhy this and not the obvious alternative
Twingate (ZTNA)Gets an authenticated person to one specific host and portConnectors dial out, so nothing listens on the internet. A VPN would mean a public listener and network-wide access after one login. More
DigitalOceanDroplets, VPC, cloud firewallsPredictable pricing and a firewall that attaches by tag, so a droplet is protected from its first boot. More
OpenTofuEvery resource as code, in layered stacksOpen-source (MPL) Terraform fork; same language, no license surprise. More
SpaceliftRuns plan and apply, holds state, waits for a humanNothing applies from a laptop or from CI, and pull request plans never see credentials. More
DopplerHolds every secretSpacelift holds one read-only token; nothing in this repo is a credential. More
GitHub ActionsTests, scanners, cost gateCalls hardened shared workflows, every action pinned by commit. More

Why not just a VPN?

Because a remote-access VPN authenticates you once and then puts your device on the network, and the box doing that authentication has to listen on the internet. Both halves of that have been the starting point of serious breaches: stolen credentials on a legacy single-factor VPN profile (Colonial Pipeline, 2021) and a long run of pre-authentication exploits in VPN appliances from Ivanti, Fortinet, Palo Alto, Citrix and Pulse Secure. ZTNA checks every connection against a per-resource policy and, as built here, leaves nothing listening at all.

That is not "VPNs are always wrong". WireGuard is a very different animal from an SSL VPN appliance, site-to-site tunnels are still fine, and ZTNA means trusting a vendor's control plane. The full argument, sources and the honest tradeoffs are on Why ZTNA and not a VPN.

Status

StageWhatMonthlyStatus
0Foundation: project, VPC, baseline firewall with zero inbound rules$0Built
1Access: two Twingate connectors, connector firewall, per-host SSH resources$12Built
2Logs to the on-prem SIEM, cloud-to-home accessPlanned
3Workload host: Portainer, five daemons, Discord-to-Matrix bridge, Spaces bucket, Functionsest. $17Planned
4Grafana, on-premPlanned

Working ceiling: $30 per month across stages 0 to 4. A cost gate in CI fails any change that raises the planned total above the approved total. See the roadmap.

Layout

Clouds-Against-Humanity/
  stacks/00-foundation/                    project, tag, VPC, baseline firewall
  stacks/10-access/                        site, SSH key lookup, two connectors, connector firewall, group, SSH resources
  modules/vpc/                             per-region VPC
  modules/firewall/                        tag-based deny-inbound firewall
  modules/twingate-connector/              connector, its tokens, its droplet and cloud-init
  scripts/cost_check.py                    cost gate
  scripts/spacelift/doppler-env.sh         hook that loads Doppler secrets into a run
  scripts/gen-wiki.sh                      writes the wiki pages from docs/wiki (the Wiki workflow publishes them)
  tests/                                   pytest for the cost gate, the hook and the wiki generator
  .spacelift/config.yml                    which secrets each stack loads
  .github/workflows/ci.yml                 GYST callers only (tofu, python, security) + CI green
  .github/workflows/wiki.yml               publishes docs/wiki through GYST's wiki-publish.yml
  .spacelift/policies/                     Spacelift push policy and its OPA tests
  docs/wiki/                               the wiki pages (source of truth)
  docs/stages/                             operator guides: decisions, verify, rollback, per stage
  docs/cost.md, docs/cost-prices.json      cost gate explained, price table
  docs/spacelift-secrets.md                how secrets reach a run, rotation, upgrades

Modules are reusable building blocks. Stacks are the things you actually apply, one Spacelift stack each. Each module and stack has its tests in <module or stack>/tests/*.tftest.hcl.

Run the checks

Install OpenTofu 1.8 or newer, Python 3 and, for the policy tests, OPA 1.21.0, then:

# cost gate: totals the planned resources and compares with docs/stages/approved.json
python3 -I scripts/cost_check.py --root .

# tests for the cost gate, the Doppler hook and the wiki generator (needs a virtualenv with pytest installed)
python3 -I -m pytest tests -q

# tests for the Spacelift push policy
opa test .spacelift/policies -v

# tests for one module or stack (no cloud account needed, providers are mocked)
tofu -chdir=modules/firewall init -backend=false
tofu -chdir=modules/firewall test

Run the last pair for each of modules/vpc, modules/firewall, modules/twingate-connector, stacks/00-foundation and stacks/10-access. CI runs all of it through git-your-ship-together's shared workflows; this repository has no CI job of its own.

Documentation

ForRead
Learning how and why it worksThe wiki (start at Home)
New to cloud, Terraform, zero trust or CIStart here if you are new, then the eight start-from-zero primers it links
Building or operating a stageStage 0: foundation, Stage 1: access
Secrets, rotation, troubleshooting runsSpacelift and Doppler secrets
The moneyCost
What could go wrongThreat model, Lessons learned

The wiki is generated from docs/wiki/, so corrections go in as pull requests and get the same review and secret scanning as the code. The Wiki workflow publishes them on every merge to main.

Public by design

This repository is public from its first commit, so the GitHub code-scanning and dependency-review checks run in CI. Everything that varies per person or per account (tokens, tenant names, user ids, address ranges you do not want shared) is a Doppler variable, not a file. If a piece ever cannot meet that rule, it moves to a separate private repository and this one calls it.

Secrets

Secrets live in Doppler; nothing in this repository is a credential. Spacelift holds one read-only Doppler token and fetches the rest at run time; see Spacelift and Doppler secrets for how that works and how to rotate it.

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryGo
pulumi/pulumi

Pulumi - Infrastructure as Code in any programming language 🚀

26.0k
Nov 30, 2026
RepositoryPython
bridgecrewio/checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.

9.2k
Nov 30, 2026
RepositoryPython
nccgroup/ScoutSuite

Multi-Cloud Security Auditing Tool

7.9k
Sep 23, 2025
RepositoryPython
cloud-custodian/cloud-custodian

Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources

6.1k
Nov 25, 2026
RepositoryGo
getsops/sops

Simple and flexible tool for managing secrets

23.9k
Nov 30, 2026
RepositoryGo
infracost/infracost

Cloud cost intelligence for engineers, AI coding agents, and CI/CD 💰📉 Shift FinOps Left!

12.6k
Dec 1, 2026
RepositoryGo
google/go-cloud

The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.

9.9k
Nov 30, 2026
RepositoryGo
mlabouardy/komiser

Open-source cloud-environment inspector. Supporting AWS, GCP, Azure, and more! Your cloud resources will have nowhere to hide!

4.2k
Sep 10, 2026
Repository
4ndersonLin/awesome-cloud-security

🛡️ Awesome Cloud Security Resources ⚔️

2.5k
Mar 17, 2026