Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

badgerflow

Latest version: v0.13.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: egakuba
8 Versions
501 Downloads

Scan summary

badgerflow was last scanned on 23 Nov 2026 at version 0.13.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 8 versions; the latest 3 were published within 6 days (18–23 Nov 2026).
  • Findings: No rules fired in version 0.13.0.
  • Downloads: 501 downloads.

Versions

8 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.13.0 LATEST 23 Nov 2026 No rules fired
0.12.0 22 Nov 2026 No rules fired
0.10.0 18 Nov 2026 No rules fired
0.9.0 5 Nov 2026 Not shown
0.8.0 28 Oct 2026 Not shown

No rules fired in 0.13.0

Findings

Findings for v0.13.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.13.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

badgerflow

The Python SDK for building pro-code agents that run as your own service and are governed by BadgerFlow anyway.

You deploy the container. BadgerFlow holds the release, the approval, the guardrail profile, the spend and the audit trail. Your agent never handles a credential and is never called by anyone but the platform.

Install

pip install 'badgerflow[server,langgraph,otel]'

Install the extras the scaffold's Dockerfile will install — server and otel, plus langgraph for bf init --langgraph — before bf init: the lock it writes pins what this interpreter has, and bf lock refuses to write a lock that would leave a requirement unpinned.

The developer guide, the pro-code support matrix and the Helm chart guide ship inside the wheel: bf docs lists them and bf docs developer-guide prints the one for the SDK version you installed (--raw for the Markdown, --path for its location). They describe that version, not a later one.

Help and reporting: bf support prints where to report a problem and bf support bundle writes the redacted report to send with it (bf docs support for the full page). A security problem goes privately to your platform operator's security contact — bf docs security says what counts and what to expect. The SDK's repository is private and the package names no public tracker; those pages ship in the wheel so the route you read is the one for the version you installed.

A LangGraph agent in one command

bf init claims-triage --langgraph
cd claims-triage
bf dev                      # serve it locally; the model call still needs a gateway

bf init writes agent.py, badgerflow.yaml, a Dockerfile pinned to this SDK version, tests/test_agent.py, a CI workflow and a .dockerignore. bf dev serves the agent with no platform; a node that calls a model reaches the model gateway, so set BADGERFLOW_GATEWAY_URL and BADGERFLOW_MODEL_KEY (below) or run the generated tests, which answer the model with a FakeLLM. The agent is an ordinary StateGraph; the only BadgerFlow addition is a @node(uses=...) decorator declaring what each node may touch:

@node(uses=Uses(knowledge=["claims-manual"]), determinism="recorded_effect")
async def retrieve(state: State) -> State:
    chunks = await ctx.knowledge.retrieve(state["input"]["description"], top_k=4)
    return {"excerpts": [c.text for c in chunks]}

app = Agent.from_langgraph(build_graph(), name="claims-triage", version="0.1.0",
                           input=Claim, output=Triage)

Those declarations are the contract. The platform compiles them into a graph it can render — every node, every conditional edge as a router with its branch labels, and the END your graph declares — checks them against what exists in your namespace at release time, and denies a node at runtime that reaches for something it never declared. bf compile shows that graph before you register.

settings is the half a reviewer reads rather than the platform enforces: what the node is configured with, shown read-only on its card and inspector.

@node(
    uses=Uses(model="gpt-4o"),
    determinism="recorded_inference",
    settings={"model": "gpt-4o", "temperature": 0, "system_prompt": TRIAGE_SYSTEM,
              "output": "_Triage"},
)
async def triage(state: State) -> State: ...

Any JSON object (or a pydantic model) up to 64 KB. It is pinned by the release hash like the rest of the node's config, so what the approver read is what runs — and it is declared, because the compiler cannot see a prompt that is built inside the function.

Work that outlives a request

An invocation is an HTTP request, and some agents run longer than one should be held open. Call ctx.accept() and the platform stops waiting on the reply:

@app.run
async def triage(ctx: Context, claim: Claim) -> Triage:
    ctx.accept()                 # answered 202; the platform now waits on events
    await slow_work(claim)       # minutes, not seconds
    return Triage(...)           # becomes the run's `complete` event

Nothing else changes. ctx.step, the governed clients and cancellation behave identically, and the return value still becomes the run's result — it reaches the platform as the terminal event rather than as the response body.

Two things to know. The platform's clock keeps running, so silence past the timeout_seconds you registered fails the run; raise it at registration if the work takes longer. And once you accept, you have accepted: the reply is 202 even if the handler happens to finish first, so the same code cannot take one governance path on a fast machine and another on a slow one.

Human review in a LangGraph agent

Use LangGraph's own interrupt() — nothing BadgerFlow-specific:

