9 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 f257ec9393 test: property-based tests with FsCheck
FsCheck runs each property on 500 random inputs and reports the smallest one that fails:
- the checksum parser accepts any text (random and checksum-shaped lines) without throwing, and whatever it accepts
  is a hexadecimal digest of the algorithm's length;
- GNU (with backslashes and line breaks in names), BSD and SFV files read back exactly what ChecksumWriter wrote;
- ChecksumEntry.ResolvePath never returns a network or device path and refuses names starting with // or \;
- HashMatcher ignores letter case, spaces and a 0x prefix, rejects wrong lengths and non-hex digits, and accepts the
  reversed CRC32 that Hash Tool 1.1 wrote;
- TextHashing writes every line break the chosen way.

OpenSSF Scorecard counts FsCheck as fuzzing. FsCheck (BSD-3-Clause) is a test-only dependency, updated by Dependabot
with the other test packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:17:31 +07:00
poli0981andClaude Opus 5.5 26fc900197 build(deps): .NET 10.0.15 (SDK 10.0.404) and current packages
- SDK 10.0.404 with the 10.0.15 runtime, a security release (CVE-2026-109475, CVE-2026-105544, CVE-2026-114155,
  CVE-2026-118747) that the self-contained downloads include.
- Avalonia 12.1.6, Microsoft.Extensions and System.IO.Hashing 10.0.15, System.CommandLine 2.0.15,
  Meziantou.Analyzer 3.0.341, dotnet-sonarscanner 12.1.0.
- DisableTransitiveFrameworkReferenceDownloads: projects with a runtime identifier (the NativeAOT CLI) no longer
  restore the ASP.NET Core and Windows Desktop runtime packs, whose advisories raised Dependabot alerts for runtimes
  Hash Tool never ships.
- Dependabot keeps Microsoft.Extensions, System.IO.Hashing, System.CommandLine and the SDK on .NET 10 (LTS): moving
  to a new major version is done on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 08:48:35 +07:00
dependabot[bot] 3987be2094 Bump Meziantou.Analyzer from 3.0.317 to 3.0.320
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.320
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-10 21:05:13 +07:00
poli0981andClaude Opus 5.5 8465c84f6e build(deps): .NET 10.0.14 (SDK 10.0.403) and current packages and actions
.NET 10.0.14 is an out-of-band security release (Brotli decoder
CVE-2026-111497, SocketAsyncEventArgs CVE-2026-70197). global.json now
requires SDK 10.0.403, so self-contained builds bundle the patched runtime.

- Microsoft.Extensions.*, System.IO.Hashing 10.0.13 -> 10.0.14
- System.CommandLine 2.0.13 -> 2.0.14
- Meziantou.Analyzer 3.0.303 -> 3.0.317 (no new findings)
- github/codeql-action v4.39.0 -> v4.39.1, zizmor-action v0.7.1 -> v0.8.0
  (zizmor 1.31.1 is still the latest)

