-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chg: Sigma v2 compliant MitreTactics
tag format
#1395
Conversation
MitreTactics
tag format
@fukusuket Thanks! I didn't notice this. It seems that there are still at least 85 files that still use the Since most rules now use this format, I will merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fukusuket LGTM! Thanks!
I see..., I will check and create a PR on the Sigma side if necessary!💪 |
@YamatoSecurity import os
import yaml
def find_files_with_underscore_tags(directory):
files_with_underscore_tags = []
for root, _, files in os.walk(directory):
for file in files:
if file.endswith('.yml') or file.endswith('.yaml'):
file_path = os.path.join(root, file)
with open(file_path, 'r') as f:
try:
content = yaml.safe_load(f)
tags = content.get('tags', [])
if any('_' in tag for tag in tags):
files_with_underscore_tags.append(file_path)
except yaml.YAMLError as e:
print(f"Error parsing {file_path}: {e}")
return files_with_underscore_tags
# Example usage
directory = './'
files = find_files_with_underscore_tags(directory)
for file in files:
print(file)
|
I see. That is unfortunate they didn't update it for those rules. How about we update the tags in our conversion tool? This way we don't need to update Hayabusa and they all use the same v2 format. |
I see, That's better! I'll fix the converter!💪 |
What Changed
The following pull request changed the tag format of Sigma's
MitreTactics
from_
to-
. So I modified the Hayabusa side to follow that specification.The above pull request is for today, so it will be merged in today's job in the hayabusa_rules repository.
Test
I have confirmed that we can output
MitreTactics
for the latest Sigma(SigmaHQ/sigma@760597d) repository as follows.I would appreciate it if you could check it out when you have time🙏