mitre / magma

MITRE Caldera's user interface plugin powered by VueJS
Apache License 2.0
2 stars 6 forks source link

Bug: Collected Facts Fail to Update #58

Open d3vco opened 1 month ago

d3vco commented 1 month ago

Description

Collected facts are not updated in an ongoing operation.

To Reproduce

Steps to reproduce the behavior:

  1. Fresh install Caldera v5 with stockpile plugin included.
  2. Deploy an agent.
  3. Start a new operation.
  4. Execute the "Create staging directory" ability. a. This should create a host.dir.staged fact.
  5. Add a Potential Link with the "Stage sensitive files" ability. Note that the newly created host.dir.staged fact is not available to select.
  6. Navigate away from the operation (for example, to the agents page).
  7. Return to the operation.
  8. Repeat step 5, adding the "Stage sensitive files" ability. Note that now the learned host.dir.staged fact is available to add.

Expected Behavior

The results of step 8 should occur without having to navigate away and back in steps 6/7.

Fix

Still need to do some testing, but likely has to do with how the facts are loaded in the onMounted hook.

https://github.com/mitre/magma/blob/478744c033512e016ce17349d78997a964e976fb/src/components/operations/AddPotentialLinkModal.vue#L114-L126