Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/atomic_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async def _save_ability(self, entries, test):
"""
Return True if an ability was saved.
"""
ability_id = hashlib.md5(json.dumps(test).encode()).hexdigest()
ability_id = test.get('auto_generated_guid') or hashlib.md5(json.dumps(test).encode()).hexdigest()
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The fallback to MD5 hash maintains the old behavior but could lead to inconsistent ID types. Consider documenting the expected format of 'auto_generated_guid' and whether it should be validated before use.

Copilot uses AI. Check for mistakes.

tactics_li = self.technique_to_tactics.get(entries['attack_technique'], ['redcanary-unknown'])
tactic = 'multiple' if len(tactics_li) > 1 else tactics_li[0]
Expand Down