Model or dataset
oritera/Cairn avatar
oritera/Cairn

Cairn: an autonomous penetration testing engine given one origin and an open search space

A AI general-purpose state-space search engine, validated first on autonomous penetration testing.

5,187 stars1,034 forksPythonAGPL-3.0

At a glance

What is it?
A general state-space search engine validated on autonomous penetration testing, where the operator supplies the target and the goal and the workers choose everything in between, coordinating only through a shared board. In its local mode the workers are the operator's own coding agents running with the operator's permissions.
Who is it for?
Cairn belongs in a lab, a competition range or a system you own and have written permission to attack. Read the deployment facts before anything else.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 69 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • oritera/Cairn5,187 ★ · +2,452
Star history
Repository2026-09-102026-11-15
oritera/Cairn2.7k5.2k

2,452 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The scope gap: one origin is given and the rest of the search space is chosen at run time

The architecture paragraph is also the risk paragraph, and it is worth reading in that order. The operator supplies an origin, described as a target address and system, and a goal, described as reaching a shell or capturing a flag. Everything between is a search. The documentation says tasks are generated at run time from the graph's current state rather than from predefined job descriptions, that workers have no fixed roles, and that a worker decides what to explore next by reading the whole graph. So the boundary of the engagement is a single address and a success condition, while the actions taken to close the gap are chosen by a model that has never seen your rules of engagement. For a system whose design goal is autonomy, a scope restriction, a dry run and a kill switch are the three controls a reviewer should look for first.

Local mode hands the search to your own coding agents, with your permissions

The second half of that problem is the execution model. In the recommended container mode, each project gets its own worker container with several workers running inside it, and the dispatcher creates and destroys those containers. There is a second mode, selected by one setting, where no container is used at all: workers run directly on the dispatcher host and reuse coding agent command line tools already installed and logged in there, with no API keys to configure. That sounds like a convenience and it is a much larger surface. Those tools are general purpose agents that can read and write files, run commands and reach the network, with whatever account they are logged in as, and this repository is asking them to pursue an objective in an environment nobody has bounded. The supported backends are named as three specific agent tools, and the README is clear that the workers receive only a prompt and return structured output, which describes the interface rather than limiting the tool.

Three primitives and one board, with no roles and no workflows

The engine's internal vocabulary is three nouns, which is unusual and easy to grasp. A fact is a confirmed objective finding written to the board. An intent is a declared direction of exploration that has not been executed yet. A hint is human judgement injected at any moment and absorbed by agents on the next read, which gives an operator a way to steer a run without taking control of it. The board is a graph that grows from the origin toward the goal, with facts as stepping stones and intents as steps into the unknown, and the project's framing is that this shape is not specific to security work: vulnerability research, mathematical proof and competition challenges share the same structure of a clear start, a clear success condition and an unknown path. Workers coordinate only through that shared board, which the README names as stigmergy, with no direct communication between them and no information held back.

The server keeps the graph consistent and the dispatcher is the only writer

The system diagram separates two processes with a narrow division of labour, and the text beneath it is precise about which side does what. The server maintains graph consistency only. The dispatcher reads the graph, schedules tasks, spins up and tears down worker containers, and is described as the sole writer to the protocol, meaning the thing workers report against. The data flow is a read and write interface between them, and the dispatcher additionally connects to the container runtime through the host socket. That last detail is the same one seen in many orchestration tools and it deserves the same note: a process holding the runtime socket can do what the runtime can do, so the dispatcher's own permissions are the ceiling on what any worker can escalate to.

The image installs dependencies from a third-party package mirror, hardcoded

The container build is four meaningful lines and one of them deserves attention. It starts from a Python 3.13 base image published by the Python packaging tool's own project. It copies the project manifest and lock file, runs a frozen sync of dependencies without installing the project itself, and passes an explicit mirror address on that command. It copies the source and runs a second frozen sync, again with the same mirror address. So both dependency installs are redirected to a third-party package index, chosen by the project, with no environment variable to override it and no comment explaining the choice. A frozen lock file means the versions are pinned, which is the right instinct, but pinning still leaves the index that serves them as a decision baked into the image. The image also sets a timezone to a fixed value, which is a small determinism win and a small surprise.

The worker image is pulled for one architecture, so an Apple machine runs it emulated

