Skip to content

CsoKit security hardening v7 - #3

Merged
HAKAMIQ merged 1 commit into
mainfrom
fix/csokit-hardening-v7
Aug 2, 2026
Merged

CsoKit security hardening v7#3
HAKAMIQ merged 1 commit into
mainfrom
fix/csokit-hardening-v7

Conversation

@HAKAMIQ

@HAKAMIQ HAKAMIQ commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Harden native DLL loading and ABI validation
  • Complete cancellation handling
  • Enforce bounded compression workers
  • Add the Application architecture boundary
  • Enforce output filename length policy
  • Repair release and published executable smoke gates

Verification

  • Debug: 0 warnings, 0 errors
  • Release: 0 warnings, 0 errors
  • Tests: 201/201 PASS
  • Published EXE smoke: PASS
  • Native round-trip: PASS
  • Release packaging: PASS
  • Verify-Release: PASS
  • Verify-Hardening: PASS

@HAKAMIQ
HAKAMIQ merged commit 0dc30b5 into main Aug 2, 2026
1 check passed
@HAKAMIQ
HAKAMIQ deleted the fix/csokit-hardening-v7 branch August 2, 2026 11:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5644a729c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Directory.Build.props
Comment on lines +4 to +6
<Version>$(CsoKitVersion)</Version>
<PackageVersion>$(CsoKitVersion)</PackageVersion>
<InformationalVersion>$(CsoKitVersion)</InformationalVersion>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Read centralized version properties in release gates

The version fields now exist only in Directory.Build.props, but Assert-ProjectVersion in both scripts/Run-FinalReleaseGate.ps1 and scripts/Run-OfficialReleaseGate.ps1 still reads Version, PackageVersion, and InformationalVersion directly from each .csproj. Since the renamed project files contain none of those elements, every final or official release-gate invocation fails its version checks before any build starts; inspect the centralized properties or query evaluated MSBuild properties instead.

Useful? React with 👍 / 👎.

Comment on lines +10 to +11
NativeCsoRuntimeInfo info = NativeCsoRuntime.GetInfo();
Assert.True(info.IsAvailable, info.FailureReason ?? "Native backend was not available.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stage the native DLL before running release-gate tests

In the inspected scripts/Run-ReleaseGate.ps1 flow, Build-Native.ps1 leaves the DLL under artifacts/native-build, then dotnet test runs without copying it into tests/CsoKit.Tests/bin/<configuration>/net10.0. Because the hardened resolver searches only AppContext.BaseDirectory unless development search is explicitly enabled, this new mandatory assertion fails whenever the consolidated/final release gate runs; stage the DLL as CI and Verify-Hardening.ps1 already do.

Useful? React with 👍 / 👎.

Comment on lines +140 to +142
version->major = CSOKIT_VERSION_MAJOR;
version->minor = CSOKIT_VERSION_MINOR;
version->patch = CSOKIT_VERSION_PATCH;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate generated native version constants in the official gate

The inspected Assert-NativeVersion in scripts/Run-OfficialReleaseGate.ps1 requires literal assignments matching version->major = <number>; (and minor/patch), but these changed lines now assign CSOKIT_VERSION_* macros generated by CMake. Consequently the official release gate always reports a native version mismatch even when VERSION and the generated header agree; validate the CMake/generated values rather than searching this source for numeric literals.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant