HagiCode.ModScanner.Host 0.1.0

dotnet tool install --global HagiCode.ModScanner.Host --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.Host --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=HagiCode.ModScanner.Host&version=0.1.0
                    
nuke :add-package HagiCode.ModScanner.Host --version 0.1.0
                    

HagiCode Mod Scanner Host

A Windows-only host for HagiCode Mod Scanner. It starts the Scanner as a child process with a restricted security token inside a job object, and the host opens the files to be scanned for it through verified, read-only handles.

If the host cannot set up that isolation, it does not start the Scanner.

What it does

  • Starts the Scanner with a restricted token (DISABLE_MAX_PRIVILEGE), in a job object that enforces a deadline and a memory limit.
  • Writes the scan request to the Scanner's standard input and copies the Scanner's report back to its own standard output.
  • Opens each file to be scanned through a verified, read-only handle. The handle is held open without FILE_SHARE_DELETE, so nothing can rename, delete or replace the file while the scan runs.
  • Refuses to run the Scanner when isolation cannot be established.

Requirements

  • Windows. On any other system the host prints an error and exits with code 2.
  • A .NET runtime, Microsoft.NETCore.App 10.0.15 exactly. The tool does not roll forward to other patch or major versions.
  • The Scanner itself, SuperDuckyScanner.exe, published into the --bundle folder. The win-x64 release asset on GitHub contains that publish folder, with the Scanner, the host, rules/, refs/ and licenses/.

Use

hagicode-mod-scanner-host run --scanner <SuperDuckyScanner.exe> --bundle <dir> --snapshot <dir> --rules <rules.json> [--operation analyze|snippet] [--deadline-ms N] [--memory-mb N]

The host reads one JSON request from standard input and writes the Scanner's JSON document to standard output.

Option Meaning
--scanner The Scanner executable. The host runs the file with the same name inside --bundle, so the name must match.
--bundle The Scanner's publish folder. The Scanner's reference assemblies are read from its refs/ subfolder.
--snapshot The captured mod folder. It must equal the inputRoot of the request; if it does not, nothing is started.
--rules The rule pack to use, normally rules/built-in-rules.v1.json in the bundle.
--operation analyze (default) for a scan, or snippet for decompiled code around a finding.
--deadline-ms How long the Scanner may run before the host ends it. Default 60000.
--memory-mb Memory limit for the Scanner. Default 512.

Exit codes: 0 the Scanner completed. 13 the Scanner exited early; its exit code is written to standard error. 10 the deadline passed and the Scanner was ended. 12 the Scanner hit its memory limit. 2 usage error or a request that does not match --snapshot. 20 isolation could not be set up, so the Scanner did not start.

Report and request formats are described in the Scanner package page: HagiCode.ModScanner.

License and notices

Licensed under the Apache License, Version 2.0. 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 101 11/29/2026
0.1.0-dev.7 38 12/3/2026
0.1.0-dev.6 46 12/1/2026
0.1.0-dev.5 56 11/30/2026
0.1.0-dev.3 63 11/29/2026
0.1.0-dev.1 64 11/29/2026