Rebrew is published as Beta (Development Status :: 4 - Beta in
pyproject.toml). There is no separate LTS track in this
repository: security fixes land on the default branch (main) and in the
next release cut from that branch. Older tags are not guaranteed to receive
backports.
Email the package author listed in pyproject.toml:
Marcel W. Wysocki: maci.stgn@gmail.com
Please include enough detail to reproduce the issue (affected command or module path, rebrew version or commit, and whether a local project or dependency is required). Do not open a public GitHub issue for unfixed vulnerabilities.
This repository does not define an SLA, bug bounty, or encrypted-reporting channel. Acknowledgement and fix timing depend on maintainer availability.
Rebrew runs locally and processes project code, native binaries, and compiler
and decompiler inputs. It has three HTTP listeners. rebrew ops serve gates
operations, health, and metrics with a bearer token. The experimental jobs
service requires a bearer token for jobs and binds only to loopback. Its
liveness routes are public within that boundary. The coverage dashboard
defaults to loopback and serves coverage to any client that can reach it.
See the threat model
for listeners, trusted inputs, and mitigations.
Use trusted backup and restore paths. A TOML restore replaces the live project
configuration and can change metadata and service settings for later runs.
Restore checks file digests against the bundle's manifest and preserves the
old store as .before-restore. The recovery guide lists which files the bundle
covers and what to back up separately. For PostgreSQL, use the database's
backup tools. See backup and restore.
Operators control these trust boundaries.
- Inputs and tools. Rebrew trusts project source, configured HTTP services, release
and toolchain-media downloads, container images, Wine prefix and compiler
profile settings, skill overlays, and installed Python entry-point plugins.
KUNA_SPECSselects the language definitions parsed by nativekuna. - Imports.
rebrew binsync pullmay fetch and import state.validate_remoteinbinsync/git.pyrejects spaces, control characters,.., a leading-or+, and command transports such asext::andfd::.rebrew source import-splatpreviews the foreign config and symbols by default.--applywrites metadata, source markers, and library headers. - Scratch directories.
sweep_stale_temp_dirsremoves directories whose names match registered scratch prefixes under the cache base selected byXDG_CACHE_HOME. Project sweeps in.rebrew/climband.rebrew/qualsweepderive a confined prefix from the function's symbol. Eligibility uses the newest subtree mtime, a 24-hour age threshold, and a one-hour clock-step allowance. - Headless X displays. Rebrew starts Xvfb with a private
MIT-MAGIC-COOKIE-1 file. It discovers candidate servers through
/proc/*/cmdline. For an existing server without-auth, it may adopt a readableXAUTHORITYfrom the environment and pass it to later child processes. It does not verify access by opening an X connection, so treat an adopted display as unauthenticated on a multi-user host.
CI is a boundary of its own: pull_request (never pull_request_target),
workflow permissions: contents: read, persist-credentials: false,
and every third-party Action pinned by commit SHA. The one exception is the
package job in ci.yml, which carries per-job attestations: write and
id-token: write grants so its actions/attest-build-provenance step
records SLSA build provenance for the wheel, sdist and SBOM in Sigstore's
transparency log (.github/workflows/ci.yml package: job,
tests/test_ci_pins.py test_package_job_attests_build_provenance). Every
other job in both workflows stays on contents: read with no write grant. secrets.GITHUB_TOKEN is
never workflow-level env: in ci.yml it reaches only the resembl clone
step through the composite action's github-token input, and in
.github/workflows/toolchain-sync.yml it reaches the resembl clone step and
the nightly check-updates run. That workflow runs nightly and reports
toolchain pin drift without applying it. There is no publish step in this
repository: release files are attached to a GitHub release by hand from a
dist/ the package job verified, so a release is not attributable to a
workflow run, and there is no package-index upload. CI signing is limited to the SLSA
build-provenance attestation for the package job's wheel, sdist and SBOM
(dist/rebrew.cdx.json) subjects: it records what the package job built, under the workflow's
Sigstore identity, and is not a signature over the manually attached release
files.
The packaged compile-cache backends refuse pickle deserialize
(NoPickleDisk in src/rebrew/compiler/cache.py); that does not attest
plugin cache backends or remove the open upstream diskcache advisory.
- No claim of authentication or authorization on
rebrew coverage serve(default bind is loopback; binding to non-loopback addresses exposes a read-only HTTP API without credentials). The only gate on those routes is the Host allow-list; there is no rate limit, and the 64-connection cap (_MAX_ACTIVE_CONNECTIONSinsrc/rebrew/dashboard.py) is an availability bound an allow-listed client can fill.GET /api/healthreports the configured target count to any client that clears it, and the absolute coverage-directory path only when the bind is127.0.0.1/localhost/::1; a non-loopback--hostdrops that field (expose_pathsinsrc/rebrew/dashboard.py). The flag is decided by the--hoststring, not by the address the socket bound, so alocalhostthat resolves off-box would still serve the path. - No claim that docker toolchain or cmake-bridge execution is a hardened
sandbox against a hostile project tree or malicious image. Local container
runs share
docker_hardening_args()insrc/rebrew/compiler/toolchain.py:--network=none(no egress),--cap-drop=ALL,--security-opt=no-new-privileges,--pids-limit=256,--memory=2g,--cpus=2, plus--pull=neverwhere the call site passespull=True(the cmake bridge passespull=False).--read-onlyis deliberately absent: toolchain images write a wineprefix under/opt/wineprefixand$HOMEon every compile. None of that implies escape resistance. The compile path passes no--user, so the compiler runs as the image's default user; it mounts the project root read-only but can read all of it. The cmake bridge mounts the project root and wineprefix read-write. - No claim that "docker-only" covers toolchains registered by an entry point
or a
REBREW_TOOLCHAIN_OVERLAY_DIRTOML file: a spec withoutimageruns itsbinaryon the host with the full process environment (run_toolchaininsrc/rebrew/compiler/toolchain.py). - No claim that optional wibo / toolchain-media downloads are attested beyond
the in-code host allow-list and hash checks described in
docs/THREAT_MODEL.md. Wibo asset bytes are allow-listed, redirect-checked per hop, and checked against the releasedigest; the release-metadata GET that supplies that digest is pinned toapi.github.comper hop (wibo.py_trusted_wibo_metadata_url/_read_release_metadata, which usesfollow_redirects=False). None of that is content attestation: the digest is whatever the current GitHub release publishes. Wibo does not consumeGH_TOKEN/GITHUB_TOKEN(those tokens are used only by toolchain pin-check/update HTTP to GitHub). - No claim that dependency CVEs are absent; pin rationale lives in
pyproject.tomlcomments and the changelog. In particular, diskcache's open pickle advisory is mitigated for packaged backends byNoPickleDisk, not by claiming the upstream advisory is fixed. - No claim that library helpers which invoke host DOSBox
(
rebrew.compiler.msvc16/tc16viarebrew.compiler.dosbox) are covered by the docker-only compile guarantee on the shipped CLI compile path. There is nopdb_cvdumpmodule and noREBREW_CVDUMPsetting. PDB reads on the shipped path run hostllvm-pdbutil(rebrew.pdb_info/rebrew.toolchain_detect), not winecvdump.exe. - No claim that every shipped CLI command stays inside a container.
rebrew build calibrate-bssexecutes the link command read from the project'sbuild/CMakeFiles/*/link.txtand its--compile-cmdon the host,rebrew build sweep-link-flagsexecutes that samelink.txtcommand on the host,rebrew build symbol-stubs --build-cmdexecutes an operator-supplied build command on the host,rebrew build check --objectsruns hostmake -q -f <build.make>in the build directory, and analysis helpers run host rizin/r2, kuna, objconv, llvm-pdbutil, diec, objdump, and nasm against target binaries. Linked-exe GA (match_ga.py_compile_source/matcher/compiler.pybuild_candidate) runs that host compiler only when the profile has no docker image; a profile whose spec has an image raises instead of starting host wine.rebrew doctorsmoke-runs host wine or wibo plusCL.EXEonly on that same image-less path (check_compiler); a docker-backed profile returns before the smoke. Treat a project tree from an untrusted source as able to run code on the host through the paths that do execute. Query mode still evaluates makefiles. The preflight rejects recognized executing forms and computed include names. Use--objectsonly with trusted build files. See the host build boundary. - No claim that reading a project's build files stays inside the project
directory, except the cmake bridge's
@rsprewrite. That rewrite reads response files on the host and stages the copy in a temporary directory inside the read-write project root, but each@path must resolve to a regular file inside the project (rebrew-project.tomlroot): an absolute or..path outside it, a symlink (even to an in-project target), a directory, device or fifo, or a file over 8 MiB (_MAX_RESPONSE_BYTES) is refused before it is copied (src/rebrew/cmake_tc.py_response_source/_rewrite_response_files, called from_docker_runand_unshare_run). The bound is the project root, not a narrower build directory, so a regular file already inside the tree can still be read and rewritten into that staging directory. - No claim that a cloned project's metadata can make rebrew read or
write outside the project, and no claim that one validator covers every
join of the
filefield. Two checks exist, and neither runs everywhere.validate_identity_file(src/rebrew/metadata/source_schema.py) rejects a value that starts with/, carries a drive letter, or contains a..part. It runs when a row is written and when either compiled-source binder reads one (function_providers.pybind_compiled_source,_bind_compiled_row), not on every read of a hand-edited store;rebrew lintW034 reports the rows it would refuse.contained_path(src/rebrew/sources.py) resolves a value undersource_roots(reversed_dir, thenshared_dir, with the projectrootas the outer bound, since a shared-tree source is recorded../-prefixed relative toreversed_dir) and refuses an empty value, onePath.is_absolute()accepts, or one that resolves outside every root.rebrew verify(verify.pyverify_entry, where a refused entry is recordedMISSING_FILE), that module's cache-validity read and deferred STATUS pass, the batch compile (compiler/compile.pyprecompile_batch), therebrew build objdiff-drivercommand (objdiff_project.py),rebrew match partitions, every read and write inrebrew source import-related(cross_import.pyimport_function,import_shared_function,promote_to_shared), andrename.py_row_sourceall resolve through it.rebrew testdoes not joinfile. The compiled-source fast path (_bind_compiled_row) does not resolve the joined path or make theis_relative_to(root)check thatbind_compiled_sourcemakes: aftervalidate_identity_file, it trusts a base lexically inside the project and falls back tobind_compiled_sourcewhen the source or a parent directory is a symlink.contained_path's absolute test does not see anX:drive spelling on POSIX, andjoin_under(src/rebrew/utils.py) returns one unchanged on every host;validate_identity_filerefuses that spelling before either binder joins it.rename_ops.py_Projectjoinsreversed_dir / filepathwith no check of its own; thatfilepathcomes frombind_compiled_source, already bounded by the project root. The verify cache's patch refresh (verify_cache.pypatch_verify_cache_entries) resolves a cache entry'sfilepathand skips the hash refresh when it lands outsidereversed_dir. BinSync overlay usescontained_pathfor source reads and signature/comment targets; prototype imports update the actual C signature through the AST and the importer's source-tree check. A corrupt BinSync state file is never silently treated as missing or empty:load_artifact/load_manyinbinsync/serial.pyraiseValueErroron unreadable/unparseable input (a missing file still returnsNone/[]), so export/import/pull fail closed instead of proceeding with empty state. What this does not claim: the shared validator's outer bound is the projectroot, so project-internal paths such as.git/hooks/,rebrew-project.toml, or.rebrew/can pass that validator. It says nothing about a project running host commands, whichdocs/THREAT_MODEL.md§5 covers separately. - No claim that
REBREW_CONTAINER_RUNTIMEis restricted to a container runtime rebrew trusts.container_runtime(src/rebrew/utils.py) rejects characters outside^[a-zA-Z0-9_\-\./]+$, any name outsidedocker/podman/nerdctlwhen the value carries no path separator, and any relative path (a value containing/must start with/, so./evilresolving against the project cwd is refused). That is a typo guard: an absolute path is spawned as the binary, soREBREW_CONTAINER_RUNTIME=/tmp/evilremains a full redirection of every container run. - No claim that the project tree cannot redirect outbound traffic. A
project's
[compiler] recompile_urlapplies unlessREBREW_RECOMPILE_URLis set, and its[llm] endpointoverridesREBREW_LLM_ENDPOINT, so a cloned project chooses where the function source is sent (recompile_urlinsrc/rebrew/compiler/compile.py,llm_configinsrc/rebrew/llm_seed.py). The one thing the project cannot take is the operator's environment key:llm_configrefuses to sendREBREW_LLM_API_KEYto a non-loopback[llm].endpointunlessREBREW_LLM_ALLOW_PROJECT_ENDPOINT=1is set (_project_endpoint_allowedinsrc/rebrew/llm_seed.py). That gate reads the key's provenance, so a key committed in the project TOML still travels to that project's own endpoint, and[compiler] recompile_urlis not gated at all.REBREW_RECOMPILE_API_KEYcomes from the environment and goes to the configured service and its same-origin artifact endpoint. It requires HTTPS or the explicitly configured in-cluster HTTP host. Direct compile calls generate a fresh idempotency key. Eligible retries within the call reuse it after an ambiguous outcome. Managed jobs persist their own attempt keys for recovery. See remote compile and the jobs service. - No claim that a recompile endpoint only receives the source. The object it
returns is written to the compile workdir and parsed for that run (LIEF's
COFF parser, or host
objconvon an OMF profile). It is not published into the compile cache: the service response has no image id, so a later run compiles again instead of replaying those bytes (_cache_key_forinsrc/rebrew/compiler/compile.py). The artifact body is capped at 32 MiB (_MAX_ARTIFACT_BYTESinsrc/rebrew/compiler/recompile_client.py, declared-length and buffered-length checked before the object is written to disk and parsed, after the GET has buffered the body, so memory is not bounded). The compile cachesize_limitstill bounds locally compiled objects only, and that limit is project-supplied: the 500 MiB default (_DEFAULT_SIZE_LIMITinsrc/rebrew/compiler/cache.py) is replaced by[cache] size_limit_mibfromrebrew-project.tomlwith no upper clamp (cache_size_limitinsrc/rebrew/config.py). - No claim that a decomp.me upload is revocable, or that it leaves the host
over TLS.
POST /api/scratchhas no idempotency key and mints a public scratch, whose slug andclaim_tokenexist only in the reply. A read timeout or dropped connection can therefore hide a create the service already committed, leaving the uploaded function source, ASM, and context in a public scratch that neither the analyst norrebrewcan claim or delete.rebrew export decompmedoes not re-POST after a post-send transport failure (_never_deliveredinsrc/rebrew/decompme.py), so a single run does not mint a second orphan, but a hand-run retry still does, and the existing orphan is not discoverable from the CLI.validate_http_urladmits plainhttpto any host, so a non-TLS--apisends the function source, its object, and the returnedclaim_tokenin cleartext. - No claim that a decomp.me or other outbound URL is pinned in transport.
The wibo asset and metadata fetches, the toolchain media download, and the
GH_TOKEN-bearing GitHub commit lookup passtrust_env=False, so their httpx calls ignoreHTTPS_PROXY,SSL_CERT_FILE, andREQUESTS_CA_BUNDLE. The recompile, decomp.me, MCP and LLM clients also passtrust_env=Falseon their own clients (compiler/compile.py_shared_recompile_client,compiler/recompile_client.py,decompiler.py,skeleton.py,ghidra/client.py,ghidra/cli.py,ghidra/commands.py), so ambient*_proxyis ignored there too; ops_downloadfollows the worker's IP-pinning policy below. The OTLP span exporter (src/rebrew/telemetry.py) is not an httpx client: itsurllib.requestPOST goes through an opener built withProxyHandler({}), so ambient*_proxyvariables cannot reroute it either;REBREW_OTLP_ENDPOINTadmits plainhttp, so a non-loopback collector still receives spans (trace/span ids, op names, status codes; no source or credentials) in cleartext, and the endpoint is operator env, not project configuration. The wibo asset is capped at 64 MiB (_MAX_WIBO_DOWNLOAD_BYTESinsrc/rebrew/wibo.py), its release digest is shape-validated before the GET (exactly 64 hex, lowercased, else refused,src/rebrew/wibo.py), the release-metadata JSON at 1 MiB (_MAX_WIBO_METADATA_BYTESinsrc/rebrew/wibo.py, declared length checked, then a running cap while the body streams in, beforejsonparsing), and the toolchain media at 2 GiB (_MAX_PINNED_DOWNLOAD_BYTESinsrc/rebrew/toolchain_cli.py), and the GitHub commit lookup reply (_live_commit_sha, the bare sha requested asapplication/vnd.github.sha) at 1 MiB (_MAX_LIVE_SHA_BYTESinsrc/rebrew/toolchain_cli.py, declared length checked, then a running cap while the body streams in; anything but 40 lowercase hex is refused). These caps apply while the body streams in (read_capped_bodyinsrc/rebrew/utils.py), so they bound memory during the download. - No claim that the ops worker's presigned-URL download is SSRF-proof.
_downloadinsrc/rebrew/ops.pyrefuses aurlthat is not https, a hostless URL, or a URL carrying userinfo (parts.username or parts.password), and refuses aurlhost that resolves to a non-public address:_check_download_hostresolves the hostname and refuses any non-is_globaladdress (IP literals checked the same way) and any resolution failure. The refusal is bypassed only by the operator envREBREW_OPS_ALLOW_PRIVATE_DOWNLOAD=1, parsed strictly byparse_env_bool(src/rebrew/config.pyALLOW_PRIVATE_DOWNLOAD_ENV) and validated at startup byenv_knob_errors, so0/false/no/offkeep the refusal and a typo is aConfigErrorrather than a silent bypass; the opt-in is worker env, never request data, so a bearer holder cannot grant it._check_download_hostreturns the validated public address and_downloadpins it for the fetch (IP literal, originalHostheader andsni_hostnameso TLS verifies against the DNS name), so a DNS name that flips from public to private between the check and thehttpxGET cannot reach a private host. The DNS resolution itself is bounded to 10 s (DNS_TIMEOUT_SECONDS, a daemon thread in_check_download_host) so a hung resolver cannot pin a worker slot; a proxy resolving the name itself is not a bypass, because_downloadpassestrust_env=False(ambient*_proxyignored) while re-applying an operator-pinnedSSL_CERT_FILE/SSL_CERT_DIRexplicitly viaverify=.
These are checked behaviors, not guarantees beyond their stated scope.
- PostgreSQL schema validation.
PgsqlStore._presentchecks the exact columns, primary key, and both CHECK constraints. It caches successful checks per connection and revalidates on a fresh connection. An advisory lock serializes first-use DDL. Queries have a 30-second statement timeout and diagnostics are redacted. - Host header folding. Both sides of the Host allow-list comparison are
folded through
fold_host(src/rebrew/utils.py), which runsstrip_bidi_formatafter NFC normalization and before casefold/IDNA, so a spelling variant does not bypass the allow-list. Ops error/reply text is bidi-stripped the same way (error_bodyand_boundedinsrc/rebrew/ops.py). - OTLP endpoint validation at startup.
OTLP_ENDPOINT_ENVinsrc/rebrew/config.pyisvalidate_http_url-checked in_env_knob_parsers/env_knob_errors(reported byrebrew cfg effective), andsrc/rebrew/telemetry.pyENDPOINT_ENValiases that single source. The endpoint still admits plainhttp(above). - Splat path containment.
splat_config._relresolves paths against the operator's base and refuses input paths outside it, including paths that escape through a symlink.--applyenables writes to the project. rebrew build check --objectsinclude probe. The probe refuses whenbuild.makeor any file it includes carries make function expansion:_MAKE_INCLUDE_REinsrc/rebrew/build_check.pymatches-s?include(includingsinclude), and_probe_expansionrecurses the include graph, depth-capped at 32 with cycle tracking, refusing a computed ($-bearing) include name outright. A makefile naming its own programs without function expansion remains the disclosed residual; seedocs/THREAT_MODEL.md§5.- No
PATHlookup for native toolchain binaries. Image-less (plugin/overlay) toolchains resolve vendored-only:compiler/toolchain.py_resolve_binaryhas noshutil.whichfallback, and a binary name containing a path separator or NUL is rejected, so a hostile project cannot plantclonPATHto hijack the lookup. - Strict JSON and integer parsing.
json_print(src/rebrew/cli.py) passesallow_nan=Falseon both tty and pipe paths, soNaN/Infinitycannot emit non-strict JSON.utils.parse_int_literaltreats010as decimal ten by default.utils.parse_c_integer_literalfollows C syntax and reads it as octal eight. - Ops download client lifetime.
_downloadcloses itshttpx.Clientthrough a context manager.