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

@crewhaus/tool-codehost

Latest version: v0.8.2

Overview

Last scanned
12 Nov 2026
Published
12 Nov 2026
npm package Publisher: studiomaxops
2 Stars
1 Forks
4 Versions
272 Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 4 versions; the latest 2 were published within 2 days (11 and 12 Nov 2026).
  • Findings: 1 rule fired in version 0.8.2 (1 high). The score describes this version only.
  • Downloads: 272 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

Rules fired in 0.8.2: 1

Findings

1 High

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.

Encoded data placed in a DNS lookup

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.

HIGH
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

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

README

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

@crewhaus/tool-codehost

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 four commitments

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.

Configuration

{
  "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.

What a permission rule reads

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:

  • an allow names the host it means: IssueCreate(https://ghe.example.com/acme/*). One that names no host covers the configured API only;
  • for one repository on any host, write 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;
  • a deny on a host fires on every call to it, including one that names no baseUrl: alwaysDeny IssueCreate(https://ghe.example.com/**), also written ghe.example.com/**, or with the other scheme or another port;
  • a deny that names no host, 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.

The tools

Read — 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
Write — destructive, requireJustification

PrCreate, 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.

What this package does not do

A tool that overstates its coverage is worse than one that is narrow and says so, so:

  • GitLab is supported, not simulated. It has no review object — approvals become approved reviews and discussions become threads — and no request-changes state at all, 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.
  • Line counts. GitHub states them; GitLab does not, so for GitLab they are counted from the diff and marked countsDerived.
  • Label lists. GitLab takes labels as one comma-separated string, and so does GitHub's label filter. A label whose own name contains a comma is refused there rather than quietly sent as two labels.
  • Host caps are passed through, not hidden. GitHub lists at most 300 files per PR, omits the patch for very large files, and returns at most 250 commits from a compare. PrFiles and CompareRefs say so in their descriptions.
  • Code search. GitHub's covers the default branch of indexed repositories and wants a qualifier in the query. GitLab's blob search here is project-scoped, because a group- or instance-wide one needs Advanced Search; it says so when you ask without a project.
  • A search's scope is 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.
  • Rate limits. GitHub has a real endpoint. GitLab does not, so the tool makes one cheap request and reads the RateLimit-* headers off it — and an instance with rate limiting disabled honestly reports nothing.
  • Check steps. GitHub Actions checks get their failing step named, by looking the job up. Checks published by other apps report only what the app published, and GitLab statuses carry no step list at all.
  • No merging, no deleting, no asset uploads, no line-level review comments, no GraphQL.

Layout

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.)

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).

  • npm @crewhaus/tool-codehost

References

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

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229