An offline static scanner that shows what a Unity mod's code can do, before you run it.
HagiCode Mod Scanner reads the managed code of a Unity mod and reports the capabilities it can call: writing files, network access, starting other programs, loading assemblies at run time, and native (P/Invoke) calls. For each scan it also lists the files it analyzed and where its coverage is incomplete, so you can see what it did not check.
The scanner never runs the mod. It reads PE metadata and IL from disk, and it decompiles a finding on demand so you can read the code around the call.
- Static, offline analysis. It works from files on disk and does not execute the mod under analysis.
- Built-in rules for files, network, process, dynamic loading, native calls, reflection, threads, Steam API use, credential strings, cryptography, anti-analysis, persistence, exfiltration endpoints, process injection and input capture, in one versioned rule pack that also inherits rules from capa-rules (Apache-2.0). Each finding is graded by severity and, per game, by what the game's own loader does with it. See docs/rules.md.
- Unreadable code is warned about. Obfuscated identifiers, opaque or executable resources, undecodable IL and bundled patch frameworks are reported and leave coverage partial.
- Evidence, not verdicts. Each finding names its rule, the matched API, the method and the assembly. A report shows that code can make a call, not that it does something harmful.
- Coverage stated per scan. Every report lists the files analyzed and the gaps in what could be read.
- Windows isolation. A companion host runs the scanner under a restricted token, in a job object, with verified read-only access to the files it scans.
Both packages are framework-dependent .NET tools for net10.0. Each needs exactly Microsoft.NETCore.App 10.0.15, which is not bundled.
| Package | Command | Platform | Read more |
|---|---|---|---|
HagiCode.ModScanner |
hagicode-mod-scanner |
Windows, Linux | package page |
HagiCode.ModScanner.Host |
hagicode-mod-scanner-host |
Windows only | package page |
Install a package as a global tool, for example:
dotnet tool install --global HagiCode.ModScannerUntil a stable version is listed on nuget.org, add --prerelease.
Each stable GitHub release attaches win-x64 and linux-x64 assets, on the releases page. Each asset comes with a .sha256 file and a release-manifest.json listing the SHA-256 of every file.
- The analysis is static. Code reached only through reflection, runtime data, or a pattern no rule covers does not appear in a report.
- A report is a detection aid for people deciding whether to trust a mod. It is not a malware verdict and not a guarantee.
- The tool is driven by a host application over JSON on standard input and output. See the request and report schemas.
- Development: repository layout, build and test, packing.
- Releasing: the stable release and dev-channel flow.
- Third-party notices are in NOTICE and in the
licenses/folder of each package.
Licensed under the Apache License, Version 2.0. See LICENSE. Third-party components and their notices are listed in NOTICE.
