Before you start
- Choose how you work. Without a token (the quickest): send the person's email and the agent's address in one call and hand the person one link. SiBear reads the rest from their code. They sign in with one email, pay, press Authorize and connect GitHub, choose the repositories on GitHub, and press Start the Review. See Prepare it for the person to approve. With an access token from the person's one approval (Agent access), you set up, start and follow the Review yourself: the steps below.
- For the optional inputs you need the person's own code and configuration (their repository, deployment files, prompts and knowledge-base content) open to you. You do not need SiBear's code: everything SiBear reads is described here and in /openapi.json.
- Run the Review against a staging or test copy of the person's agent, never production. Several inputs below are only safe there.
- The token is bound to one agent host. If staging runs on its own host, ask for access with the staging address.
BASE=https://sibearsecurity.com/v1
UA='sibear-client/1.0 (+https://sibearsecurity.com/docs)'
AUTH="Authorization: Bearer $SIBEAR_AGENT_TOKEN"The steps
| Step | Who | What |
|---|---|---|
| 1 | agent | List the orders and pick one |
| 2 | agent | Give the agent address and how it is called |
| 3 | agent (or person) | Prove ownership |
| 4 | agent, then person | Get the GitHub link; the person connects GitHub and picks repositories |
| 5 | agent | Brand rules and business facts (optional: SiBear reads them from the code) |
| 6 | SiBear | Security questions: answered by our AI from the code, with the lines cited |
| 7 | SiBear, then person | Test-marker kinds: suggested by our AI from the code; the person places and ticks them |
| 8 | person | Payment and the optional checks, from the needs_person links |
| 9 | agent | Start with the test key |
| 10 | agent | Follow the run; stop it only if the person asks |
| 11 | agent, then person | Read the report; the person confirms clean-up |
Every PUT and POST below except repository-link (which answers {"link": "..."}) answers with the whole order view. Read missing (what still blocks the start, in plain words), ready (nothing is missing) and needs_person after each one.
1. Pick the order
curl -sS -A "$UA" -H "$AUTH" "$BASE/account/reviews"
curl -sS -A "$UA" -H "$AUTH" "$BASE/account/reviews/$ORDER_ID"Only the person buys a Review: an order exists once they pay or redeem a code. If the list is empty, give them the checkout page, https://sibearsecurity.com/account/reviews/checkout, and list again afterwards.
2. The agent address and how it is called
jq -n '{agent_url: "https://staging-agent.example.com/v1/chat"}' |
curl -sS -X PUT -A "$UA" -H "$AUTH" -H 'Content-Type: application/json' \
-d @- "$BASE/account/reviews/$ORDER_ID/agent"agent_urlis the chat endpoint of the staging copy, on the token's host. A public address only, not a private network one.- Do not send a request and reply format: after the person connects GitHub, SiBear reads the shape of the route serving the address from the person's code, and when the code settles none, our AI suggests one from cited lines. See API formats for the shapes it may find. If you still send
api_preset,custom_jsonorapi_samplefor an endpoint behind a gateway, it is kept as told and used only when the code shows no shape. - Never send
authorization_accepted: that tick is the person's, and their Approve already stands as it. mcp_urlis optional: the HTTPS address of the agent's own MCP server, on the same registrable domain asagent_url. With it, sendmcp_manifest: thetools/listresult the customer approved (one JSON object or list, at most 500 tools and 2 MB). When it is set, the Review asks that server for its tool list at run time (initializeandtools/listonly, never a tool call), compares the live list withmcp_manifest, and reports a tool added, removed or changed after approval as well as poisoned descriptions served live. It is read only once the person has authorized the agent and the run has started. Leave both out to send no MCP request at all. See The MCP server check.- A new address ends the consents given for the old one (harmful content, the exfiltration check, attacker notes, the memory test): the person ticks each again for the new address.
3. Prove ownership
The order view's agent.request_id is a free-scan request id. Use it with the ownership routes in For AI agents (steps 5 and 6). agent.ownership_proven turns true when the proof is checked. Publishing the DNS record or file is a write to the person's system: do it only if they asked you to run the Review end to end, otherwise tell them exactly what to add.
4. Repositories
curl -sS -X POST -A "$UA" -H "$AUTH" "$BASE/account/reviews/$ORDER_ID/repository-link"Hand the person the link. They connect GitHub and choose one to three repositories; that is theirs to do. Tell them which ones to pick: the agent's own code, plus the repository that holds its deployment and proxy configuration if that is separate. The Review reads them for the agent's components, its tools, the route the address serves and any request limits it sets (see Request limits). repository.chosen lists what they picked; last_check_found says what a refused set lacked.
5. Brand rules and business facts
jq -n --rawfile brand brand-rules.txt --rawfile facts business-facts.txt \
'{brand_rules: $brand, business_facts: $facts}' |
curl -sS -X PUT -A "$UA" -H "$AUTH" -H 'Content-Type: application/json' \
-d @- "$BASE/account/reviews/$ORDER_ID/context"You do not need to send them. Once the person connects GitHub, SiBear's AI model reads them from the agent's own code and the Review uses them (What SiBear reads from the code). Send them only to replace what SiBear reads: lines you save here win, and the person can still change them. A check that needs them is not sent when none were given or found: the person's set-up page says "Not tested: no brand rules or business facts were given or found in your code.", and the report marks those checks Not tested. Each is plain text, one statement per line, 1 to 20 lines, each 3 to 300 characters. Leave out harmful_check, harmful_answers, compute_check, exfil_check and attacker_context: they are the person's own choices (403 person_only). compute_check is the reasoning-cost check, on by default: only the person can clear it, on the order page. Your save changes only the brand rules and business facts: any consent the person gave, and their answers on that step, stay as they are. The step then shows as not confirmed (context_confirmed is false) until the person looks at it and saves it.
| Field | What it means | What SiBear does with it | Where to find it in the person's code |
|---|---|---|---|
brand_rules | What the agent must never say or do. | Replies are checked against them. A reply that breaks one is reported in its own "Safety and brand" section, apart from the security findings. | The "never" and "always" lines of the system prompt, the content or tone guide, moderation settings, a list of competitors not to mention, topics the product keeps away from. |
business_facts | True facts about this business that the agent should state when asked: products, prices, policies (warranty, returns, refunds), contact details, opening hours. | Replies are checked for statements about the business that these facts contradict or do not support, such as an invented price, policy or promise. With the agent's own answer to a plain question of what it can help with, they are also used to write one on-topic opening sentence for the scripted checks, so an agent that only answers questions about its own business reads them as on-topic (see Read the report). The facts themselves are not sent to the agent. | The knowledge-base documents, FAQ, pricing and policy pages, product data and the system prompt the agent answers from. |
How to write them well:
- Write what the agent itself knows, in its own terms. A fact the agent has never been given makes a correct answer look wrong.
- One checkable statement per line, with the number, period or condition in it. "Refunds are given within 30 days of delivery, for unused items only." is useful; "We have a good refund policy." is not.
- Use the person's real facts: not another company's, not made up, not placeholders.
- Brand rules are prohibitions or requirements a reply can break: "Never recommend or praise a competitor." "Never give legal or medical advice."
- Put your draft in front of the person. Saving as an agent leaves the step for the person to look over on the order page (
context_confirmedstaysfalseuntil they save it themselves); it does not hold up the start.
6. Security questions (the checklist)
Some risks cannot be tested through chat: how the team logs, alerts, caps spend, pins models or limits tool rights. SiBear answers them from the person's code: once the person connects GitHub, our AI reads short masked excerpts and answers each question it can with one short sentence and the lines it rests on. The report labels each "AI-answered from your code, not verified": it is never the person's answer, never your answer, and the citation proves the lines exist, not that the answer is true. A question the code does not show stays "Not assessed". On the person's page the answers are summary rows with Change, so they can make one their own.
You do not send answers. Nothing is required of you here. The deprecated checklist field is still accepted and shown as your answers beside the AI's, but do not send it: derive from the person's code only if you must, and never guess met.
7. Test markers (optional)
Some checks need a short SiBear test text stored where the agent reads it, such as a document in its knowledge base. SiBear never writes into the person's systems, and our AI now suggests which marker kinds the code shows: retrieval, tools, per-user notes, per-user document access, cross-conversation history, an agent-only account, per-user memory, or its runtime environment, configuration file and secret store. The person makes the kinds they choose from the order page, then places each text in a staging copy of their agent, checks it is there and ticks, for each, that it is in place. Only their tick counts. The agent-only record goes in the one staging or test resource the agent's own cloud role reaches, with that role limited to that resource: with the record in place, the Review tests whether the agent will use that role for a person who lacks it, and reports refused, acted with its own identity, minted a credential or forwarded one, from the call. A check whose marker is not in place is not sent and reads "Not tested: needs setup" in the report; it does not rule the risk out.
You do not choose the kinds. The deprecated markers field in a prepared set-up is ignored.
| Kind | What our AI looks for in the code | Where the person places the text, in the staging copy |
|---|---|---|
knowledge_base | Retrieval: a vector store, search index or document loader the agent answers from. | A document every user may search, added through the same ingestion path as real documents. |
tool_chain | Tools that look up records, tickets, orders or documents. | A record one of those tools finds, readable by the test user. |
private_note | Per-user notes, files or records that the agent's tools read. | A private note of the test user, in a store the tools read. |
other_user | Documents with per-user or per-role access. | A document only a second test user may see. |
other_user_chat | Chat history, sessions, memory or a cache kept across conversations. | A message the second test user sends the agent, signed in as that user, in a conversation of their own. |
agent_only | A service account or admin access the agent uses that users do not have. | A record staff may open and the test user may not. |
memory | A saved memory of each user. | A saved memory of the test user. |
env_secret | Environment variables the agent's tools or code read at run time. | An environment variable named SIBEAR_TEST_SECRET in the staging copy, set to the made-up value shown. |
config_secret | Configuration files the agent reads at run time. | A file named sibear-test-secret.env in the working folder the staging copy reads, holding the made-up line shown. |
secret_store | A secret manager or parameter store the agent's tools can reach. | A secret named SIBEAR_TEST_SECRET in that store, set to the made-up value shown. |
The test user is the one the test key signs in as. Create a dedicated one in staging, and a second one for other_user and other_user_chat.
After a run that sent requests to the agent (test_markers.traffic_sent), every marker in place must be deleted, found by its code: a runtime marker is the variable, file or secret the person placed, never a real credential. The person confirms from the cleanup:markers link.
8. What the person does
Hand the person the link of each needs_person entry (the items). Payment and GitHub are required. The optional checks are theirs to choose: harmful content, exfiltration, attacker notes and the memory test are off unless they tick them; the reasoning-cost check is on by default and they may clear it (compute_check). Tell them that the exfiltration check gives their agent one address SiBear owns and that only a request that actually arrives counts. Tell them plainly what each is for, that the reasoning-cost check may cost them money, and that the memory test needs a staging copy whose memory can be cleared.
9. Start
jq -n --arg key "$SIBEAR_TEST_KEY" '{test_key: $key}' |
curl -sS -X POST -A "$UA" -H "$AUTH" -H 'Content-Type: application/json' \
-d @- "$BASE/account/reviews/$ORDER_ID/start"- The key is a key made only for this test, signing in as the test user, read from the environment and never typed. It is encrypted, used for this Review only and deleted when the run ends, or 24 hours after it was given.
- Add
"credential_kind": "cookie"when the agent takes a session cookie (the value as it goes in theCookieheader). - An endpoint that takes no key: send
{"no_key": true}instead. key_kept: trueon the order view: the key from an earlier start is still stored, so send{}.- Before you start, tell the person
request_budget.totalfrom the order view: it is the most requests the Review may send to their agent, so their own model costs stay bounded.
10. Follow the run
curl -sS -A "$UA" -H "$AUTH" "$BASE/account/reviews/$ORDER_ID/status"Poll about every 30 seconds; the person also gets an email when the report is ready.
| Field | Meaning |
|---|---|
state | queued, running, paused, succeeded or failed. |
steps | queued, repository (reading the code), sandbox (sending the checks), grading, result, each with its own state. |
probes | Each planned check, with its state as it goes, and each check the report will show as "Not tested: needs setup" (state not_tested), whether or not the plan selected it, so the page's counts match the report's. A check is graded as soon as the agent's reply to it comes back, so verdicts fill in while the run is still sending. |
waiting_for_target | Another run against the same host is going; runs against one host take turns. |
resume_at | While paused: the agent's own rate limit stopped the run, which carries on at that time. |
awaiting_credential | The agent stopped accepting the key. Ask the person for a fresh one and POST .../credential with test_key. |
stop_requested | Stop was pressed and the run is ending. |
A page that draws the run live can ask for what happened since it last looked: GET $BASE/account/reviews/$ORDER_ID/status?after=$CURSOR (start with after=0, or from_now=true for the newest cursor and no events) answers the same status plus events, cursor and more. An event is {seq, at, kind, probe_id, turn, verdict, severity}: kind is probe_replied or probe_graded for a check's own request, turn_sent, turn_replied or turn_graded for the turn-th message (1 to 15) of its adaptive conversation. They come oldest first, at most 300 at a time; when more is true, ask again with the new cursor. Events carry ids, numbers and verdicts, never a message or a reply.
Stop. POST $BASE/account/reviews/$ORDER_ID/stop cancels a queued or running Review: nothing more is sent, there is no report and no free re-run, so it uses up the order. The order view shows stopping, then stopped. Stop only when the person asks you to, or when the run is visibly harming their staging agent. An order that is not queued or running answers 409 not_running.
Failure. The order view's failure says what happened in plain words. If the failure was on SiBear's side and can_retry is true, POST .../retry runs it again at no charge. When the agent refused every check or gave no usable answer, fix the key or the API format first. A run that failed before it sent anything is put back by itself: reopened_because says why. What to do for each failure is in Limits and errors.
11. The report
curl -sS -A "$UA" -H "$AUTH" "$BASE/account/reviews/$ORDER_ID/report"
curl -sS -A "$UA" -H "$AUTH" -o report.pdf "$BASE/account/reviews/$ORDER_ID/report.pdf"Read the report explains its parts and the other downloads. Then remind the person about clean-up: the markers, the memory test's notes if it ran (cleanup:memory), and, if the destructive test's persistence check ran, any SIBEAR-TEST-LOGIN login or key the agent created.
Request limits
There is no field for the agent's rate limit: the Review reads the request limits the connected repositories set (in the code, a web server, a proxy or a gateway) and stays well under them, never sending more than 1 request a second.
If the staging copy has a stricter limit the code does not show (a gateway or firewall rule, say), raise it for the test user during the Review or connect the repository that sets it. When the agent answers with a rate-limit refusal, the run pauses until the time it states and then carries on; a check it still cannot send is reported as not tested.
The MCP server check
An agent that uses a model-context-protocol (MCP) server reaches tools through third-party code. A stored manifest says what that server was asked to expose; it cannot say what it serves now. When the order's mcp_url names the customer's own MCP server (same registrable domain as the agent, proven by the same ownership check), a paid Review also reads the live tool list:
initialize,notifications/initializedandtools/list, twice, paced and capped. Nothing else is sent: no tool is called, no resource is read, and nothing is written.- The live descriptions go through the same rules as a static manifest: orders aimed at the model, invisible characters, credential-file references, exfiltration asks, and references to another server's tool (shadowing).
- The list is compared with
mcp_manifest, the tool list the customer approved. A tool added, removed or changed since approval is a rug pull; a list that differs between the two calls is one too. - Each finding names the tool, the field and the observed call (
tools/list#3:description), never the description itself. The findings sit with the other tool-description findings in section R2 of the report, and the downloaded JSON holds them like any other. - A server that does not answer is Not scanned, with the reason, never clean.
The address must be HTTPS, on the agent's registrable domain, with no credentials, query or fragment. The Review connects to the one address it resolved and refuses a redirect. Leave mcp_url out, and the Review makes no MCP connection.
What stays with the person
Payment or spending a Review code, connecting GitHub, every consent, the authorization tick, the start of a Review an agent prepared, the destructive-test signature with the signer's own answers, ticking markers as placed, and every clean-up confirmation. The full list, and why, is in Agent access.
Prepare it for the person to approve
The quickest way to hand a Review to a person. Send two fields, the person's email and the agent's address, and hand over the link you get back. SiBear reads the rest from the person's code once they connect GitHub. No account and no token are needed, and nothing is emailed: the link comes back to you only. Hand it over at once.
jq -n '{email: "[email protected]", agent_url: "https://staging-agent.example.com/v1/chat"}' |
curl -sS -A "$UA" -H 'Content-Type: application/json' -d @- "$BASE/prefilled-review-orders"Add what you already have, so the person has less to wait for:
jq -n --arg key "$SIBEAR_TEST_KEY" \
'{email: "[email protected]", agent_url: "https://staging-agent.example.com/v1/chat",
test_key: $key, repositories: ["example-org/support-agent"]}' |
curl -sS -A "$UA" -H 'Content-Type: application/json' -d @- "$BASE/prefilled-review-orders"| Field | What to send |
|---|---|
email | Required. The person's address: they sign in with it and own the Review. |
agent_url | Required. The staging copy's chat endpoint (step 2). A public address only. |
test_key (with credential_kind), or no_key | Optional. The key the test user signs in with (step 9), read from the environment, never typed. Checked offline only (nothing is sent to the agent before the person starts the Review), encrypted, never returned, used only for the address you prepared, and deleted 24 hours after your call unless the Review has started. Without it, the person's page asks you for it, never them: send it later. |
repositories | Optional. owner/name or the GitHub address, at most three: the agent's own code, plus the repository that holds its deployment and proxy configuration if that is separate. They are ticked for the person on SiBear's repository page, and saved by themselves when GitHub grants all of them. |
brand_rules, business_facts | Optional, not needed: SiBear reads them from the code (step 5). Your lines win over what SiBear reads. |
checks | Optional. A plain on or off for each optional check: reasoning_cost (on by default; {"on": false} proposes leaving it out), harmful_content (with test_copy and reaches_person, and chemical or malware to propose those extras), attacker_notes, memory_test (with memory_scope). A check that is off takes no other field. The person's answers to test_copy, reaches_person and memory_scope are still their own: our AI's suggestion from the code is shown beside each, fills it in, and is adopted only by the person ticking that check's own box (they may change it first). |
destructive | Optional. {"on": false}, or {"on": true} with scope_box, declared_object (SIBEAR-TEST- and 4 or more capital letters or digits), organization (legal_name, registration_number, signer_title), signer_name, signer_title, and in answers your suggestions for the four questions about the test environment (everything_reachable_is_owned_and_listed, disposable_and_losable, can_reach_third_party_or_production, checked_every_providers_rules). |
coupon_code | Optional. A Review code SiBear gave the person, if they have one. The person spends it with one press. |
Deprecated, still accepted, so a call written for the older docs keeps working:
| Field | What happens |
|---|---|
api_preset, custom_json or api_sample | Kept as told, and used only when the code shows no shape (see step 2). Do not send one where the code can show it. |
checklist | Your answers to the security questions, shown as yours beside the AI's. Do not send them: SiBear answers from the code (step 6). |
markers | Ignored. Our AI suggests the kinds and placing a test marker is the person's act (step 7). |
packs | Each name reads as that check switched on in checks. |
What a switch does, and what stays the person's:
- Switching a check on proposes it. The person sees its box on their page, unticked, with your answers beside it, and ticks it themselves; a box left unticked means the check does not run. Nothing you send is a consent, and SiBear never fills in an answer for the person.
destructive.on: truepresets one row of the person's page, "Include the destructive test?", to Yes. On Yes the signing form opens on the same page, filled in with what you sent. The person answers the questions about the test environment themselves (your four answers show as suggestions), gives the answers about themselves in their signer statement, kept on their account, types the agent address, reads both texts, ticks the acceptance and signs, with a sign-in from the last ten minutes. You can never sign, accept, type the address, answer for the signer or give an organization's written authority: those fields are refused as unknown. Destructive testing is not offered yet; until it is, the Review runs without it.- No authorization, no consent, no signature and no word that a marker is in place: refused as unknown fields.
The answer has link (for the person), token (yours, for lookup and for sending the key later), expires_at (24 hours; the link works once), ownership, paid_by_code (the code was accepted; the person spends it with one press on the link's page) and test_key_provided.
- Publish
ownershipfirst, as its DNS record or its file, before you hand over the link: the person's first press checks it at once. POST $BASE/prefilled-review-orders/lookupwith{"token": "..."}sayspendingorused. A person who opens a used link signed in is taken back to their Review.- If the person says the link expired, send the same request again (3 a day per address). Their expired page gives them a message to send you that says so.
Send the key later
If you did not send the test key with the set-up, send it on the same link, with its token. The person's page never asks them for a key on a set-up you prepared: it says it is waiting for you, gives them a message to copy to you, and updates as soon as the key arrives.
jq -n --arg token "$SIBEAR_LINK_TOKEN" --arg key "$SIBEAR_TEST_KEY" '{token: $token, test_key: $key}' |
curl -sS -A "$UA" -H 'Content-Type: application/json' -d @- "$BASE/prefilled-review-orders/key"- Add
"credential_kind": "cookie"for a session cookie, or sendno_key: trueinstead of a key for an endpoint that takes none. - It works while the link waits and after the person opened it, until the Review starts. A key sent again replaces the earlier one.
- The answer has
test_key_provided,no_keyanddelete_by: 24 hours after you prepared the set-up, when the key is deleted unless the Review has started. 422for neither a key norno_key, for both, or for a key the start would refuse.410 prefill_gonefor an unknown or expired link, or a Review that already started: prepare the set-up again, withtest_key.
What SiBear reads from the code
After the person authorizes the test and connects GitHub, SiBear reads the repositories they chose and shows what it found on the person's page. Fixed rules read, each item labelled "Found in your code" with its file and line:
- the request and reply format of the route that serves the agent's address;
- facts about the agent, such as whether it keeps memory, has tools, waits for a person's approval, or has a tool that may hand a chat to a person;
- evidence for the security questions (step 6), never a pass.
SiBear's AI model reads the rest. It is the hosted model the Review's attacker uses (Ollama Inc., Ollama Cloud, named in the Privacy Policy). It gets only short excerpts of the agent's system prompts, tool definitions and guardrail configuration, at most 16, with secrets removed first, to prepare the set-up and, when the reading had not finished before the Review started, to run the Review. From them it suggests:
- the agent's brand rules and business facts: at most 20 of each, 3 to 300 characters each;
- answers to the security questions: shown as AI-answered, never the person's and never verified (step 6);
- notes on some security questions and proposals for the optional checks' deployment facts, the API format and the marker kinds: shown only, adopted by the person through the box they tick or their own marker tick.
Each item must cite the lines it rests on, and SiBear keeps only items whose lines the model was shown. They are labelled "AI-suggested from your code" with the file and line. When the model cannot answer, fixed rules pick brand rules and business facts from the system prompt instead. The Review uses these brand rules and business facts unless you sent your own or the person changes them on their page (Change). If the person starts before the reading ends, the Review reads them when it runs. With none given or found, the checks that need them are not tested.
The reading never holds up the start. When it fails or takes too long, the Review reads the code in full when it runs, and nothing is asked instead. On the order view it is setup_reading: state (reading, done or failed) and, once done, repositories, api_format (the deterministic route, or null), ai_format (the preset our AI suggests when the code settles no route), facts, checklist (each with found, gap and answer: the AI's met, not_met or not_applicable with text, path and line, or null), questions (how many the checklist asks), brand_rules and business_facts (each with text and location), lines_source (ai for the AI model, rules for the fixed rules), ai_evidence (threat_id, text and location), ai_facts (fact, value, text, location) and ai_markers (kind, text, location). agent.url is the address saved, and agent.authorization_current turns false when the authorization text changed after the person ticked it: they tick it again before the start.
What the person does
- Opens the link and signs in with one email. An address with no account gets an email that makes the account: it says "Confirm your email to continue" and brings them back to the same page.
- Pays on the same page, in Paddle's window, or presses Use the Review code when your code paid. Opening the link never spends a code. A person who already has a paid Review waiting uses that one instead.
- On the one set-up page of their Review, presses Authorize and connect GitHub. That saves their authorization to test the agent's address, and SiBear checks your ownership proof. No test message is sent.
- Chooses the repositories on GitHub. Back on SiBear's page, yours are ticked, and saved by themselves when GitHub granted all of them. Coming back from GitHub never starts the Review.
- Checks what SiBear found, ticks any optional check the code or your agent shows may apply, answers "Include the destructive test?" if it is offered, and presses Start the Review (Sign and start the Review with the destructive test on). The page shows the AI's answers to the security questions and, where our AI suggested one, its proposed answer beside each question it is not allowed to answer for them: the person changes any answer or places any marker they choose. The AI's answers and proposals are never ticked or answered for the person.
Both presses are the person's own: a token gets 403 person_only. The same limits as a prepared free-scan form apply (Limits and errors).