feat: Add OpenGraph Collector Platform client type to UI - BED-7326#2446
feat: Add OpenGraph Collector Platform client type to UI - BED-7326#2446definitelynotagoblin wants to merge 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThis PR introduces support for OpenGraph Collector Platform across the codebase. Changes include a new feature flag constant in Go, type and request interface definitions in TypeScript, updates to client method signatures to accept OpenGraph payloads, an OpenAPI tag addition, and minor formatting adjustments. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/javascript/js-client-library/src/requests.ts`:
- Around line 178-181: The two unused interfaces
CreateOpenGraphCollectorPlatformEventRequest and
UpdateOpenGraphCollectorPlatformEventRequest are dead code; either delete them
or wire them into the client API: to integrate, add
CreateOpenGraphCollectorPlatformEventRequest to the createEvent union type
alongside CreateSharpHoundEventRequest | CreateAzureHoundEventRequest and add
UpdateOpenGraphCollectorPlatformEventRequest to the updateEvent union alongside
UpdateSharpHoundEventRequest | UpdateAzureHoundEventRequest, then ensure these
types are exported from the package entry point; alternatively, remove both
interface declarations and any references and ensure no exports point to them
(update the exported type list).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: ed47c8e8-5ed4-4b26-bb7d-e8a46570d92f
📒 Files selected for processing (7)
cmd/api/src/model/appcfg/flag.gopackages/go/chow/ingestvalidator/schema.gopackages/go/openapi/doc/openapi.jsonpackages/javascript/bh-shared-ui/src/components/index.tspackages/javascript/js-client-library/src/client.tspackages/javascript/js-client-library/src/requests.tspackages/javascript/js-client-library/src/types.ts
| export interface CreateOpenGraphCollectorPlatformEventRequest { | ||
| client_id: string; | ||
| rrule: string; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify these event types are not used anywhere
rg -n 'CreateOpenGraphCollectorPlatformEventRequest|UpdateOpenGraphCollectorPlatformEventRequest' --type=tsRepository: SpecterOps/BloodHound
Length of output: 308
🏁 Script executed:
#!/bin/bash
# Check client.ts for createEvent and updateEvent method signatures
rg -A 5 'createEvent|updateEvent' packages/javascript/js-client-library/src/client.ts | head -50Repository: SpecterOps/BloodHound
Length of output: 582
🏁 Script executed:
#!/bin/bash
# Read the interface definitions in requests.ts
sed -n '175,210p' packages/javascript/js-client-library/src/requests.tsRepository: SpecterOps/BloodHound
Length of output: 912
🏁 Script executed:
#!/bin/bash
# Check if these types are exported from the main entry point
rg -n 'CreateOpenGraphCollectorPlatformEventRequest|UpdateOpenGraphCollectorPlatformEventRequest' packages/javascript/js-client-library/src/index.tsRepository: SpecterOps/BloodHound
Length of output: 47
Remove or integrate OpenGraph event request types.
CreateOpenGraphCollectorPlatformEventRequest and UpdateOpenGraphCollectorPlatformEventRequest are defined and exported but are not integrated into the client methods. The createEvent method only accepts CreateSharpHoundEventRequest | CreateAzureHoundEventRequest, and updateEvent only accepts UpdateSharpHoundEventRequest | UpdateAzureHoundEventRequest. These interfaces are not used anywhere in the codebase and are not exported from the package entry point, making them dead code. Either integrate OpenGraph event support into the client methods or remove these interfaces.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/javascript/js-client-library/src/requests.ts` around lines 178 -
181, The two unused interfaces CreateOpenGraphCollectorPlatformEventRequest and
UpdateOpenGraphCollectorPlatformEventRequest are dead code; either delete them
or wire them into the client API: to integrate, add
CreateOpenGraphCollectorPlatformEventRequest to the createEvent union type
alongside CreateSharpHoundEventRequest | CreateAzureHoundEventRequest and add
UpdateOpenGraphCollectorPlatformEventRequest to the updateEvent union alongside
UpdateSharpHoundEventRequest | UpdateAzureHoundEventRequest, then ensure these
types are exported from the package entry point; alternatively, remove both
interface declarations and any references and ensure no exports point to them
(update the exported type list).
Description
Support OpenGraph Collector Platform as a client type for collectors.
Motivation and Context
Resolves BED-7326
How Has This Been Tested?
just bhe-dev
Screenshots (optional):
Types of changes
Checklist:
Summary by CodeRabbit