Skip to content

fix(OSQUERY-010-2): CU-17tkuw5wp49 kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard - #116

Draft
flamingo[bot] wants to merge 1 commit into
masterfrom
ai-fix/osquery-010-2-59b3392d-cb1fa104
Draft

flamingo[bot] wants to merge 1 commit into
masterfrom
ai-fix/osquery-010-2-59b3392d-cb1fa104

Conversation

@flamingo

@flamingo flamingo Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Closes findings from rule OSQUERY-010-2 — kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🟢 90 high kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard plugins/logger/kafka_producer.cpp:17

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: cb1fa104-eac6-46a7-aba8-90d794c59386

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

ClickUp task: CU-17tkuw5wp49 Osquery review findings sweep (8 PRs)

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff.

#include <osquery/remote/transports/tls.h>
// clang-format on

#ifdef _WIN32

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🦩 🟠 kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard

Changed the platform guard in the top-of-file include block from #ifdef _WIN32 / #elif defined _unix_ to #ifdef WIN32 / #else, matching the canonical OSQUERY-010-2 WIN32 guard and ensuring <unistd.h> is included on all non-Windows builds instead of only on a never-defined _unix_ macro.

🤖 Prompt for AI agents
In plugins/logger/kafka_producer.cpp around line 17, review and complete this code-review fix: kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard.
What the draft fix changed: Changed the platform guard in the top-of-file include block from `#ifdef _WIN32` / `#elif defined _unix_` to `#ifdef WIN32` / `#else`, matching the canonical OSQUERY-010-2 `WIN32` guard and ensuring `<unistd.h>` is included on all non-Windows builds instead of only on a never-defined `_unix_` macro.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

@flamingo flamingo Bot changed the title fix(OSQUERY-010-2): kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard fix(OSQUERY-010-2): CU-17tkuw5wp49 kafka_producer.cpp uses _WIN32 instead of the canonical WIN32 guard Oct 12, 2026
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.

0 participants