Scan your whole stack
From OX Research Newsroom
Are you using @crewhaus/tool-codehost?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.8.2
@crewhaus/tool-codehost was last scanned on 12 Nov 2026 at version 0.8.2. Risk score 45 of 100 (medium). High-severity rules fired.
| Version | Published | Status |
|---|---|---|
| 0.8.2 LATEST | 12 Nov 2026 | 1 rule fired |
| 0.8.1 | 11 Nov 2026 | 1 rule fired |
| 0.8.0 | 25 Oct 2026 | No rules fired |
| 0.7.0 | 22 Sep 2026 | Not shown |
Findings for v0.8.2. 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.
A DNS lookup command (nslookup, dig or host) takes its query name from a subshell that first encodes the data, for example with base64 or xxd. Encoding the name turns a lookup into a way to send data to the nameserver of the queried domain. Ordinary diagnostic lookups have no encoding step.
HIGHThe score describes 0.8.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
GitHub and GitLab over their REST APIs, without a model turn per request.
An agent working on a repository spends most of its calls asking the same few questions: what does this PR touch, which check failed and why, what did the reviewer object to, is there API budget left before the fleet job stalls. Each one is a deterministic lookup with a stable answer. Each one here is a single call that returns a normalised record instead of six kilobytes of host JSON.
Twenty-six tools: seventeen read, nine write.
The token is a NAME, never a value, and the operator's. token_env in the tool_config
block names an environment variable; a call's tokenEnv may name only that one or one listed in
token_envs, so a call cannot send another process secret as a bearer token. The token is read at
call time, attached as a request
header, and scrubbed out of every string on the way back. It never appears in a path, a query
string or a body, and a server that echoes it into its own payload gets it redacted out of the
record. There is an explicit test for that, driven by a fixture that deliberately leaks. The
field most likely to receive a pasted secret is the one whose name ends in Env, so a value
there that is not shaped like a variable name, or that carries a known token prefix, is refused —
and the refusal does not quote what it refused.
The gate is fail-closed. An empty origin allow-list denies everything, api.github.com
included. Every redirect hop is re-checked against the allow-list and the SSRF classifier, the
classification is numeric rather than a string prefix, the vetted IP is pinned for the connection,
and the token is dropped the moment a redirect crosses an origin — or a rel="next" page URL
names another one. This is @crewhaus/tool-http's posture, carried over rather than re-derived.
Nothing runs unbounded. Every call has a deadline, and it covers the name resolution too:
node:dns takes neither a timeout nor an AbortSignal, so a wedged resolver is the one thing
that could hold a call open past the deadline meant to bound it. Every response is read under a
byte cap that bounds memory rather than just output, and every listing is bounded by a page cap
as well.
Determinism. Same inputs against the same world state, same bytes out. Listings are sorted
explicitly, comparisons are locale-free, nothing is random, and no result carries a wall clock the
caller did not ask for. Search is the one deliberate exception — the host's relevance order is
the answer — and it is an order option, spelled out in the description.
{
"tool_config": {
"codehost": {
"allowed_origins": ["https://api.github.com"],
"base_url": "https://api.github.com", // optional; per-host default otherwise
"token_env": "GITHUB_TOKEN", // the NAME of the variable
"token_envs": { "GHE_TOKEN": ["https://ghe.example.com"] }, // optional; see below
"host": "github" // default dialect
}
}
}
token_env is the variable every call uses unless it names another. Its token goes only to
base_url's origin, or, when base_url is not set, to the default API of host
(https://api.github.com, or https://gitlab.com with host: "gitlab"). A call that passes its
own baseUrl or host for another origin is refused rather than handed that token. token_envs lists the other variables a call may name
in tokenEnv — as a list, whose tokens may go to any allowed origin, or as a map from a name to
the origins its token may go to, which is how a spec that reaches github.com and a self-hosted
instance keeps each token with its own host. A call can choose among these names and never add
one; with neither key set, a call that names a variable is refused. Names are checked when the
harness starts, and a malformed one is refused without being printed.
A self-hosted instance is reached by allow-listing it and pointing base_url at its API root
(https://ghe.example.com/api/v3, https://gitlab.example.com/api/v4). Nothing else changes.
It has to be a root: every request path is appended to it as text, so a base URL carrying a
query string or a fragment is refused rather than accepted — https://host/# would otherwise
send every call to / and return the answer as if it were the resource you asked for.
One caveat worth knowing before a CI-log call: GitHub serves job logs by redirecting to a storage
origin. That origin has to be allow-listed too, or WorkflowRunLogs is refused by name — which is
the correct outcome, just one that is easier to fix when you were expecting it.
A rule names a repository: alwaysAllow IssueCreate(acme/app), PrList(acme/*). That covers a
call to the API this tool_config is set up for (base_url, or the default API of host),
whether or not the call names it in baseUrl. A spec with one host writes its rules this way.
The repository is also read with the origin of the API the call goes to in front:
https://ghe.example.com/acme/app for https://ghe.example.com/api/v3 (on github.com, whose API is
api.github.com, that is https://api.github.com/acme/app). That is the API named in baseUrl,
or the configured one when the call names none. In a spec that allow-lists more than one host:
IssueCreate(https://ghe.example.com/acme/*). One that names
no host covers the configured API only;IssueCreate(https://*/acme/app). Not
IssueCreate(**/acme/app): on GitLab an owner is a group path, so that also grants a project
such as evil/acme/app;baseUrl:
alwaysDeny IssueCreate(https://ghe.example.com/**), also written ghe.example.com/**, or with
the other scheme or another port;alwaysDeny IssueCreate(acme/secret), fires on every host.A call's host picks the dialect, and with base_url set it does not move the call. Without
base_url it also picks the API: in a config set up for GitHub, host: "gitlab" sends a call to
gitlab.com, which a rule reads as another host.
RateLimitStatus names no repository: it reads the quota of the API itself, so its rules name the
API, alwaysAllow RateLimitStatus(https://ghe.example.com/**). That is the API in baseUrl, or
the one the call goes to without it, so a deny on a host fires on every call to it here too.
readOnly, scope: "external", ioCapability: "network"| Tool | What it answers |
|---|---|
PrList |
open/closed/merged pull requests, filtered by branch |
PrGet |
one PR with mergeability and a check summary |
PrFiles |
the files it touches, with capped patches |
PrComments |
the conversation, oldest first |
PrReviews |
who approved, who objected, and the inline threads |
IssueList |
the backlog, with the PRs GitHub mixes in filtered out |
IssueGet |
one issue with body and comments |
CheckRuns |
the checks on a ref, with the failing step named |
WorkflowRuns |
CI runs for a branch or sha |
WorkflowRunLogs |
the actionable excerpt of a failed run's log |
ReleaseList / ReleaseGet |
releases and their assets |
RepoGet |
default branch, visibility, topics, sizes |
SearchCode / SearchIssues |
the host's search, paginated |
CompareRefs |
the commits and files between two refs |
RateLimitStatus |
remaining quota — the tool that stops a fleet job burning its budget |
destructive, requireJustificationPrCreate, PrUpdate, PrComment, PrReviewSubmit, IssueCreate, IssueUpdate,
IssueComment, ReleaseCreate, WorkflowRunRerun.
Every one of these is publicly visible under the token owner's name, which is why they all carry
both flags. None of them declares its own justification property: the runtime injects a required
one, and a self-declared optional one would quietly take over that contract.
Deliberately absent: merging a pull request, and deleting anything. Both are irreversible and belong behind a human.
A tool that overstates its coverage is worse than one that is narrow and says so, so:
PrReviewSubmit refuses that event rather than downgrading it to a note nobody would treat as
blocking. Its API takes numeric user ids for reviewers and assignees, so those fields are
GitHub-only here and are refused rather than silently dropped.countsDerived.PrFiles and
CompareRefs say so in their descriptions.owner and repo, on both hosts. A permission rule reads those two
fields (alwaysDeny SearchCode(acme/secret)), but GitHub takes its scope from qualifiers in
the query text and ignores the fields. So on GitHub the two are held together: owner and
repo given alone are added to the query as repo:owner/repo; a repo:, org: or user:
qualifier already in the query must be covered by the fields — the same repository, or the
whole owner with no repo — or the search is refused with the fields to set; and an owner
alone needs org: or user: in the query, because the two are different qualifiers. A
qualifier behind NOT or inside parentheses still counts; only a leading -, which narrows,
and text inside a double-quoted phrase, which GitHub searches for as written, are left alone.
A rule reads an owner in any letter case, as GitHub does. A search that names no owner covers
every repository the token can read, so a deny naming any repository fires on it.
GitLab's issue search is per project or instance-wide, so an owner without a repo is
refused there rather than silently searching the whole instance.RateLimit-* headers off it — and an instance with rate limiting disabled
honestly reports nothing.src/lib/refs.ts validation + encoding for anything that becomes part of a URL
src/lib/page.ts Link-header and x-next-page pagination, RateLimit headers
src/lib/shape.ts one record shape per concept, from two hosts' payloads
src/lib/logs.ts the actionable excerpt of a CI log
src/net.ts allow-list, SSRF gate, deadlines, capped reads, redaction
src/api.ts one request, one paginated listing, the base-URL rule
src/index.ts the tools
src/lib is pure and tested in src/lib.test.ts. src/index.test.ts drives every tool at a real
Bun.serve on 127.0.0.1 that impersonates both APIs; src/integration.test.ts drives them through
executeTool, the way the runtime does, including a per-candidate tool_config block.
No tool here takes a filesystem path, so there is no path-containment module: the equivalent rule
for this package lives in src/lib/refs.ts, which is what keeps a caller's string from becoming
an extra path segment in an API URL. (A src/paths.ts came with the package scaffold and was
removed — unused containment code is code nobody tests and somebody eventually trusts.)
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.