intrigueio / intrigue-core

Discover Your Attack Surface!
https://core.intrigue.io
Other
1.35k stars 262 forks source link

Updates create_entity.rb to remove _create_entity #399

Closed duartemateus closed 3 years ago

duartemateus commented 3 years ago

_create_entity was triggering another enrichment task

shpendk commented 3 years ago

This is actually a funny bug, and nice find/fix btw! To give more context: when we start a task it expects and entity as input. That entity will be created during the process of starting the task.

Now, for the create_entity task itself, we were manually creating the entity (makes sense cause that's what the task is supposed to do). However, since the process of starting any task also creates the entity, we're effectively creating the entity twice. This won't create two of the same entities, but it will run enrichment twice because they're both created "for the first time". Real funny...