Skip to content

feat: add fallback to process inspection so it doesn't fail on high privilege processes#46

Merged
supervoidcoder merged 1 commit intomainfrom
query-fallback
Jan 20, 2026
Merged

feat: add fallback to process inspection so it doesn't fail on high privilege processes#46
supervoidcoder merged 1 commit intomainfrom
query-fallback

Conversation

@supervoidcoder
Copy link
Owner

@supervoidcoder supervoidcoder commented Jan 20, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved process information access by implementing a fallback mechanism that attempts limited-access retrieval when full permissions are denied, broadening support for restricted processes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

In main.cpp, the PIDinspect function now implements a two-step process handle acquisition strategy. When the initial OpenProcess call with PROCESS_ALL_ACCESS fails due to access denied, the code attempts OpenProcess again with PROCESS_QUERY_LIMITED_INFORMATION permissions. This fallback mechanism allows information retrieval from restricted processes.

Changes

Cohort / File(s) Summary
Process handle fallback mechanism
main.cpp
Added conditional fallback in PIDinspect: if OpenProcess with PROCESS_ALL_ACCESS fails, attempts OpenProcess with PROCESS_QUERY_LIMITED_INFORMATION before reporting error. Enables limited information retrieval on high-privilege processes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rabbit hops through privilege gates,
With fallback paths that escalate—
First access denied? No need to fret!
A gentler query saves the day yet,
hop hop even lsass will let us in! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a fallback mechanism to process inspection to handle high-privilege processes that would otherwise fail.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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