π± phantom_ci
βοΈ Secure, Headless, Self-Hosted CI Runner
β Zero unnecessary outbound connections
π€ Output to stdout by default (with optional webhooks)
π Built for minimal trust surfaces
π§ Summary
phantom_ci is a fully self-hosted CI runner that detects changes in Git repositories and executes pipeline steps defined in a workflow.toml file.
All execution happens locally, as the user who runs phantom_ci. No external services are contacted unless explicitly configured.
This project was built with isolation and security in mind β specifically to prevent granting inbound or outbound access to unowned servers.
π« Common CI Tradeoffs vs phantom_ci
| Approach | Tradeoff |
|---|---|
| GitHub Actions / SaaS Runners | Inbound access from GitHub into your servers |
| GitHubβs Self-Hosted Runners | Outbound access to GitHub's infra |
| 3rd-party Runners | Implicit outbound connections or exposed APIs |
β
phantom_ci |
No inbound or outbound access required |
π‘οΈ Security Posture
- Workflows are only run from a locally configured branch (
target_branch) - Branch execution config is stored outside the repo, reducing tampering risk
- CLI-based only β no API, no sockets, no network listeners
- Workflow steps are executed via
std::process::Commandwith optional sandboxing
Default target_branch is "master" β configure this explicitly and enforce restrictions via Git to avoid unauthorized command execution.
π¦ Example: $REPO_ROOT/workflow/master.toml
[] # step index must be numeric and define execution order
= "pwd"
[]
= "make build"
[]
= "make deploy"
π Repo Configuration
Monitored repositories are defined in:
~/.config/phantom_ci/Repo.toml
[]
= "https://github.com/helloimalemur/sys-compare"
= "master"
[]
= "https://github.com/helloimalemur/ELKTool"
= "master"
[] # section headers must be unique
= "git@github.com:helloimalemur/ELKTool" # SSH recommended
= "test-branch" # ensure the branch exists
π Webhook Notifications (Optional)
To enable Discord webhook notifications, create a .env file at:
~/.config/phantom_ci/.env
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
Additional options for verbosity and payload formatting are planned.
π Installation
Requires Rust:
βοΈ Usage
# Run normally
# Add repo via HTTPS
# Add repo via SSH (recommended)
# Install systemd service
π‘ Workflow Configuration
Create a workflow.toml at the root of any monitored repo.
Steps are executed in numeric key order.
π£ Development & Contribution
Contributions welcome β PRs encouraged!