HagiCode.ModScanner 0.1.0

dotnet tool install --global HagiCode.ModScanner --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local HagiCode.ModScanner --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=HagiCode.ModScanner&version=0.1.0
                    
nuke :add-package HagiCode.ModScanner --version 0.1.0
                    

HagiCode Mod Scanner

An offline static scanner for Unity mods. Given a mod's managed code, it reports which capabilities that code can call, lists the files it analyzed, and states where its coverage is incomplete.

The scanner reads the mod from disk and never runs it. It is built for the SuperDucky mod manager, which uses it to show what a mod can do before the user enables it.

What it reports

Built-in rules cover these capabilities:

  • Files: writes, deletes, moves and directory creation
  • Network: outbound network access
  • Process: starting other programs
  • Dynamic loading: loading assemblies at run time
  • Native calls: P/Invoke into native libraries

Each finding gives its rule ID, the matched API, the method and the assembly it was found in, and the IL offset where the call sits. A finding shows that code can make a call. It does not show that the call runs or that the mod is harmful.

How it works

  • It reads PE metadata and IL from the mod's assemblies.
  • It decompiles a finding on demand with ICSharpCode.Decompiler to show the code around the call.
  • It produces a report for a host application. It does not decide whether a mod is safe.

Requirements

  • A .NET runtime, Microsoft.NETCore.App 10.0.15 exactly. The tool does not roll forward to other patch or major versions.
  • The package is framework-dependent. No runtime is bundled.

Use

The tool is driven by a host application over standard input and output. It reads one JSON request on standard input and writes one JSON document on standard output. Standard error carries no protocol data.

hagicode-mod-scanner --version
hagicode-mod-scanner analyze --rules <rules.json>                 # ScanRequest in, ScanReport out
hagicode-mod-scanner snippet --rules <rules.json> [--refs <dir>]  # SnippetRequest in, SnippetResult out
  • --rules names the rule pack. The built-in pack, rules/built-in-rules.v1.json, ships in the package next to the program.
  • --refs names a folder of reference assemblies for the decompiler. The package includes the metadata-only .NET reference set under refs/.

Exit codes: 0 a document was written (a failed scan is still 0), 2 usage error, 3 request not readable, 4 rule pack not usable, 12 out of memory.

The request and report schemas are defined in Protocol/Wire.cs.

To run the scanner under Windows isolation, use the companion package HagiCode.ModScanner.Host.

Limits

  • The analysis is static. Code that is reached only through reflection, runtime data, or a pattern no rule covers does not appear in the report. Each scan lists the files it analyzed and its coverage gaps, so you can see what it did not check.
  • It is a detection aid, not a malware verdict and not a security guarantee.

License and notices

Licensed under the Apache License, Version 2.0. The package ships its third-party notices in licenses/: ICSharpCode.Decompiler (MIT) and the .NET reference-assembly notices. See NOTICE.

Source code, issues and releases: https://github.com/HagiCode-org/hagicode-mod-scanner

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.0 99 11/29/2026
0.1.0-dev.7 41 12/3/2026
0.1.0-dev.6 47 12/1/2026
0.1.0-dev.5 64 11/30/2026
0.1.0-dev.3 73 11/29/2026
0.1.0-dev.1 62 11/29/2026