Short answer
The Xano SDK runs your whole backend on a local engine, and the engine runs on GitHub's Linux runners. Deploy to it in CI and test the API over HTTP. The job takes 26 seconds and needs no Xano account or secret. Test permissions over HTTP, because Xano's own tests run endpoints without their auth gate.
Contents
A coding agent will write you an endpoint that lists “your” notes, and it will look right. Whether it returns only yours is a question about the running server, and the cheapest place to ask it is CI, on every pull request. With the Xano SDK that no longer needs a Xano account, a shared branch or a secret: the backend runs inside the GitHub runner. The example repo, xano-ci, does it in 26 seconds.
Why a backend an agent wrote needs a real one in CI
The bug that matters most in an API is rarely a crash. It is an endpoint that answers, with data the caller shouldn’t see. OWASP puts it first in its API Security Top 10 as broken object level authorization, and describes the attack as “manipulating the ID of an object that is sent within the request.” An agent that “simplifies” a query can write exactly that, and nothing about the code looks wrong.
Here is the example repo’s list endpoint with its owner filter taken out, the way a refactor might take it out:
stack: [
- s.function.call({
- fn: notesOf,
- input: { owner: auth("id") },
- as: "rows",
- }),
+ s.db.query({ table: note, as: "rows" }),
],
And in the endpoint that reads one note:
- ...guard.owner("note", "owner"),
+ guard.found("note"),
It type-checks, it deploys, and Xano’s own test suite still passes. The HTTP tests don’t:
$ npm run xano:test
✓ 1 passed, 0 failed
$ npm run test:api
✔ a request without a token is refused
✖ another user's notes never appear in your list
✖ someone else's note is a 404, like a missing one
✔ the owner can read their own note
✔ a note needs a title
Bob’s list came back with Alice’s note in it, and Bob could open it by id. A test that mocks fetch can’t catch this,
because the bug isn’t in the client. It is in what the server decides to return, so the test has to talk to a
server.
Run Xano on your machine, with no account
The Xano SDK writes the backend in TypeScript under xano/, and its deploy command runs it on the Xano Engine, a
local build of the whole backend with Postgres inside. The SDK’s README puts it plainly: “A Xano Engine needs no
sign-in, a cached one deploys offline.”
npx @xano/sdk init my-app --marketplace @xano-sdk/auth
cd my-app
npm run xano:deploy
The first deploy downloads the engine for your platform, checks its sha256, and pins the version in
package.json, so every checkout runs the same one. On an Apple M5 Max that first deploy, download included, took
2.9 seconds. After that, a redeploy to the running engine took about half a second, and npm test in the example
repo (deploy, Xano’s tests, the HTTP tests) took 2.1 seconds.
The engine ships for macOS, Windows and Linux on x64 and arm64. Linux x64 is the platform a GitHub runner is.
What Xano’s own tests can and can’t see
The SDK has two kinds of test that run inside the engine: unit tests on an endpoint or function, and workflow tests that call several objects. The repo keeps the owner filter in a function so a workflow test can reach it:
// One user's notes, newest first. The list endpoint passes the
// caller's id; a test can pass any id, since Xano's own tests
// can't sign in as a user (README, "What the tests prove").
export const notesOf = defineFunction({
name: "notes/of_owner",
input: { owner: input.int({ required: true }) },
stack: [
s.db.query({
table: note,
where: expr(col("owner"), "=", inp("owner")),
sort: [{ sortBy: "created_at", dir: "desc" }],
as: "rows",
}),
],
response: ref("rows"),
});
// Runs inside Xano with `npm run xano:test`: two owners' notes,
// and the function returns one owner's.
export const onlyOwnNotes = workflowTest({
name: "notes/of_owner returns only that owner's notes",
stack: [
s.db.add({
table: note,
row: { title: c.text("mine"), owner: c.int(1) },
as: "a",
}),
s.db.add({
table: note,
row: { title: c.text("theirs"), owner: c.int(2) },
as: "b",
}),
s.function.call({
fn: notesOf,
input: { owner: c.int(1) },
as: "mine",
}),
s.expect.to_equal({
expr: withFilters(ref("mine"), fl.count()),
value: c.int(1),
}),
s.expect.to_equal({
expr: ref("mine.0.title"),
value: c.text("mine"),
}),
],
});
That test is worth having, and it is why the planted bug got past it: the function was still right, and the
endpoint had stopped calling it. A workflow test can’t check the endpoint instead, because of how it calls one. The
SDK’s test docs say “An endpoint’s auth gate is NOT enforced on s.api.call,” and that “the gate itself is not
reachable from a workflow test.” A token in the headers doesn’t help either. So anything that depends on who is
calling has to be tested from outside, over HTTP.
The HTTP tests
The HTTP tests use Node’s built-in test runner and the route manifest the SDK generates, so a path or an input that changes in the backend breaks the test at compile time instead of returning a 404. Each run signs up two new users, Alice and Bob, and Alice writes a note. Then:
test("another user's notes never appear in your list", async () => {
const res = await call("GET notes", { token: bob });
assert.equal(res.status, 200);
const ids = res.json.map((n: { id: number }) => n.id);
assert.ok(!ids.includes(aliceNote));
});
test("someone else's note is a 404, like a missing one", async () => {
const get = (id: number) => call("GET notes/{id}", { token: bob, id });
const theirs = await get(aliceNote);
const missing = await get(999_999);
assert.equal(theirs.status, 404);
assert.equal(missing.status, 404);
});
The second test checks two ids on purpose. If someone else’s note answered 403 and a missing one 404, the status
alone would tell Bob which ids exist. The endpoint uses the SDK’s guard.owner, which answers 404 for both:
export const getNote = query({
name: "notes/{id}",
verb: "GET",
apiGroup: notesGroup,
auth: userTable,
input: { id: input.int({ required: true }) },
stack: [
s.db.get({ table: note, fieldValue: inp("id"), as: "note" }),
// 404 for a missing note and for someone else's alike,
// so an id never tells a stranger that it exists.
...guard.owner("note", "owner"),
],
response: ref("note"),
});
Sign-in comes from the @xano-sdk/auth module, whose README is blunt about its scope: “Authentication, not
authorization.” It gives you a user and a token. Deciding what that user may read is your code, which is exactly
the part these tests cover.
The GitHub Actions job
This is the whole job. It needs no secrets. anywhere:
# The backend runs on the Xano Engine inside the runner:
# no Xano account and no secrets.
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
# Types, routes and the lock: the same gate Xano's templates run.
- run: npm run xano:check
# Start the engine and deploy the backend to it.
- run: npm run xano:deploy
# Xano's own unit and workflow tests, run inside the engine.
- run: npm run xano:test
# The HTTP tests: sign-in, permissions, validation.
- run: npm run test:api
Three runs on 5 December 2026 took 26, 26 and 24 seconds from start to finish. One run, step by step:
| Step | Time |
|---|---|
npm ci |
3 s |
npm run xano:check |
3 s |
npm run xano:deploy, including the 33 MB engine download |
9 s |
npm run xano:test |
2 s |
npm run test:api |
1 s |
At that speed there is no reason to cache the engine, and no reason to point CI at a shared Xano branch, which Xano’s CLI docs describe as the place “where you develop and test.” A shared branch carries other people’s data and needs a credential in your CI. The engine in the runner starts empty every time and belongs to that one run.
Let your coding agent run the same loop
The test that protects you in CI also works as the agent’s feedback loop. Put the rule where the agent reads it:
the repo’s AGENTS.md says to run npm test before finishing, and that every rule a request must pass gets an
HTTP test. With a half-second redeploy, an agent can deploy and test after every change, and see the failing
assertion with the leaked note in it instead of a reviewer finding it later.
The project init generates also connects Claude Code and Cursor to the engine’s MCP server, so the agent can
read tables and rows and run tests on the engine directly. The code still changes in xano/ and ships with a
deploy, so the HTTP tests stay the check that counts.
When to use a cloud ephemeral instead
The local engine covers tables, endpoints, functions and tests. Two things need Xano’s cloud:
- Endpoints that call Xano AI. AI is off on an engine nobody signed in to. Deploy those to an ephemeral with
npm run xano:deploy:ephemeral, which needs a Xano sign-in stored as a CI secret. - A URL someone else can open, such as a preview of a pull request for a reviewer.
For everything else, start with the job above. Add an HTTP test for each rule a request has to pass, and remove one check by hand once to watch the test fail, so you know it can.
Questions
- Can I run Xano locally without an account?
- Yes. The Xano SDK's deploy command downloads the Xano Engine, starts it on your machine and deploys your backend to it, with no sign-in. A cached engine deploys with no network access at all.
- Does the Xano Engine run in GitHub Actions?
- Yes. The engine ships for Linux x64 and arm64 as well as macOS and Windows, so `npm run xano:deploy` works on GitHub's ubuntu-latest runner. On 5 December 2026 the whole job took 26 seconds.
- How do I test an authenticated Xano endpoint?
- Over HTTP. Sign up a test user, send its token in the Authorization header, and assert on the status and body. Xano's workflow tests run an endpoint without its auth gate, so they can't prove who is allowed in.
- Do I need to cache the Xano Engine in CI?
- Not for speed. The Linux engine is a 33 MB download, and the whole deploy step, download included, took 9 seconds on GitHub's runner.
Sources
- Xano SDK README: Xano on your machine, deploying, testing
- Xano SDK: Deploying locally (guides/deploying.md)
- Xano SDK: Tests, assertions, and mocks (llms/tests.md)
- Xano template repo CI (xano-labs/template-countersign-document-signing)
- @xano-sdk/auth README
- Xano CLI docs: team workflows
- OWASP API Security Top 10 2023: API1 Broken Object Level Authorization
- Node.js test runner (node:test)