def gate(state):
    decision = interrupt({"question": f"Approve {state['amount']}?"})
    return {"decision": decision}

The run pauses, appears in the platform's Paused Inbox, and resumes when a reviewer answers; interrupt() returns their answer. interrupt_before=[...] works the same way, with the prompt naming the node it stopped before.

In a chat agent, a question for the user rather than a reviewer says so, and their next message is what interrupt() returns:

def clarify(state):
    account = interrupt({"kind": "user_reply", "question": "Current or savings?"})
    return {"account": account}

LangGraph needs a checkpointer to resume, and your pods are stateless: the pod that resumes is usually not the pod that paused, often days later. So the SDK binds BadgerFlowCheckpointSaver, which exports the graph's checkpoint into the pause and restores it on the resume. You never configure it, and your compiled graph is never modified.

Keep large values out of the graph state. The checkpoint travels with the pause and is capped; a state that is too big fails the run with a clear reason rather than producing a pause the platform cannot file. Hold a reference instead.

Answering a chat

A chat-triggered agent receives each turn as text. The platform puts that text in input and, when your input model has one place for it, under that field's name in structured too: a field named input; else the one required string field; else one named message, text, query, question, prompt or content; else the one string field. So Input(problem: str, attempt: str = "") receives the turn as problem, and Input(message: str = "", problem: str = "", attempt: str = "") as message. Several optional string fields with none of those names is left to your model, which then sees them all empty.

Going back, the bubble shows one field of your output model: the one you mark with Field(json_schema_extra={"x-badgerflow-reply": True}), else one named reply, answer, response, message, text or content, else the single string field. An output that names none of those shows as its JSON, which is the cue to mark the field. A streamed agent's deltas are always the reply.

Streaming a run

Ask for text/event-stream and the invocation answers with the run's event frames as they happen, the last one terminal:

data: {"seq":1,"type":"step_started","payload":{"node_id":"retrieve",...}}
data: {"seq":2,"type":"step_completed",...}
data: {"seq":3,"type":"complete","payload":{"output":{...}}}

Nothing in the handler changes: the same ctx.step blocks and the same return value. What changes is where the evidence goes. On a streamed invocation the frames ride the response instead of being posted to the platform's event ingest, because both would record the run twice.

Test it offline

badgerflow.procode.testing.AgentTestClient invokes the agent's own server in process — a run token minted by a key the client generates, the contract request, every event frame the run emitted — with fakes in place of the platform's clients:

from badgerflow.procode.testing import AgentTestClient, FakeLLM

async def test_answers():
    async with AgentTestClient(app, llm=FakeLLM(replies=["Yes."])) as client:
        result = await client.invoke({"text": "Is it raining?"})
        assert result.status == "completed" and result.output["answer"] == "Yes."
        assert "step_completed" in result.event_types

async def test_review():
    async with AgentTestClient(app, llm=FakeLLM(replies=["Yes."])) as client:
        paused = await client.invoke({"text": "..."})
        assert paused.status == "paused" and paused.pause["kind"] == "review"
        done = await client.resume(paused, {"decision": "approved"})

bf init generates these. Every governed client has a fake for tests: FakeLLM for ctx.llm — chat/chat_stream, the raw ctx.llm.openai() client (plain, streamed, with_raw_response) and ChatBadgerFlow all answer from its scripted replies over its own transport, a reply being text or {"tool_calls": [{"name": ..., "arguments": {...}}]} — and FakeKnowledge, FakeOntology, FakeGuardrails, FakeTools and FakeConnectors from badgerflow.procode.testing for the other five, each scripted at construction (FakeKnowledge(chunks={"claims-manual": ["Deductibles apply."]}), FakeGuardrails(rails={"pii": "redact"}, redactions={...}), FakeTools(tools={"lookup": lambda args: {...}})), answering in the real result types, recording every call in .calls, and refusing what was not scripted with a FakeCallError that names the fake — except that an empty FakeKnowledge finds nothing and FakeTools refuses an unknown tool as the gateway does. FakeTools emits the real tool.* event frames, so result.event_types reads as in a deployment. The fakes replace the platform's answers, not its enforcement: a fake serves whatever a handler names whether or not requires declared it. What the client does not do is the platform's half — no release rules, no per-node enforcement, no inbox — so bf validate --against <ingress> is the other half of the preflight: it previews the release scorecard.

Register and release

Deploy the container, then point the platform at it:

bf sync --wait-for-endpoint 120 --image "$IMAGE@$DIGEST"

The platform fetches /.well-known/badgerflow-agent.json from your endpoint and records what it saw, so a registration is evidence rather than a claim. bf sync exits non-zero when what the platform fetched is not what your checkout compiles to, which is what makes it safe in CI.

Registering does not change what runs. A governed release does:

bf release submit --wait     # then a second human approves it in the UI
bf release status --strict   # in CI: 0 only when every rule was evaluated and passed

Without --strict the exit code answers "did a gate fail?": a verdict not yet written, or a rule an authority could not answer, exits 0 with a warning. A pipeline that reads only the exit code wants --strict, where those exit 2.

Each environment runs its own BadgerFlow with its own approvers, so run this once per environment. Pass the image digest, never a tag: it is what a rollback names and what makes "the same build" promoted from UAT to production provable.

A project registered with more than one platform declares each under environments: in badgerflow.yaml: a profile may set base_url, workflow_url, platform_url, namespace and api_key_env (the name of the variable holding that platform's credential; a key value in the file is refused), and carries its own workflow_id and image. Select one with bf --profile prod <command> or BADGERFLOW_PROFILE=prod; an explicit BADGERFLOW_* variable still overrides the profile, bf --profile prod register writes the id back under environments.prod, and bf profiles prints every profile resolved, saying whether its credential variable is set but never its value. Without --profile the top-level keys and the variables apply as before.

bf release status --json and bf release submit [--wait] --json print one JSON document on stdout — release, scorecard (null when not waited for), verdict (gate, status, the rules with name, status, message and observed value, the passed/failed/skipped counts, pending, strict_ok, warnings, errors) and exit_code — and nothing else there, so a pipeline can jq '.verdict.strict_ok'; the human lines go to stderr. The exit code is the same the rendering gives, --strict included, because both read one verdict.

environments:
  uat:
    base_url: https://uat.badgerflow.example
    api_key_env: BADGERFLOW_API_KEY_UAT
  prod:
    base_url: https://badgerflow.example
    namespace: claims
    api_key_env: BADGERFLOW_API_KEY_PROD

The build itself is pinned by requirements.lock, which bf init and bf lock write: the SDK and every distribution its extras pull in, at the versions installed in the environment that validated the agent, with markers judged for the Linux CPython 3.11 image. The Dockerfile installs it and the generated CI runs bf lock --check. A lock is complete or it is not written: when this interpreter lacks a distribution the extras need, bf lock exits 1 naming the pip install 'badgerflow[server,otel]==<version>' that completes it, bf init warns about the same lines, and --check fails such a lock wherever it runs — a CI job that installed the extras must not pass what the laptop could not pin. Regenerate it with bf lock after upgrading badgerflow or any dependency, and commit the result.

Your application's own dependencies go in requirements.in, one PEP 508 line each (requests>=2.32, a marker allowed; no -r, -e, URL or path lines, since a lock must name every version it installs). bf init writes the file empty. To add a dependency: add the line, pip install -r requirements.in, run bf lock, and commit both files; the lock then pins the SDK's closure and your application's together, and records the requirements.in lines it was built from so bf lock --check fails on an edit even when the pinned body did not move. To upgrade one, change the specifier or pip install -U it, then bf lock again. bf lock refuses a line whose installed version falls outside its own specifier — the tests ran against a version the line excludes — and a line not installed here, naming the install that completes it. It also refuses an installed graph that disagrees with itself (a pinned distribution outside what another pinned one requires, the set pip check would report): an image could not install such a lock, so it is not written. A specifier pip cannot read (httpx>=not-a-version, >=1.o) is refused on the requirements.in line that carries it, by bf lock and --check alike — never read loosely and pinned over — and inside the installed graph counts as not held. The image installs requirements.lock only; requirements.in is the declaration, never what runs.

Models from any Python code

A LangGraph app does not have to be a registered agent to use the models your BadgerFlow workspace pays for. Create a model key in Workspace settings → Model keys, then:

export BADGERFLOW_GATEWAY_URL=https://<platform>/api/gateway/ws/<workspace>
export BADGERFLOW_MODEL_KEY=sk-...
bf models                      # what this key may call, and the price per million tokens
from badgerflow.langgraph import ChatBadgerFlow

llm = ChatBadgerFlow(model="claims-chat")   # outside a run: the model key

badgerflow.llm.openai_client() gives the same access as an AsyncOpenAI. Every call is billed to the key's workspace and held to the key's model list and budget. Inside a registered agent's run the run token is used instead, even when a model key is set, so a release's attribution never depends on what a pod's environment happens to contain. The Helm chart refuses to put a model key in a governed agent at all.

Tool plugins

A plugin gives BadgerFlow agents and workflows a new tool without changing the platform. It is a standard MCP server plus a signed manifest, and both are built from typed Python:

pip install 'badgerflow[plugin]' pytest
bf plugin init acme-crm && cd acme-crm
bf plugin test && bf plugin validate

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases badgerflow

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Frame 2085668439 (1)
Group 1261154229