onyx-scan
A static scanner for Roblox/Luau place files, plus an executing emulator that can replay a finding's handler under a mock of the documented Roblox API.
It is a linter for a narrow class of bug where a client can reach something on the server. It is source-available, not open source (FSL-1.1-Apache-2.0): read, run and modify it freely, including on commercial games; no resale or competing hosted service. It is not a security audit and not a guarantee. This build is onyx-scan 0.3.0; the precision labels were measured on the 0.2.2 token engine and are not extended to the new cross-file layer.
$ onyx scan examples/demo_addcash_before.rbxlx
1 critical issue found in 1 scripts
1 scripts · 17 lines · 1 client-reachable remotes
[CRITICAL] ONYX-L001 game.ServerScriptService.AddCash:14
Remote handler writes a client-chosen value into a currency value
Any client can fire this remote with arbitrary arguments. The handler writes a currency value, and the value written comes from the client argument, so a player chooses it.
check Fire the remote from a client with a wrong type and an extreme value. The value must not move; then repeat with the minimum and maximum you consider legal.
precision 91.7% (22/24; 95% CI 74.2–97.7%) — Right 22 times out of 24 when a human checked; two did not hold up.
[INFO ] ONYX-L016 game.ServerScriptService.AddCash:14
Client-supplied `amount` is used without a clamp
`amount` arrives from the client and is never bounded; a client can send a negative or absurd value (e.g. -1e9). Whether that inverts an economy depends on what the write feeds, which this finding names in the snippet.
check Send NaN, infinity, a negative number and a very large number. The clamp must hold on all four.
precision no measured rate (not a claim class) — No rate is claimed for this rule.
1 critical, 1 info
Precision labels were measured on the 0.2.2 engine (the author's own measurement), not an external audit — how to read the labels, with intervals:
https://github.com/onyxstaticrbx/onyx-scan#precision
Every finding also carries a paste-ready fix prompt (onyx scan --prompt), the measured
precision of its rule with the counts and interval, and the check that proves it is closed.
Your path, line and rule will differ. A scan is local and makes no network calls; nothing is changed, patched, or uploaded.
Install
The package installs from PyPI; the two example fixtures live in the repository, so a clone is the shortest path to a runnable example:
git clone https://github.com/onyxstaticrbx/onyx-scan
cd onyx-scan
python -m venv .venv
# Windows: .venv\Scripts\activate macOS/Linux: . .venv/bin/activate
pip install .
onyx scan examples/demo_addcash_before.rbxlx
The two XML fixtures are small example places, one vulnerable and one fixed. examples/rojo_demo is a
Rojo project with the same vulnerable shape spread across a server script and a ModuleScript.
Every command below runs against one of them in a clean virtualenv. If you already have a place
file, pip install onyx-scan alone is enough and onyx scan your-place.rbxlx works from any directory.
Python 3.10 or newer. The static scan needs only Python.
onyx verify needs a Luau interpreter. The verify
path is tested on Linux and WSL 2 (Ubuntu). macOS is untested; native Windows is not
supported for verify and stops with a clear message rather than running without the POSIX
limits. WSL 1 and other distros are untested. It uses POSIX process limits for untrusted code;
on native Windows it stops with a clear "not supported, use WSL 2 (Ubuntu)" message. On Linux or
WSL 2 (Ubuntu), put luau on PATH, pass --luau /path/to/luau, or set ONYX_LUAU. Without an
interpreter, onyx scan still works and onyx verify stops with a clear install message instead
of pretending to have executed anything.
What it catches
Specific shapes where a client can reach server state: a value written into currency or attributes, an external module loaded by a numeric asset id, purchase and remote handling that trusts the wrong side, and saved-data key handling. Every finding names the file and line and says what the client controls.
Where there is enough evidence, the report carries the measured precision of the rule with its
counts and 95% interval (for example 63.6% (7/11; 95% CI 35.4–84.8%), marked a lead, not a
conclusion); where there is not, it says underpowered — N checked or no measured rate rather
than quoting a number. The rule id on every finding is stable, so a finding can be matched across
runs and reports; the labels were measured on the 0.2.2 engine (onyx-scan 0.2.2): this is the author's own
self-assessment, not an external audit, and the Precision section below shows how to read them.
Some findings are informational notes for rules the precision table does not measure; those print
no measured rate in the same line rather than silently omitting it.
Precision
The measured labels are the author's self-assessment — findings read by hand, not an external
audit. Each measured rate shows the checked count and its 95% interval; no point estimate is
printed alone. A rule with too few checked findings says underpowered — N checked; a rule with
none says no measured rate. A finding's ONYX-L*** code identifies the rule whose
measured label applies.
What it does not catch
- duplication and race-condition bugs (two players acting on the same tick);
- client-trusted combat, damage or position;
- movement exploits, and anything that lives only inside Roblox's own client;
- handlers defined in another script or ModuleScript whose require form the scanner cannot resolve — simple one-hop
requireforms are resolved, and everything else is counted as unresolved; - flows that cross more than one call: the engine follows one same-script call and one resolved cross-module call, not an arbitrary chain;
- dynamic
requiretargets, asset-id/string requires, and aliases it cannot resolve. These are counted as unresolved in coverage, not treated as safe; - unsupported Rojo project features and any file skipped by the hostile-input caps.
A finding marked medium confidence is a lead from the cross-file layer, not a measured claim. The L001 precision label still describes the 0.2.2 token engine; it is not a measurement of the cross-file extension.
A place scan has a wall-clock budget: 120 seconds by default, adjustable with
--time-budget SECONDS. On expiry the scanner stops starting new scripts and returns a
partial report; the headline and coverage say how many scripts were not analyzed. This
is a fallback, not a clean result.
The hand-written parser also bounds hostile source before it can recurse or allocate without end: 8 MB source, 1,000,000 tokens, 250,000 nodes, 160 nested expressions, and 15 seconds per script. Any limit raises a counted parser fallback; it never crashes the scan. Exceeded Rojo project limits are likewise skipped with a reason.
Zero findings means those shapes were searched for and not found — it is not a statement that your game is secure. A report with skipped files, an unresolved require, a parser fallback, or an exceeded time budget is not clean; read the coverage lines.
Verify (optional)
onyx verify examples/demo_addcash_before.rbxlx
onyx verify examples/demo_addcash_before.rbxlx --fail-on-confirmed # exits 2 if confirmed
Runs the handlers under a mock of the documented Roblox API and records evidence: how many
client-shaped payloads were fired (counted by the engine, not typed in), and every before/after
move of the state a handler wrote. It is a mock, not a live game server, and the report says so.
onyx verify --fail-on-confirmed exits 2 when an exploit is confirmed, for CI.
CI and baselines
onyx scan examples/demo_addcash_before.rbxlx --json out.json # machine-readable report
onyx baseline examples/demo_addcash_before.rbxlx -o .onyx-baseline.json
onyx scan examples/demo_addcash_before.rbxlx --baseline .onyx-baseline.json --fail-on-new
onyx scan examples/demo_addcash_before.rbxlx --prompt # paste-ready fix prompts
onyx scan examples/rojo_demo # Rojo project input
--fail-on-critical is also available for a quick gate. onyx verify --fail-on-confirmed
exits 2 when it confirms an exploit, so both halves can gate CI.
Formats
.rbxlx (place) and .rbxmx (model) are the supported XML formats. A file saved as XML but named
.rbxl or .rbxm is read too. A binary .rbxl cannot be read; export it in Studio via
File → Save to File As…, then pick Roblox XML Place Files (*.rbxlx) under Save as type.
In Team Create, save File → Download a Copy first, open that copy, then save it as XML.
A directory containing default.project.json is read as a Rojo project:
onyx scan examples/rojo_demo
The mapper supports .server.lua(u), .client.lua(u), plain .lua(u) module scripts, init.lua(u), .meta.json, $path, $className and nested projects. A source file above the per-file cap, a $path that escapes the project root, a symlink, or a file that is not a Luau script is refused or skipped with a coverage reason; it is never read silently. Unsupported project features are listed in the report. If a studio's layout is not supported, building it with rojo build to a .rbxlx first is still a valid path — but native project input is the supported workflow here.
FAQ
Does it change my game? No. It reads a file and prints findings. Nothing is applied.
Does my file leave my computer? No. The tool makes no network calls, and the file never leaves your computer.
What does "0 findings" mean? Those specific shapes were searched for and not found. It does not mean secure. For Rojo input, check the coverage lines: skipped files, parser fallbacks and unresolved requires make the result partial, not clean.
onyx rules? Lists every rule id and what it catches, so a finding's ONYX-L*** code can be
looked up by rule id.
What if a finding is wrong? Open a wrong finding issue with the rule id, path:line and one sentence. That is how the rules get better. Please don't post your place file or any credentials.
Windows? onyx scan works on Windows with Python 3.10+ from python.org; it has been tested
by the maintainer on Windows. onyx verify is not supported on native Windows yet: it executes
untrusted place code and needs POSIX CPU, memory and file-size limits, so this build refuses instead
of running without them. onyx verify is tested on Linux and WSL 2 (Ubuntu); macOS is untested.
WSL 1 and other distros are untested. The Windows commands are:
py -m pip install onyx-scan
py -m onyx.cli scan place.rbxlx
Licence
Functional Source License 1.1, Apache 2.0 Future License (FSL-1.1-Apache-2.0). Source-available,
not open source. You may read, run, modify and share the code for any purpose except a competing
use — commercially scanning your own games is allowed. After two years from each version's release,
that version becomes available under Apache 2.0. The full canonical text is in LICENSE.
Metadata
Release files for onyx-scan 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| onyx_scan-0.3.0.tar.gz | 109.1 kB | With provenance | Details for onyx_scan-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| onyx_scan-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for onyx_scan-0.3.0-py3-none-any.whl |
Total release size: 221.1 kB
Release files / onyx_scan-0.3.0.tar.gz
| Download URL | onyx_scan-0.3.0.tar.gz |
|---|---|
| Size | 109.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ff788f5a200027c0d1675b03818461de2d28064b6ac2dceabe5973286170353
|
|
BLAKE2b-256 checksum How to use checksums |
cfe466dd7edae1f08eeb272fa8f3688fdef78d1d7abe198f6ad0e25e34729bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / onyx_scan-0.3.0-py3-none-any.whl
| Download URL | onyx_scan-0.3.0-py3-none-any.whl |
|---|---|
| Size | 112.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47bb9956a3a731a35675c6f58e9b7c2257ec4e655a8a1c9fe361fbb1f73a6b96
|
|
BLAKE2b-256 checksum How to use checksums |
62f1975000fde9fe2b673d95b4e8d1dbc9d8c0ec86247fd48920189cae7303a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for onyx-scan 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for onyx_scan-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.