Skip to content

fix: Null protection on Security Descriptor owner - BED-9499 - #311

Open
definitelynotagoblin wants to merge 1 commit into
v4from
anemeth/null-owner-fix
Open

fix: Null protection on Security Descriptor owner - BED-9499#311
definitelynotagoblin wants to merge 1 commit into
v4from
anemeth/null-owner-fix

Conversation

@definitelynotagoblin

@definitelynotagoblin definitelynotagoblin commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Don't throw when Security Descriptor has no owner.

Motivation and Context

This PR addresses: BED-9499

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Summary by CodeRabbit

  • Bug Fixes
    • Security descriptor ownership checks now safely return no owner when none is configured, instead of causing an error.

@definitelynotagoblin definitelynotagoblin self-assigned this Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0848d2f7-51c7-42da-a867-7c92577eedd7

📥 Commits

Reviewing files that changed from the base of the PR and between fcb6cb9 and 8c125f5.

📒 Files selected for processing (2)
  • src/CommonLib/SecurityDescriptor.cs
  • test/unit/SecurityDescriptorTests.cs

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

GetOwner now returns null for security descriptors without an owner. A Windows-only unit test verifies this behavior.

Changes

Owner handling

Layer / File(s) Summary
Handle missing owners
src/CommonLib/SecurityDescriptor.cs, test/unit/SecurityDescriptorTests.cs
GetOwner preserves a null owner instead of throwing. A Windows-only xUnit test verifies the behavior.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: 🔵 Low · up to 8c125

The null-owner fix is localized, but its nullable return-type annotation may trigger a compiler diagnostic because nullable reference types are not enabled for this project. The PR is mergeable with explicit owner follow-up to adjust the annotation or project configuration.

Poem

I’m a rabbit with ears held high

No owner? null now passes by
The descriptor stays calm and clear
A Windows test confirms it here
No null reference makes me fear
Hop, hop, the fix is near

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description identifies the bug, motivation, issue ID BED-9499, bug-fix type, test coverage, and checklist status. The detailed testing section is not completed, but the description is otherwise mo…
Title check ✅ Passed The title clearly identifies the null-protection fix for the Security Descriptor owner and includes the related issue ID.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description identifies the bug, motivation, issue ID BED-9499, bug-fix type, test coverage, and checklist status. The detailed testing section is not completed, but the description is otherwise mostly complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch anemeth/null-owner-fix

Comment @coderabbitai help to get the list of available commands.

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