feat(stix_export): wire fingerprint bounties through all endpoints + tests
Remaining files from the fingerprint-bounties + characterizes-SRO commit: misp_export, repository, bounties mixin, all 4 router endpoints, and test suite updates. Prerequisite: previous commit added _extract_fingerprint_bounty_data and the stix_export changes.
This commit is contained in:
@@ -66,6 +66,7 @@ async def api_export_attacker_misp(
|
||||
repo.list_smtp_targets(uuid),
|
||||
repo.list_attacker_commands_deduped(uuid),
|
||||
repo.list_observations_by_attacker(uuid),
|
||||
repo.get_fingerprint_bounties_by_ip(attacker["ip"]),
|
||||
)
|
||||
behavior = cast(dict[str, Any] | None, results[0])
|
||||
identity = cast(dict[str, Any] | None, results[1])
|
||||
@@ -76,6 +77,7 @@ async def api_export_attacker_misp(
|
||||
smtp_targets = cast(list[dict[str, Any]], results[6])
|
||||
commands = cast(list[str], results[7])
|
||||
observations = cast(list[dict[str, Any]], results[8])
|
||||
fingerprint_bounties = cast(list[dict[str, Any]], results[9])
|
||||
|
||||
event = build_attacker_misp_event(
|
||||
attacker=attacker,
|
||||
@@ -91,6 +93,7 @@ async def api_export_attacker_misp(
|
||||
smtp_targets=smtp_targets,
|
||||
commands=commands,
|
||||
observations=observations,
|
||||
fingerprint_bounties=fingerprint_bounties,
|
||||
)
|
||||
return Response(
|
||||
content=json.dumps(event, default=str),
|
||||
|
||||
Reference in New Issue
Block a user