Skip to content

Fix case-sensitive AD self-add group comparison#4112

Open
srkyn wants to merge 1 commit into
splunk:developfrom
srkyn:fix-ad-self-group-case-compare
Open

Fix case-sensitive AD self-add group comparison#4112
srkyn wants to merge 1 commit into
splunk:developfrom
srkyn:fix-ad-self-group-case-compare

Conversation

@srkyn

@srkyn srkyn commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the Windows AD add Self to Group analytic so the self-add comparison is case-insensitive:

| where lower(user)=lower(src_user)

Why

Issue #4105 reports that matching can fail when the same account appears with different casing, for example user=DA-1 and src_user=da-1.

Validation

python scripts/validate_yaml.py detections/endpoint/windows_ad_add_self_to_group.yml

Result:

[PASS] All 1 file(s) passed validation!

Fixes #4105.

@srkyn

srkyn commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Rechecked this branch after the failed CI run. The PR diff is still limited to the intended case-insensitive comparison plus version/date bump, and the detection YAML parses cleanly.

Local sanity check passed:

  • confirmed lower(user)=lower(src_user) is present
  • confirmed version is bumped to 11
  • parsed detections/endpoint/windows_ad_add_self_to_group.yml with PyYAML

The two failing GitHub Actions jobs appear to be blocked before exercising this detection because forked PR runs do not receive Splunk credentials:

  • appinspect: APPINSPECTUSERNAME / APPINSPECTPASSWORD are empty, then Splunk API login returns 400 Client Error
  • unit-testing: contentctl-ng install exits with Splunkbase credentials not provided in environment variables

The other checks (YAML Validation, build, and response template build) passed.

@patel-bhavin

Copy link
Copy Markdown
Contributor

@srkyn - thank you for the PR and doing the testing locally, I think the fix makes sense and I will raise this issue of unit-testing needing creds. We recently updated our tooling and didnt think of this issue coming up! I will get back to you!

@srkyn

srkyn commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, that makes sense. I will leave the branch as-is unless you want a change from my side. The detection diff is intentionally small: case-insensitive comparison only, plus version/date metadata.

@srkyn srkyn force-pushed the fix-ad-self-group-case-compare branch from 77d14ed to 57f0fca Compare June 8, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]Logic Problem of Windows AD add Self to Group

2 participants