Skip to content

Commit b285ac1

Browse files
committed
Bump detectiq version to 0.1.39 and enhance module exports
- Updated version in `pyproject.toml` and `__init__.py` to 0.1.39. - Removed unused import statements in `create_sigma_rule.py` and `pe_analyzer.py` for improved code clarity. - Added `__all__` declarations in multiple `__init__.py` files to define public API for modules.
1 parent ba30dfb commit b285ac1

21 files changed

Lines changed: 45 additions & 11 deletions

File tree

detectiq/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Root package initialization
22
VERSION = "0.1.0"
3-
__version__ = "0.1.38"
3+
__version__ = "0.1.39"

detectiq/core/llm/tools/sigma/create_sigma_rule.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from langchain.schema.output_parser import StrOutputParser
1010
from langchain.schema.runnable import RunnablePassthrough
1111
from langchain.schema.vectorstore import VectorStore
12-
from langchain.tools import BaseTool
1312
from langchain_core.callbacks import BaseCallbackManager, Callbacks
1413
from langchain_core.tools import BaseTool
1514
from pydantic import BaseModel, ConfigDict, field_validator
@@ -241,7 +240,7 @@ async def _arun(
241240
if in_yaml:
242241
# Stop if we hit explanatory text or empty lines after YAML
243242
if (stripped_line and ":" not in stripped_line and not stripped_line.startswith("-")) or (
244-
not stripped_line and len(yaml_lines) > 0 and not any(l.strip() for l in yaml_lines[-3:])
243+
not stripped_line and len(yaml_lines) > 0 and not any(line.strip() for line in yaml_lines[-3:])
245244
):
246245
break
247246
yaml_lines.append(line)

detectiq/core/utils/snort/analyzers/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
from .protocol import ProtocolAnalyzer
55
from .threshold import ThresholdAnalyzer
66
from .whitelist import WhitelistAnalyzer
7+
8+
__all__ = [
9+
"AnomalyAnalyzer",
10+
"ContentAnalyzer",
11+
"HTTPAnalyzer",
12+
"ProtocolAnalyzer",
13+
"ThresholdAnalyzer",
14+
"WhitelistAnalyzer",
15+
]

detectiq/core/utils/yara/pe_analyzer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
if PEFILE_AVAILABLE:
1515
try:
1616
import pefile
17-
from pefile import PE
1817
except ImportError:
1918
PEFILE_AVAILABLE = False
2019
logger.warning("pefile module found but failed to import")
@@ -218,8 +217,7 @@ def decode_rich_products(entries: List[Dict[str, Any]]) -> List[str]:
218217
0x0003: "Cvtomf510",
219218
0x0004: "Export0",
220219
0x0005: "Implib0",
221-
0x0006: "Unknown",
222-
# Add more product IDs as needed
220+
0x0006: "Unknown", # Add more product IDs as needed
223221
}
224222

225223
products = []

detectiq/sigmaiq/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from .sigmaiq_backend_factory import SigmAIQBackend
22
from .sigmaiq_pipeline_factory import SigmAIQPipeline, SigmAIQPipelineResolver
3+
4+
__all__ = ["SigmAIQBackend", "SigmAIQPipeline", "SigmAIQPipelineResolver"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .carbonblack import SigmAIQCarbonBlackBackend
2+
3+
__all__ = ["SigmAIQCarbonBlackBackend"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .cortexxdr import SigmAIQCortexXDRBackend
2+
3+
__all__ = ["SigmAIQCortexXDRBackend"]

detectiq/sigmaiq/backends/crowdstrike/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
SigmAIQCrowdstrikeLogscaleBackend,
33
SigmAIQCrowdstrikeSplunkBackend,
44
)
5+
6+
__all__ = ["SigmAIQCrowdstrikeLogscaleBackend", "SigmAIQCrowdstrikeSplunkBackend"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .elasticsearch import SigmAIQElasticsearchBackend
2+
3+
__all__ = ["SigmAIQElasticsearchBackend"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .insightidr import SigmAIQInsightIDRBackend
2+
3+
__all__ = ["SigmAIQInsightIDRBackend"]

0 commit comments

Comments
 (0)