xunit.v3 stays on 3.2.2: Avalonia.Headless.XUnit 12.1.4 still fails with
xunit.v3 4.x (AvaloniaUI/Avalonia#22072 is open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:12:31 +07:00
dependabot[bot] d1c85687ad Bump ReferenceTrimmer from 3.5.9 to 3.5.13
---
updated-dependencies:
- dependency-name: ReferenceTrimmer
  dependency-version: 3.5.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-25 11:08:42 +07:00
poli0981andClaude Opus 5.5 c8ccabee57 fix: harden parsing and edge cases found by new analyzers
Enables Meziantou.Analyzer and ReferenceTrimmer for every project (CI builds
with -warnaserror) and fixes what they and the new tests found:

- Checksum parsing bounds regex work: 1 s match timeout and over-long lines
  are reported as invalid instead of stalling.
- Release notes from the network are converted with timed-out generated
  regexes; blank lines before lists are no longer swallowed.
- --files-from only deletes the app's own temporary list, never an
  arbitrary file passed on the command line.
- Opening the data folder no longer accepts sibling folders that merely
  share a name prefix.
- Search highlighting uses the same culture-aware match length as the
  filter.
- British English is detected for Australia, New Zealand, Ireland and
  South Africa.
- Separate run/stop buttons per row so the tooltip and screen-reader name
  match the action; JSON/CSV export types are translated.
- Settings saves are serialised under a lock; ConfigureAwait in Core.
- Version 1.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:16:40 +07:00
poli0981andClaude Opus 5.5 eaaf6198a4 feat(core): hashing engine, checksum files, safe folder walking, settings store
HashTool.Core now holds everything that does not need a UI:
- HashEngine reads a file once for any number of algorithms, overlaps disk
  reads with hashing (double buffering), uses BLAKE3's multi-threaded mode
  for large blocks and opens files with FileShare.ReadWrite|Delete so files
  still open in another program can be hashed.
- CRC-32 is now printed in the conventional big-endian order (CBF43926 for
  "123456789"); HashMatcher still accepts the reversed values written by 1.x.
- ChecksumParser reads GNU (sha256sum), BSD/--tag, xxhsum, SFV, bare 1.x
  sidecars and certutil output, including UTF-16 files; ChecksumWriter writes
  GNU, BSD, SFV, JSON and CSV (formula-injection safe). Network (UNC) and
  device paths inside checksum files are never resolved.
- ChecksumFileNames recognises checksum files by extension and *SUMS names
  instead of Enum.TryParse, which accepted numeric extensions like .001.
- FileEnumerator walks folders on a background-friendly lazy enumerator,
  skips unreadable folders and does not follow symbolic links or junctions
  (the old walker looped forever on link cycles).
- BatchProcessor runs small files in parallel and large files in their own
  lane, with per-file cancellation and timeouts, and reports every item once.
- SettingsStore saves atomically, recovers from corrupt files (keeps a .bak),
  clamps values, reads 1.x files and imports font_settings.json, which 1.1.x
  used as the only store for font choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:16:40 +07:00
poli0981andClaude Opus 5.5 e6de26a9f8 build(deps): upgrade to Avalonia 12.1 and current releases of every package
- Avalonia 11.3.11 -> 12.1.4, Material.Icons.Avalonia 2.4.1 -> 3.0.2,
  CommunityToolkit.Mvvm 8.2.1 -> 8.4.2, Blake3 2.2.0 -> 3.0.2 (managed SIMD
  implementation), Velopack 0.0.1298 -> 1.2.161, System.IO.Hashing
  11.0.0-preview -> 10.0.13 (stable for net10).
- Drop the unused Avalonia.Controls.DataGrid, Avalonia.Controls.ColorPicker
  and the deprecated Avalonia.Diagnostics packages.
- Avalonia 12 API migration: remove the BindingPlugins workaround (data
  annotation validation is off by default), DragEventArgs.DataTransfer +
  DataFormat.File + TryGetFiles(), Clipboard.SetTextAsync extension,
  WindowDecorations instead of SystemDecorations/ExtendClientAreaChromeHints,
  TextBox.PlaceholderText instead of Watermark.
- Fixes GHSA-xrw6-gwf8-vvr9: Tmds.DBus.Protocol now resolves to 0.94.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:16:40 +07:00
poli0981andClaude Opus 5.5 052ed6819f refactor: move the app into src/ and extract HashTool.Core
- src/HashTool.App: the Avalonia app (namespace HashTool.App). The assembly
  keeps the name CheckHash because every 1.x release shipped CheckHash(.exe)
  as Velopack's mainExe.
- src/HashTool.Core: UI-independent hashing code (HashService, HashType,
  ProgressStream, ProcessingStrategyService, AppConstants).
- tests/HashTool.Core.Tests: xUnit v3 characterization tests for the hashing
  service, including the current little-endian CRC-32 output.
- Directory.Build.props (shared settings, NuGet audit), central package
  management, global.json (SDK 10.0.4xx, Microsoft.Testing.Platform runner),
  .editorconfig, HashTool.slnx replace CheckHash.csproj/CheckHash.sln.
- Only the icon and logo are embedded as Avalonia resources; screenshots move
  to docs/images and are no longer compiled into the binary.
- Drop the unused generated Resources.Designer.cs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:16:40 +07:00