The setup instructions have a line that decides what your hardware feels like. The worker container image is pulled with an explicit platform flag set to one architecture, so on an Apple machine the worker runs under emulation rather than natively, and everything the workers do pays for it. That is a reasonable default for a competition tool that had to work on whatever machines the teams had, and it is worth knowing before a long run turns slow. The Compose route has one more manual step that is easy to miss: you are told to pull the base image yourself before building. Both setup routes begin by pulling the worker image:

bash
docker pull --platform=linux/amd64 ghcr.io/oritera/cairn-worker-container:latest

The prerequisites are otherwise modest: macOS or Linux, a Python runtime of a recent version, and Docker only if you want container execution.

The hackathon numbers come with the caveat that the system ran untested

The results section is short and unusually well hedged, which is to its credit. It reports a second edition competition with 610 teams and 1,345 participants from universities and security firms, and gives two numbers: all 54 problems solved, described as the only team to reach the result the project calls AK, and a final ranking of third. Then a quotation underneath does more work than the table. It states that the system had never been tested before the competition, that the full pipeline came online for the first time at four in the morning on race day, and that there was no training, no tuning and no domain-specific tooling, with no protocol tools, no retrieval and no predefined agent roles. Read as evidence, it says the design does not need scaffolding to work under pressure. Read as a caveat, it says none of the numbers come from a system that had been exercised.

A mock configuration and three example configurations sit beside the compose file

The repository root is small and tells you how the project expects to be run and tested. There is a source directory, a container directory, a documentation directory, an image build file and a Compose file, plus a directory named for the readme sitting next to the readme itself. Configuration is three files: one general example you copy to dispatch.yaml and fill in with your model endpoints and keys, one local-mode example, and a mock configuration. The health check on the server is equally plain: an ordinary request to a projects endpoint on the loopback address, retried twelve times, with the server started listening on all interfaces and with access logging switched off.

Editorial conclusion

Cairn belongs in a lab, a competition range or a system you own and have written permission to attack. Read the deployment facts before anything else. The operator supplies one origin and the workers generate their own tasks from the graph's current state, so what gets touched is decided at run time rather than declared in advance. In the local mode the workers are general coding agents already logged in on your machine, which means the tool inherits their permissions rather than a least privilege set. The hackathon result in the README is real evidence that the pipeline works under time pressure, and it is also the project describing its own system as untested until that morning.

Frequently asked questions

What is Cairn?

A general-purpose problem-solving engine built on a blackboard architecture with an explicit graph of facts, intents and hints. Given an origin and a goal it searches for a path through an unknown state space, and autonomous penetration testing is the domain it has been validated on. Workers run an observe, orient, decide, act loop and coordinate only through the shared board.

Do I need written authorisation before running Cairn?

You should only run it against systems you own or have explicit written permission to test. The project does not provide the controls to enforce that for you: the operator supplies one origin, workers generate their own tasks from the graph's state at run time, and no target allow list, dry run or abort control is described in the documentation.

Which agent backends does Cairn support?

Three named worker backends. In container execution each project gets its own worker container with several workers running concurrently inside it. In local mode the workers run on the dispatcher host and reuse agent command line tools already installed and logged in there, so no API keys go in the configuration file and the workers inherit that account's permissions.

What did Cairn score at the Tencent Cloud hackathon?

The README reports a second edition challenge with 610 teams and 1,345 participants, in which the system solved 54 of 54 problems, was the only team to reach the result the project calls AK, and finished third overall. It also states the pipeline came online for the first time during the event, with no training, no tuning and no predefined agent roles.

How do I run Cairn?

The Compose route needs the worker image pulled for the amd64 platform, a copy of the example dispatcher configuration filled in with endpoints and keys, and a manual pre-pull of the base image before building. The manual route runs the server and the dispatcher as two commands under Python 3.12 or newer, and Docker is needed only for container execution.

What does the Cairn container image do when it builds?

It starts from a Python 3.13 base image, syncs dependencies twice with the lock file frozen, and passes a third-party package mirror address on both syncs, so the index that serves dependencies is fixed in the image rather than configurable. It also sets the timezone to a fixed value.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. oritera/Cairn on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/oritera-cairn.svg)](https://hysenlabs.com/projects/oritera-cairn)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/oritera-cairn.svg)](https://hysenlabs.com/projects/oritera-cairn)

Was this useful?