Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Collected Facts Fail to Update #58

Open
d3vco opened this issue Jun 17, 2024 · 0 comments
Open

Bug: Collected Facts Fail to Update #58

d3vco opened this issue Jun 17, 2024 · 0 comments

Comments

@d3vco
Copy link
Contributor

d3vco commented Jun 17, 2024

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.

onMounted(async () => {
await agentStore.getAgents($api);
if (agentStore.agents.length > 0 && canSelectAgent) {
filters.agent = agentStore.agents[0];
filters.executor = filters.agent.executors[0];
} else {
filters.agent = props.agent.paw;
filters.executor = filters.agent.executors[0];
}
await abilityStore.getAbilities($api);
await sourceStore.getSources($api);
await operationStore.getFacts($api);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant