MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / add_entity

Function add_entity

bbot/scripts/docs.py:36–44  ·  view source on GitHub ↗
(entity, parent_id)

Source from the content-addressed store, hash-verified

34 entity_counter = 1
35
36 def add_entity(entity, parent_id):
37 if entity not in entity_lookup_table:
38 nonlocal entity_counter
39 e_id = entity_counter
40 entity_counter += 1
41 entity_lookup_table[entity] = e_id
42 entity_lookup_table[e_id] = entity
43 entities[e_id] = {"id": e_id, "name": entity, "parent": parent_id, "consumes": [], "produces": []}
44 return entity_lookup_table[entity]
45
46 # create entities for all the modules and event types
47 for module, preloaded in preloaded_mods:

Callers 1

gen_chord_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…