Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

#### Fixed

- **npm audit CI uses patched minimatch** — Added a `minimatch@<11.0.1` override pinned to `11.0.4` and updated the lockfile, so the transitive copies pulled in by Jest (`glob` and `test-exclude`, previously `10.2.6` and `9.0.9`) no longer carry the `GHSA-g3hv-75wg-m249` denial-of-service vulnerability. No audit exception was added.
- **ilspycmd `-o` fallback reads the IL it actually writes** — `ilspycmd -o` takes an output directory and writes `<input name>.il` inside it, but nildiff passed a file path, so the fallback always returned empty IL after a successful exit and left `ilspy_out_*` directories in the temp folder. nildiff now passes a fresh temporary directory, reads the generated `<input name>.il` file, and deletes the directory recursively after every attempt, including failures and timeouts. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.VersionLabel.cs`, `FolderDiffIL4DotNet.Tests/Helpers/FakeDisassemblerProgram.cs`. Tests: `DisassembleAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `ResolveIlspyOutputFile_ReturnsInputNamedIlFileOnly`, `BuildArgSets_IlspyCommand_PassesTemporaryOutputDirectoryToOutputFlag`, `CleanupTemporaryPathBestEffort_WhenPathIsDirectory_DeletesItRecursivelyWithoutWarning`.
- **Disassembler runs that exit 0 without IL are failures** — Such runs were accepted as successful empty IL, which skipped the remaining argument sets and disassemblers and made IL comparison fail after its raw-disassembly retries. They now count toward the disassembler failure blacklist, log a console warning with the command, file, ilspycmd output directory (marked `(no IL file found)` when ilspycmd wrote no IL file), and stderr, and continue with the next argument set or disassembler. IL cache hits that contain only disassembler notices are removed and regenerated instead of becoming empty IL. Added `ILCache.RemoveIL`. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.OutputSanitizer.cs`, `Services/Caching/ILCache.cs`, `doc/TROUBLESHOOTING.md`. Tests: `DisassembleAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenEveryToolExitsZeroWithoutIl_ThrowsInsteadOfReturningEmptyIl`, `DisassembleAsync_WhenCachedIlContainsOnlyToolNotices_RemovesEntryAndRegeneratesIl`, `ILCacheRemoveIL_RemovesMemoryAndDiskEntries`, `ContainsIlContent_DetectsAnyLineThatIsNeitherBlankNorToolNotice`.
- **Disassembler timeouts are reported when a fallback succeeds** — A timed-out attempt was silent unless every disassembler failed, so its `DisassemblerTimeoutSeconds` guidance never reached users whose run fell back to another argument set or tool. Each failed attempt is now logged with the file, command, and working directory: timeouts as console warnings that keep the `DisassemblerTimeoutSeconds` guidance, and start failures and non-zero exits in the log file only, because they are routine fallback steps (for example, a candidate tool that is not installed) and the final error already reports the root cause when every attempt fails. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `USER_GUIDE.md`, `doc/TROUBLESHOOTING.md`. Tests: `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenAttemptTimesOut_LogsTimeoutGuidanceToConsoleAndFallsBack`, `DisassembleAsync_WhenAttemptExitsNonZero_LogsFailureToFileOnlyAndFallsBack`.
Expand Down Expand Up @@ -1783,6 +1784,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

#### 修正

- **npm audit CI で修正版 minimatch を使用** — `minimatch@<11.0.1` を `11.0.4` に固定する override を追加して lockfile を更新し、Jest が依存先として取り込む `glob` と `test-exclude` 経由のコピー(従来は `10.2.6` と `9.0.9`)から `GHSA-g3hv-75wg-m249` のサービス拒否の脆弱性を解消しました。監査例外は追加していません。
- **ilspycmd の `-o` フォールバックで実際に書き出された IL を読むように修正** — `ilspycmd -o` は出力ディレクトリを受け取り、その中に `<入力名>.il` を書き出しますが、nildiff はファイルパスを渡していたため、このフォールバックは正常終了しても常に空の IL を返し、一時フォルダに `ilspy_out_*` ディレクトリを残していました。新しい一時ディレクトリを渡して生成された `<入力名>.il` ファイルを読み取り、失敗やタイムアウトを含むすべての試行の後にディレクトリを再帰的に削除するようにしました。対象: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.VersionLabel.cs`, `FolderDiffIL4DotNet.Tests/Helpers/FakeDisassemblerProgram.cs`。テスト: `DisassembleAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `ResolveIlspyOutputFile_ReturnsInputNamedIlFileOnly`, `BuildArgSets_IlspyCommand_PassesTemporaryOutputDirectoryToOutputFlag`, `CleanupTemporaryPathBestEffort_WhenPathIsDirectory_DeletesItRecursivelyWithoutWarning`。
- **終了コード 0 で IL を出さない逆アセンブラ実行を失敗として扱うように修正** — このような実行は空の IL として成功扱いされていたため、残りの引数セットや逆アセンブラが試されず、IL 比較は raw 逆アセンブルの再試行後に失敗していました。逆アセンブラ失敗のブラックリスト計数に含め、コマンド、ファイル、ilspycmd の出力ディレクトリ(ilspycmd が IL ファイルを書かなかった場合は `(no IL file found)` を付記)、stderr を含む警告をコンソールに出力したうえで、次の引数セットまたは逆アセンブラへ進むようにしました。逆アセンブラの通知行だけを含む IL キャッシュヒットは、空の IL にせず削除して再生成します。`ILCache.RemoveIL` を追加しました。対象: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.OutputSanitizer.cs`, `Services/Caching/ILCache.cs`, `doc/TROUBLESHOOTING.md`。テスト: `DisassembleAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenEveryToolExitsZeroWithoutIl_ThrowsInsteadOfReturningEmptyIl`, `DisassembleAsync_WhenCachedIlContainsOnlyToolNotices_RemovesEntryAndRegeneratesIl`, `ILCacheRemoveIL_RemovesMemoryAndDiskEntries`, `ContainsIlContent_DetectsAnyLineThatIsNeitherBlankNorToolNotice`。
- **フォールバックが成功した場合も逆アセンブラのタイムアウトを通知するように修正** — タイムアウトした試行は、すべての逆アセンブラが失敗しない限り何も出力されなかったため、別の引数セットやツールへフォールバックした実行では `DisassemblerTimeoutSeconds` の案内が利用者に届きませんでした。失敗した各試行を、ファイル、コマンド、作業ディレクトリとともにログ出力するようにしました。タイムアウトは `DisassemblerTimeoutSeconds` の案内を含む警告としてコンソールにも出力し、起動失敗と非 0 終了はログファイルのみに記録します。後者はフォールバックの通常過程(未インストールの候補ツール等)であり、すべての試行が失敗した場合は最終エラーが原因を報告するためです。対象: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `USER_GUIDE.md`, `doc/TROUBLESHOOTING.md`。テスト: `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenAttemptTimesOut_LogsTimeoutGuidanceToConsoleAndFallsBack`, `DisassembleAsync_WhenAttemptExitsNonZero_LogsFailureToFileOnlyAndFallsBack`。
Expand Down
51 changes: 13 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"overrides": {
"brace-expansion@<1.1.18": "1.1.18",
"brace-expansion@>=2.0.0 <2.1.7": "2.1.7",
"js-yaml@>=3.0.0 <3.15.2": "3.15.2"
"js-yaml@>=3.0.0 <3.15.2": "3.15.2",
"minimatch@<11.0.1": "11.0.4"
}
}
Loading