txt2detection 1.0.12__py3-none-any.whl → 1.0.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of txt2detection might be problematic. Click here for more details.

txt2detection/__main__.py CHANGED
@@ -265,8 +265,9 @@ def run_txt2detection(
265
265
  created=detection.date,
266
266
  modified=detection.modified,
267
267
  )
268
- detection.level = kwargs.get("level", detection.level)
269
- detection.status = kwargs.get("status", detection.status)
268
+ kwargs['license'] = kwargs.get('license') or detection.license
269
+ detection.level = kwargs.get("level") or detection.level
270
+ detection.status = kwargs.get("status") or detection.status
270
271
  detection.date = as_date(kwargs.get("created"))
271
272
  detection.modified = as_date(kwargs.get("modified"))
272
273
  detection.references = kwargs["reference_urls"]
@@ -1,6 +1,7 @@
1
1
  import io
2
2
  import logging
3
3
  import typing
4
+ import json_repair
4
5
 
5
6
  from llama_index.core.output_parsers import PydanticOutputParser
6
7
 
@@ -16,4 +17,5 @@ class ParserWithLogging(PydanticOutputParser):
16
17
  print(text, file=f)
17
18
  print("=================close=================" + "\n" * 5, file=f)
18
19
  logging.debug(f.getvalue())
19
- return super().parse(text)
20
+ repaired_json = json_repair.repair_json(text)
21
+ return super().parse(repaired_json)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: txt2detection
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: A command line tool that takes a txt file containing threat intelligence and turns it into a detection rule.
5
5
  Project-URL: Homepage, https://github.com/muchdogesec/txt2detection
6
6
  Project-URL: Issues, https://github.com/muchdogesec/txt2detection/issues
@@ -12,6 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Operating System :: OS Independent
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Requires-Python: >=3.11
15
+ Requires-Dist: json-repair
15
16
  Requires-Dist: jsonschema>=4.22.0; python_version >= '3.8'
16
17
  Requires-Dist: llama-index-core>=0.12.42
17
18
  Requires-Dist: llama-index-llms-openai>=0.4.5
@@ -1,5 +1,5 @@
1
1
  txt2detection/__init__.py,sha256=Fc460P0q_eb2u3Xc89z-fwl-4ai3jrPqPNVwJQYNkNQ,89
2
- txt2detection/__main__.py,sha256=felrmY7q1tLK4wc17Lx0Ip3WJ23GicoIj0k7pelCqLM,11610
2
+ txt2detection/__main__.py,sha256=KC4JtsrFXXiXfNv77lVaYbDBrub5grup5-MNjwHhmOs,11685
3
3
  txt2detection/attack_navigator.py,sha256=CEph4Q3N49ASC0b0eXzTgbBU_JBUHUrBWag7dn_TGbg,2135
4
4
  txt2detection/bundler.py,sha256=QnuVdyL0J2CC2rIgTLCt3HclDAxXtK7kdLtv8AGMsJ0,15151
5
5
  txt2detection/credential_checker.py,sha256=NuKk7WlDshtdpGecxY1exoi4fUHCygunPH2lZ20oEA8,2598
@@ -14,10 +14,10 @@ txt2detection/ai_extractor/gemini.py,sha256=hlcKkiHGzQJ0dQECfIhjx2LfdhZoquAF9POw
14
14
  txt2detection/ai_extractor/openai.py,sha256=ggonpHtckNz9GEJIR0ADMzZWDKi6EWuicP0fsxvkP3A,616
15
15
  txt2detection/ai_extractor/openrouter.py,sha256=rL-SnzRhzrCnPJGLxbTlRyxU0NAw42RmSq3ouuo3Iag,658
16
16
  txt2detection/ai_extractor/prompts.py,sha256=u8PyFcyqrr-MTo2uwa4cDOhh7FbvSnmc0sceaKzThsw,5996
17
- txt2detection/ai_extractor/utils.py,sha256=CHsyVylMIldFATXPcmRNciruO-4nqh68n076lABRaFk,536
17
+ txt2detection/ai_extractor/utils.py,sha256=EZJb3T34WV5iXIg1xh3nbcPC8PWWHc6puc5IiDtE3YM,618
18
18
  txt2detection/config/detection_languages.yaml,sha256=dgQUJPxhDRJ_IiFEFOiH0yhEer3SkFSIhY4pS3BsX2c,287
19
- txt2detection-1.0.12.dist-info/METADATA,sha256=V23xCbPkNx7btdIwmi9VZEeDsfZYUJIIOnx6EmV-YLA,14797
20
- txt2detection-1.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
- txt2detection-1.0.12.dist-info/entry_points.txt,sha256=ep_rLlS2r1-kKE7S3iKf3SVwbCU9-FZhU9zUebitw7A,62
22
- txt2detection-1.0.12.dist-info/licenses/LICENSE,sha256=BK8Ppqlc4pdgnNzIxnxde0taoQ1BgicdyqmBvMiNYgY,11364
23
- txt2detection-1.0.12.dist-info/RECORD,,
19
+ txt2detection-1.0.13.dist-info/METADATA,sha256=dJ7b1uqqMPh12tC5EsA-RnBZYqWatfUK8ytiy5buEBc,14824
20
+ txt2detection-1.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ txt2detection-1.0.13.dist-info/entry_points.txt,sha256=ep_rLlS2r1-kKE7S3iKf3SVwbCU9-FZhU9zUebitw7A,62
22
+ txt2detection-1.0.13.dist-info/licenses/LICENSE,sha256=BK8Ppqlc4pdgnNzIxnxde0taoQ1BgicdyqmBvMiNYgY,11364
23
+ txt2detection-1.0.13.dist-info/RECORD,,