Skip to content

Operation created via API always uses "ad-hoc" adversary even when valid adversary_id is provided #3195

@samiha26

Description

@samiha26

Operation created via API always uses "ad-hoc" adversary even when valid adversary_id is provided

Description
When creating an operation via the API, even though I provide a valid adversary_id in the payload, the operation is always created with the "ad-hoc" adversary (an empty profile). As a result, the operation does not run as expected.

Steps followed
Steps to reproduce the behavior:

  1. Created an adversary with abilities assigned (verified in the Caldera UI).
  2. Used the API to create an operation with a payload like:
    {
      "name": "react",
      "adversary_id": "426382f6-9811-4751-be04-2642f5f3db8c",
      "planner": { "id": "aaa7c857-37a0-4c4a-85f7-4e9f7f30e31a" },
      "agent_group": ["reharu"]
    }
  3. The operation is created, but the response shows:
    {
      "adversary": {
      "adversary_id": "ad-hoc",
      "name": "ad-hoc",
      "description": "an empty adversary profile",
      "atomic_ordering": [],
    }}
  4. The operation does not run as expected.

Expected behavior
The operation should use the adversary specified by adversary_id and run with its assigned abilities.

Environment:
Caldera version: 5.3.0
API endpoint: /api/v2/operations
How I'm calling the API: using fetch

Additional context
Double checked:
The adversary exists and has abilities assigned.
The same adversary works when creating operations via the Caldera web UI.
No errors are returned in the API response.

Screenshots / Logs
Operation stops instantly without running:
Image

In caldera UI, it shows the operation doesn't run:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions