Skip to content

Commit

Permalink
Parse private bit
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Dec 27, 2024
1 parent bd3aa10 commit 4b2f65a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/schemas/indicators/yara.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class Yara(indicator.Indicator):
name: str = "" # gets overridden during validation
type: Literal["yara"] = "yara"
dependencies: list[str] = []
private: bool = False

@model_validator(mode="before")
@classmethod
Expand All @@ -137,6 +138,7 @@ def validate_yara(cls, data: Any):
rule_deps = set(plyara.utils.detect_dependencies(parsed_rule))
data["dependencies"] = rule_deps - ALLOWED_EXTERNALS.keys()
data["name"] = parsed_rule["rule_name"]
data["private"] = "private" in parsed_rule.get("scopes", [])

return data

Expand Down

0 comments on commit 4b2f65a

Please sign in to comment.