Skip to content

Manually created facts not recognized by requirements #3149

Closed
@gitonglue

Description

@gitonglue

Describe the bug
When using plugins.stockpile.app.requirements.paw_provenance to verify if the specified variable exists in source facts, it does not recognize manually created fact. It results in two unexpected behavior.

1st unexpected behavior – marking fact as not collected, despite there is a fact created

  • nmap.targets is defined in fact source
    Image
  • Adversary profile still warn nmap.targets is not collected
    Image

2nd unexpected behavior - Adversary operation does not run

  • the ability never runs in operation. indicated by 0 decision | 4 min ago
    Image

To Reproduce
Steps to reproduce the behavior:

  1. Create new fact source which set nmap.targets to 127.0.0.1
    Image

  2. Create an ability which run nmap commands with fact-defined targets
    Image

  3. Create a Linux executor inside the ability with requirement to verify nmap.targets exists

  • command: nmap -T4 -Pn #{nmap.targets}
  • requirement module: plugins.stockpile.app.requirements.paw_provenance
  • requirement source: nmap.targets
    Image
  1. Create an Adversary that uses the created ability
    Image

  2. Refresh the page and select the newly created Adversary again

  • A warning is shown One or more of the abilities have unmet requirements, which may result in a failed operation if ran sequentially.. However, the fact is actually created in step 1

Image

  1. Proceed to create operation with the adversary created in step 4
  • Adversary: name of the adversary profile created in step 4
  • Fact source: name of the fact source created in step 1
    Image
  1. Let the operation runs for a few minutes. There will not be any ability run
  • the ability never runs in operation. indicated by 0 decision | 4 min ago
    Image

Expected behavior
Two expectation

1st expectation - no warning in Adversary profile

  • If the variable can be located in any fact sources, it should not throw warning

2nd expectation – ability successfully run in operation

  • Since the variable is retrievable from the selected fact source, it should be able to run

  • Secondly, if we manually select potential link, it can actually show the variable.

Image

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.3.1
  • Browser: Firefox, Chrome

Backend

  • Caldera version
    git rev-parse HEAD: 6d3d853
  • OS: Ubuntu 24.04.2 LTS

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions