Describe the bug
Predefined widgets created for custom/community integrations do not render in the Alert View after action execution, despite the action returning valid JSON responses. Additionally, widget updates are not reflected after re-pushing the integration code.
I am experiencing issues with predefined widgets for custom actions in community integrations:
- Widget Not Rendering: Although the action executes successfully and returns valid JSON, the predefined widget does not appear in the Alert View
- Updates Not Applied: After modifying widget HTML/YAML and re-pushing with
mp dev-env push integration, changes are not reflected in the SOAR instance
- CSS/JS Not Working: When creating a manual HTML widget with identical code, it displays but without CSS styling. JavaScript appears to be blocked by a policy
To Reproduce
Steps to reproduce the behavior:
- In the repo Create Predefined Widget Structure
integration_name/
└── widgets/
├── action_name.yaml
└── action_name.html
- Configure Widget YAML
Reference: Stairwell Integration Example
Example action_name.yaml:
title: Host timeline
type: html
scope: alert
action_identifier: Get Host History
description: Display host history data.
data_definition:
html_height: 600
safe_rendering: false
type: html
widget_definition_scope: both
condition_group:
conditions:
- field_name: '[{stepInstanceName}.JsonResult]'
value: ''
match_type: is_not_empty
logical_operator: and
default_size: full_width
- Create Widget HTML
Example action_name.html:
...
<script>
if ('[{stepInstanceName}.is_success]' == 'true') {
hostHistoryData = [{stepInstanceName}.JsonResult]
// Widget rendering logic
}
</script>
...
- Push Integration to SOAR Instance
# Setup development environment
mp dev-env --api-root <API_ROOT> --api-key <API_KEY>
# Push integration with widget
mp dev-env push integration
-
Test Widget in SOAR
- Navigate to Google SecOps SOAR instance
- Create a playbook with the action for which the predefined widget was created
- Click "Add new Alert view" and select the role
- Execute the playbook in an Alert (action returns valid JSON response)
- Expected: Predefined widget appears in Alert View
- Actual: Widget does not render despite condition being satisfied
-
Attempt Manual Widget Creation
- Create a manual HTML widget using identical code from
action_name.html
- Result: HTML renders but CSS is not applied and JavaScript does not execute
<noscript> tags render successfully, suggesting JS execution is blocked by policy
Expected Behavior
- Predefined widget should render in Alert View when action completes successfully and condition is satisfied
- Widget updates should be reflected after re-pushing integration
- CSS and JavaScript should execute properly in predefined widgets
Actual Behavior
- Widget does not appear in Alert View despite valid JSON response
- Re-pushing integration does not update widget code
- CSS styling is not applied
- JavaScript appears to be blocked by security policy
Debugging Challenges
1. No Visibility into Widget Rendering
- No console errors or logs indicating why widget fails to render
- Condition evaluation is opaque - cannot verify if
[{stepInstanceName}.JsonResult] is being properly evaluated
2. Inconsistent Behavior
- Manual HTML widgets display (without styling) but predefined widgets do not
- Same code works in existing Content Hub integrations but not in custom integrations
<noscript> renders but <script> does not execute (refer)
3. Update Propagation Issues
- Changes to widget HTML/YAML are not reflected after
mp dev-env push integration
Additional Context
Related Community Discussions
- Facing issue with CSS and JS in predefined widgets
- Predefined widget for custom actions
Questions
-
Widget Rendering: How can I debug why the predefined widget condition is not being satisfied or why the widget fails to render after action execution?
-
Update Propagation: Why aren't widget HTML/YAML updates being applied after re-pushing the integration? Is there a cache invalidation step or additional command required?
-
CSS/JS Restrictions: What security policies govern CSS and JavaScript execution in predefined widgets? Are there specific requirements or whitelisting needed for community integrations?
-
Condition Evaluation: How can I verify that the condition field_name: '[{stepInstanceName}.JsonResult]' is being properly evaluated? Are there logs or debugging endpoints available?
-
Documentation: Will official documentation for predefined widget creation be provided? Current implementation relies on reverse-engineering existing integrations.
Describe the bug
Predefined widgets created for custom/community integrations do not render in the Alert View after action execution, despite the action returning valid JSON responses. Additionally, widget updates are not reflected after re-pushing the integration code.
I am experiencing issues with predefined widgets for custom actions in community integrations:
mp dev-env push integration, changes are not reflected in the SOAR instanceTo Reproduce
Steps to reproduce the behavior:
Reference: Stairwell Integration Example
Example
action_name.yaml:Example
action_name.html:Test Widget in SOAR
Attempt Manual Widget Creation
action_name.html<noscript>tags render successfully, suggesting JS execution is blocked by policyExpected Behavior
Actual Behavior
Debugging Challenges
1. No Visibility into Widget Rendering
[{stepInstanceName}.JsonResult]is being properly evaluated2. Inconsistent Behavior
<noscript>renders but<script>does not execute (refer)3. Update Propagation Issues
mp dev-env push integrationAdditional Context
Related Community Discussions
Questions
Widget Rendering: How can I debug why the predefined widget condition is not being satisfied or why the widget fails to render after action execution?
Update Propagation: Why aren't widget HTML/YAML updates being applied after re-pushing the integration? Is there a cache invalidation step or additional command required?
CSS/JS Restrictions: What security policies govern CSS and JavaScript execution in predefined widgets? Are there specific requirements or whitelisting needed for community integrations?
Condition Evaluation: How can I verify that the condition
field_name: '[{stepInstanceName}.JsonResult]'is being properly evaluated? Are there logs or debugging endpoints available?Documentation: Will official documentation for predefined widget creation be provided? Current implementation relies on reverse-engineering existing integrations.