A library for patching, replacing and decorating .NET and Mono methods during runtime
This report summarizes scanner evidence for pardeike/Harmony, a C# project with 6,737 GitHub stars. SynthScan examined 102,762 lines of code across 333 source files, recording 127 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 1.4 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-15.
Can maintainers explain intent, assumptions, and trade-offs? 125 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 21 finding(s).
Which changes need focused human review? 127 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 127 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | drafts/Infixes.md | 21 | Console.WriteLine($"--> OriginalMethod_Patched_By_Harmony={test.OriginalMethod_Patched_By_Harmony(123, "foobartest")}"); | COMMENT |
| LOW | Harmony/Tools/Traverse.cs | 61 | COMMENT | |
| LOW | Harmony/Tools/Traverse.cs | 261 | /// <typeparam name="T">The type of the field</typeparam> | COMMENT |
| LOW | Harmony/Tools/FileLog.cs | 201 | public static void LogILComment(int codePos, string comment) | COMMENT |
| LOW | Harmony/Tools/SymbolExtensions.cs | 21 | /// | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 141 | /// <param name="type">The class/type to start with</param> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 361 | /// <returns>A method or null when the property cannot be found</returns> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 381 | /// <returns>A method or null when the property cannot be found</returns> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 461 | /// <summary>Gets the reflection information for the getter method of a property by searching the type and all its sup | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 481 | /// <summary>Gets the reflection information for the setter method of a property by searching the type and all its sup | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 581 | /// <param name="typeColonName">The member in the form <c>TypeFullName:MemberName</c>, where TypeFullName matches the | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 601 | /// <param name="name">The name of the event (case sensitive)</param> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 661 | } | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 801 | } | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1201 | return [.. method.GetParameters().Select(p => p.ParameterType).Select(pType => | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1221 | /// <returns>A readable/assignable reference to the field</returns> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1241 | /// Similarly, <typeparamref name="F"/> is not required to be the field's field type, unless that type is a non-enum v | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1261 | /// The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other val | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1301 | /// <remarks> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1341 | /// <param name="fieldName">The name of the field</param> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1401 | /// <typeparam name="F"> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1461 | /// </typeparam> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1501 | catch (Exception ex) | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1541 | } | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1601 | { | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1641 | /// The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other val | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1761 | /// instance delegate where the delegate invocation always applies to the given <paramref name="instance"/>. | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1941 | public static DelegateType MethodDelegate<DelegateType>(string typeColonName, object instance, bool virtualCall) where | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1961 | /// This argument only matters if the target <paramref name="typeColonName"/> signature contains a value type (such as | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 1981 | COMMENT | |
| LOW | Harmony/Tools/AccessTools.cs | 2121 | /// </summary> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 2141 | /// <param name="result">[out] The copy of the original object</param> | COMMENT |
| LOW | Harmony/Tools/AccessTools.cs | 2321 | /// <summary>Tests if a type is a numerical type</summary> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 21 | /// <param name="func">The evaluation function returning T</param> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 41 | /// <param name="name">The name of the field</param> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 61 | /// <param name="type">The class/type where the property is declared</param> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 81 | /// <summary>Gets the reflection information for the getter method of a directly declared indexer property</summary> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 101 | COMMENT | |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 121 | public static MethodInfo PropertyGetter(this Type type, string name) => AccessTools.PropertyGetter(type, name); | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 141 | /// | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 161 | /// <returns>A method or null when type/name is null or when the event cannot be found</returns> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 181 | /// <param name="name">The name</param> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 201 | /// <param name="parameters">Optional parameters to target a specific overload of the method</param> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 221 | COMMENT | |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 241 | COMMENT | |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 261 | public static List<MethodInfo> GetDeclaredMethods(this Type type) => AccessTools.GetDeclaredMethods(type); | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 281 | COMMENT | |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 301 | public static ConstructorInfo FirstConstructor(this Type type, Func<ConstructorInfo, bool> predicate) => AccessTools.F | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 321 | /// A readable/assignable <see cref="AccessTools.FieldRef{T,F}"/> delegate with <c>T=object</c> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 341 | /// either that type or the underlying integral type of that enum type | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 361 | /// <summary>Creates an (possibly uninitialized) instance of a given type</summary> | COMMENT |
| LOW | Harmony/Tools/AccessToolsExtensions.cs | 381 | /// <returns>True if the type is a value type</returns> | COMMENT |
| LOW | Harmony/Tools/Extensions.cs | 101 | /// <param name="pinfo">The array of parameter infos</param> | COMMENT |
| LOW | Harmony/Tools/Extensions.cs | 401 | /// <summary>Shortcut for <code>code.opcode == opcode && code.OperandIs(operand)</code></summary> | COMMENT |
| LOW | Harmony/Tools/Extensions.cs | 801 | /// <typeparam name="T">The inner type of the collection</typeparam> | COMMENT |
| LOW | Harmony/Tools/Extensions.cs | 821 | /// <returns>The array containing the item</returns> | COMMENT |
| LOW | Harmony/Tools/CodeMatch.cs | 161 | COMMENT | |
| LOW | Harmony/Tools/CodeMatch.cs | 181 | public static CodeMatch IsStarg(int? n = null) => new(instruction => instruction.IsStarg(n)); | COMMENT |
| LOW | Harmony/Tools/CodeMatch.cs | 201 | /// <summary>Tests if the code instruction calls the constructor</summary> | COMMENT |
| LOW | Harmony/Tools/CodeMatch.cs | 221 | /// <summary>Tests if the code instruction loads a floating point constant</summary> | COMMENT |
| 37 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Documentation/templates/harmony/styles/docfx.js | 846 | function updateVisibilityAndSelection(group, state) { | CODE |
| LOW | Documentation/templates/harmony/styles/docfx.js | 949 | function updateTabsQueryStringParam(state) { | CODE |
| LOW | Documentation/templates/harmony/styles/docfx.js | 1090 | function workAroundFixedHeaderForAnchors() { | CODE |
| LOW | docs/styles/docfx.js | 846 | function updateVisibilityAndSelection(group, state) { | CODE |
| LOW | docs/styles/docfx.js | 949 | function updateTabsQueryStringParam(state) { | CODE |
| LOW | docs/styles/docfx.js | 1090 | function workAroundFixedHeaderForAnchors() { | CODE |
| LOW⚡ | scripts/release_test.py | 50 | def test_missing_variant_fails(self): | CODE |
| LOW⚡ | scripts/release_test.py | 55 | def test_package_for_wrong_commit_fails(self): | CODE |
| LOW⚡ | scripts/release_test.py | 59 | def test_zip_from_other_build_fails(self): | CODE |
| LOW⚡ | scripts/release_test.py | 65 | def test_modified_manifest_files_fail(self): | CODE |
| LOW⚡ | scripts/release_test.py | 79 | def test_repository_signature_does_not_change_payload(self): | CODE |
| LOW⚡ | scripts/release_test.py | 86 | def test_untrusted_ci_runs_fail(self): | CODE |
| LOW⚡ | scripts/release_test.py | 95 | def test_reviewed_notes_are_not_augmented_with_automatic_entries(self): | CODE |
| LOW | scripts/release_test.py | 107 | def test_missing_reviewed_notes_fall_back_to_github_generation(self): | CODE |
| LOW | scripts/release_test.py | 118 | def test_changed_notes_fail_before_publication(self): | CODE |
| LOW | scripts/release_test.py | 137 | def test_resume_identical_packages_without_reupload(self): | CODE |
| LOW | scripts/release_test.py | 144 | def test_upload_order_ref_fat_thin(self): | CODE |
| LOW | scripts/release_test.py | 155 | def test_conflicting_public_package_stops_before_upload(self): | CODE |
| LOW | scripts/release_test.py | 164 | def test_nuget_upload_protocol_and_secret_stays_out_of_process_arguments(self): | CODE |
| LOW | scripts/release_test.py | 179 | def test_new_draft_uses_creation_response_without_waiting_for_list_visibility(self): | CODE |
| LOW | scripts/release_test.py | 195 | def test_github_draft_flags_are_json_booleans(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | docs/styles/docfx.vendor.js | 4 | void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Documentation/examples/basics.cs | 26 | FileLog.FlushBuffer(); /* don't forget to flush */ | CODE |
| MEDIUM | docs/articles/patching-auxiliary.html | 80 | <p>Here is a simple example that patches a method inside a private type:</p> | CODE |
| LOW | docs/articles/basics.html | 107 | FileLog.FlushBuffer(); /* don't forget to flush */ | CODE |
| MEDIUM | docs/articles/patching-postfix.html | 132 | <p>There are many ways to access original arguments and even private fields: by name convention and by attributes. You c | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/release.py | 144 | if (Outer(4) != 30 || Target(4) != 5) throw new Exception("Packaged Infix scope failed"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/release.py | 307 | # Create the tag only after NuGet has all three exact packages. Never move an existing tag. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/styles/docfx.vendor.js | 25 | literal:"true false nil"},c:[e.CLCM,e.CBCM,e.NM,r,a,i,t.preprocessor],i:/#/}}),e.registerLanguage("sql",function(e){var | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Harmony/Internal/Infix.cs | 33 | // TODO: implement | COMMENT |