-
Notifications
You must be signed in to change notification settings - Fork 595
feat: add CrowdStrike AIDR community integration #1601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview |
Greptile SummaryAdded a new community integration for CrowdStrike AIDR, enabling AI application protection through configurable detection policies for prompt injection, sensitive data exposure, malicious entities, toxic content, and topic violations. Key changes:
Implementation notes:
|
| Filename | Overview |
|---|---|
| nemoguardrails/library/crowdstrike_aidr/actions.py | New action implementing CrowdStrike AIDR API integration with proper error handling and message transformation |
| nemoguardrails/library/crowdstrike_aidr/flows.co | Colang v2 flow definitions for input/output guardrails with proper blocking and transformation logic |
| nemoguardrails/library/crowdstrike_aidr/flows.v1.co | Colang v1 flow definitions matching v2 behavior with correct event handling |
| tests/test_crowdstrike_aidr_guard.py | Comprehensive test coverage for blocked, transformed, error, and edge case scenarios |
Sequence Diagram
sequenceDiagram
participant User
participant NeMoGuardrails
participant CrowdStrikeAIDR as CrowdStrike AIDR API
participant LLM
Note over User,LLM: Input Rail Flow
User->>NeMoGuardrails: Send message
NeMoGuardrails->>NeMoGuardrails: Trigger input rail flow
NeMoGuardrails->>CrowdStrikeAIDR: POST /v1/guard_chat_completions<br/>(messages with user input)
CrowdStrikeAIDR-->>NeMoGuardrails: Return result (blocked/transformed)
alt Message blocked
NeMoGuardrails-->>User: Return "I don't know the answer"
else Message transformed
NeMoGuardrails->>NeMoGuardrails: Update user_message with transformed content
NeMoGuardrails->>LLM: Send transformed message
LLM-->>NeMoGuardrails: Generate response
NeMoGuardrails->>NeMoGuardrails: Trigger output rail flow
NeMoGuardrails->>CrowdStrikeAIDR: POST /v1/guard_chat_completions<br/>(messages with bot response)
CrowdStrikeAIDR-->>NeMoGuardrails: Return result (blocked/transformed)
alt Response blocked
NeMoGuardrails-->>User: Return "I don't know the answer"
else Response transformed
NeMoGuardrails->>NeMoGuardrails: Update bot_message with transformed content
NeMoGuardrails-->>User: Return transformed response
else Response allowed
NeMoGuardrails-->>User: Return original response
end
else Message allowed
NeMoGuardrails->>LLM: Send original message
LLM-->>NeMoGuardrails: Generate response
NeMoGuardrails-->>User: Return response (via output rail)
end
Note over NeMoGuardrails,CrowdStrikeAIDR: Error Handling
CrowdStrikeAIDR--xNeMoGuardrails: API Error (4xx/5xx)
NeMoGuardrails->>NeMoGuardrails: Log error, set blocked=false<br/>Allow message through
Greptile found no issues!From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
|
Nice! @kenany should this replace/deprecate the existing Pangea guardrail? |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Eventually, yeah. You can expect a PR from me in the future for that. |
OK great. Can you do us a favour and add a comment to the doc, to this effect? I see you put it right beside the Pangea snippet which is good, so please add something short saying that this is an evolution of the Pangea tool, as part of CrowdStrike's continued development of the Pangea technology. Something like that, up to you. And comment that you expect to deprecate the Pangea connector. Thanks! |
Description
Adds a new community integration for CrowdStrike AIDR. This is effectively an evolution of the Pangea AI Guard (#1300) product, so the guardrail works functionally the same as that existing integration minus some API differences.
@Pouyanpi
Checklist