Skip to content

Commit c168e80

Browse files
committed
fix: adding shuffle_sdk to sigma to fix broken import
1 parent 2829506 commit c168e80

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

sigma/1.0.0/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
requests==2.32.4
22
sigmatools==0.20
3+
shuffle-sdk==0.0.40

sigma/1.0.0/src/app.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import json
77
import subprocess
88

9-
from walkoff_app_sdk.app_base import AppBase
9+
# from walkoff_app_sdk.app_base import AppBase
10+
from shuffle_sdk import AppBase
1011

1112
# Make file sample with namespace yara:
1213
## curl http://localhost:5001/api/v1/files/create -H "Authorization: Bearer 09627dcb-7e2a-4843-819b-417d268ff840" -d '{"filename": "HelloWorld.yml", "org_id": "11f67b76-6051-4425-b0d6-be23daac6d12", "workflow_id": "global", "namespace": "sigma"}'
@@ -15,7 +16,7 @@
1516
# 2. Add a way to choose the rule and the target platform for it
1617
# 3. Add the possibility of translating rules back and forth
1718

18-
# 4. Make it so you can start with Mitre Att&ck techniques
19+
# 4. Make it so you can start with Mitre Att&ck techniques
1920
# and automatically get the right rules set up with your tools :O
2021
class Sigma(AppBase):
2122
__version__ = "1.0.0"
@@ -52,19 +53,19 @@ def get_searches(self, engine, backend, shuffle_namespace):
5253
self.logger.info(f"Dir: {os.listdir(basedir)}")
5354

5455
rule = shuffle_namespace
55-
#filename = "file.yaml"
56+
#filename = "file.yaml"
5657
#with open(filename, "w+") as tmp:
5758
# tmp.write(rule)
58-
59+
5960
code = "sigmac --target=%s" % engine
6061
#if len(backend) > 0:
6162
if backend:
6263
if "list" in backend:
6364
code += "--list"
6465
else:
6566
code += " -c %s" % backend
66-
67-
code += " rules/*"
67+
68+
code += " rules/*"
6869
self.logger.info("Code: ", code)
6970
print(code)
7071
print()
@@ -83,13 +84,13 @@ def get_searches(self, engine, backend, shuffle_namespace):
8384
else:
8485
print("FAILED to run bash: ", stdout[1])
8586
item = stdout[1]
86-
87+
8788
try:
8889
ret = item.decode("utf-8")
8990
return ret
9091
except Exception:
9192
return item
92-
93+
9394
return item
9495

9596
if __name__ == "__main__":

0 commit comments

Comments
 (0)