Skip to content

feat: Add OpenGraph Collector Platform client type to UI - BED-7326#2446

Open
definitelynotagoblin wants to merge 2 commits intomainfrom
anemeth/og-collector-platform-ui
Open

feat: Add OpenGraph Collector Platform client type to UI - BED-7326#2446
definitelynotagoblin wants to merge 2 commits intomainfrom
anemeth/og-collector-platform-ui

Conversation

@definitelynotagoblin
Copy link
Contributor

@definitelynotagoblin definitelynotagoblin commented Mar 2, 2026

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

  • New feature (non-breaking change which adds functionality)

Checklist:

Summary by CodeRabbit

  • New Features
    • Added OpenGraph Collector Platform support, enabling creation and management of OpenGraph collectors with configurable clients and event scheduling capabilities.

@definitelynotagoblin definitelynotagoblin self-assigned this Mar 2, 2026
@definitelynotagoblin definitelynotagoblin added enhancement New feature or request user interface A pull request containing changes affecting the UI code. labels Mar 2, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Feature Flag Configuration
cmd/api/src/model/appcfg/flag.go
Added new feature flag constant FeatureOpenGraphCollectorPlatformSupport to enable OpenGraph Collector Platform support.
Go Documentation & Schema
packages/go/chow/ingestvalidator/schema.go
Minor formatting change in license comment (tab-based indentation adjustment).
OpenAPI Documentation
packages/go/openapi/doc/openapi.json
Added "OpenGraph" tag to the Community & Enterprise tag group in the OpenAPI specification.
JavaScript Component Exports
packages/javascript/bh-shared-ui/src/components/index.ts
Reordered export statement for ConditionalTooltip; no change to exported symbols.
JavaScript Type Definitions
packages/javascript/js-client-library/src/types.ts
Added OpenGraphCollectorPlatformCollectorType type literal and extended CollectorType union to include it.
JavaScript Request Interfaces
packages/javascript/js-client-library/src/requests.ts
Added four new request interfaces: CreateOpenGraphCollectorPlatformClientRequest, UpdateOpenGraphCollectorPlatformClientRequest, CreateOpenGraphCollectorPlatformEventRequest, and UpdateOpenGraphCollectorPlatformEventRequest.
JavaScript Client Methods
packages/javascript/js-client-library/src/client.ts
Updated createClient and updateClient method signatures to accept OpenGraph request types; added corresponding type imports from requests module.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding OpenGraph Collector Platform as a new client type with a reference to the tracking ticket BED-7326.
Description check ✅ Passed The description includes all major template sections with appropriate content: clear description, motivation with ticket resolution, testing information, and completed checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch anemeth/og-collector-platform-ui

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.

@definitelynotagoblin definitelynotagoblin marked this pull request as ready for review March 11, 2026 17:47
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3607511 and 9e684d2.

📒 Files selected for processing (7)
  • cmd/api/src/model/appcfg/flag.go
  • packages/go/chow/ingestvalidator/schema.go
  • packages/go/openapi/doc/openapi.json
  • packages/javascript/bh-shared-ui/src/components/index.ts
  • packages/javascript/js-client-library/src/client.ts
  • packages/javascript/js-client-library/src/requests.ts
  • packages/javascript/js-client-library/src/types.ts

Comment on lines +178 to +181
export interface CreateOpenGraphCollectorPlatformEventRequest {
client_id: string;
rrule: string;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify these event types are not used anywhere
rg -n 'CreateOpenGraphCollectorPlatformEventRequest|UpdateOpenGraphCollectorPlatformEventRequest' --type=ts

Repository: 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 -50

Repository: 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.ts

Repository: 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.ts

Repository: 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request user interface A pull request containing changes affecting the UI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant