[P1] Investigation Templates and Playbook Editor #89

Closed
opened 2026-06-10 03:32:30 +00:00 by Mark · 0 comments
Owner

Problem

Currently, investigation playbooks are hardcoded in the frontend (Gather.jsx). Users cannot:

  • Create custom investigation templates
  • Define conditional branching
  • Save and reuse playbooks
  • Configure step-specific options

Proposed Solution

Create a template system for investigations:

Backend Changes

  1. Create InvestigationTemplate model

    • name, description
    • steps (module, target_template, options, conditions)
    • timeout, cost_limit
  2. Add API endpoints:

    • GET /api/investigation-templates - list templates
    • POST /api/investigation-templates - create template
    • PUT /api/investigation-templates/{id} - update template
    • DELETE /api/investigation-templates/{id} - delete template
  3. Modify orchestrator to accept and run templates

    • Support conditional branching based on results
    • Handle template variables

Frontend Changes

  1. Create PlaybookEditor component

    • Drag-and-drop step ordering
    • Step configuration (module, target options)
    • Condition builder for branching
    • Save/load templates
  2. Update StartInvestigationModal

    • Template selection dropdown
    • Preview template steps before starting

Files to Create/Modify

  • backend/app/models.py - add InvestigationTemplate model
  • backend/app/routers/investigations.py - add template endpoints
  • backend/app/services/investigations/template_runner.py (new)
  • frontend/src/components/PlaybookEditor.jsx (new)
  • frontend/src/components/StepEditor.jsx (new)
  • frontend/src/components/StartInvestigationModal.jsx - update

Acceptance Criteria

  • Users can create/edit/delete investigation templates
  • Templates support multiple steps with modules
  • Conditional branching works based on results
  • Template selection available when starting investigation
  • Template steps can include variables (e.g., ${target})

Effort

High - 2 weeks

## Problem Currently, investigation playbooks are hardcoded in the frontend (Gather.jsx). Users cannot: - Create custom investigation templates - Define conditional branching - Save and reuse playbooks - Configure step-specific options ## Proposed Solution Create a template system for investigations: ### Backend Changes 1. Create InvestigationTemplate model - name, description - steps (module, target_template, options, conditions) - timeout, cost_limit 2. Add API endpoints: - GET /api/investigation-templates - list templates - POST /api/investigation-templates - create template - PUT /api/investigation-templates/{id} - update template - DELETE /api/investigation-templates/{id} - delete template 3. Modify orchestrator to accept and run templates - Support conditional branching based on results - Handle template variables ### Frontend Changes 1. Create PlaybookEditor component - Drag-and-drop step ordering - Step configuration (module, target options) - Condition builder for branching - Save/load templates 2. Update StartInvestigationModal - Template selection dropdown - Preview template steps before starting ### Files to Create/Modify - backend/app/models.py - add InvestigationTemplate model - backend/app/routers/investigations.py - add template endpoints - backend/app/services/investigations/template_runner.py (new) - frontend/src/components/PlaybookEditor.jsx (new) - frontend/src/components/StepEditor.jsx (new) - frontend/src/components/StartInvestigationModal.jsx - update ## Acceptance Criteria - Users can create/edit/delete investigation templates - Templates support multiple steps with modules - Conditional branching works based on results - Template selection available when starting investigation - Template steps can include variables (e.g., ${target}) ## Effort High - 2 weeks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/osint-hub#89
No description provided.