mitre / caldera

Automated Adversary Emulation Platform
https://caldera.mitre.org
Apache License 2.0
5.55k stars 1.06k forks source link

Docker image (ghcr.io/mitre/caldera:5.0.0) does not contain Magma (dist) build files #2949

Open d3vzer0 opened 5 months ago

d3vzer0 commented 5 months ago

Describe the bug The docker image (ghcr.io/mitre/caldera:5.0.0) does not contain the Magma plugin (dist) build files. Starting the container will fail with the following error:

ValueError: No directory exists at '/usr/src/app/plugins/magma/dist/assets'

This could be caused by an older Dockerfile being used which does not build Magma plugin's Vue project as part of the docker build process. If I build the container myself using the latest Dockerfile found in the repo, the container will start successfully.

To Reproduce Steps to reproduce the behavior:

  1. Start a caldera container with docker using docker run ghcr.io/mitre/caldera:5.0.0 or
  2. Start a caldera container with Podman using podman run ghcr.io/mitre/caldera:5.0.0

Expected behavior The container to start successfully

Screenshots Screenshot 2024-04-15 at 14 49 43

Desktop (please complete the following information):

github-actions[bot] commented 5 months ago

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

d3vzer0 commented 5 months ago

It seems that this issue is related but the changes are not represented in the hosted Docker image itself (yet)

digoblin commented 4 months ago

The problem seems to come from specifying the 5.0.0 branch, if you get the latest build, you should get the updated Dockerfile that deals with the installation of the magma plugin (https://github.com/mitre/caldera/commit/f9b0ed23ba77b7e48e98f03ae4560473d3eda298)

d3vzer0 commented 4 months ago

@digoblin Correct, the latest build solves the issue but the image hosted on the repository doesn't work. I guess the only thing required is running the pipeline again to build + publish a new image :)

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

vishwaspai commented 2 months ago

Facing the exact same issue on latest (commit: b5a9bcbdf852b696624b5ad81fa0f561005f62a1) I'm doing docker compose up on code, not running pre-built docker

image

I was able to resolve the issue for now, by manually running "npm run build" in magma plugin directory

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days