Skip to content
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

Use pydantic pattern for non-hashable default values (i.e. lists) #2546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions capa/features/extractors/cape/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Signer(ExactModel):
aux_valid: Optional[bool] = None
aux_error: Optional[bool] = None
aux_error_desc: Optional[str] = None
aux_signers: Optional[list[AuxSigner]] = None
aux_signers: list[AuxSigner] = []


class Overlay(ExactModel):
Expand Down Expand Up @@ -243,7 +243,7 @@ class File(FlexibleModel):
ep_bytes: Optional[HexBytes] = None
entrypoint: Optional[int] = None
data: Optional[str] = None
strings: Optional[list[str]] = None
strings: list[str] = []

#
# detections (skip)
Expand Down Expand Up @@ -391,7 +391,7 @@ class CapeReport(FlexibleModel):
# static analysis results
#
static: Optional[Static] = None
strings: Optional[list[str]] = None
strings: list[str] = []

#
# dynamic analysis results
Expand All @@ -401,8 +401,8 @@ class CapeReport(FlexibleModel):

# post-processed results: payloads and extracted configs
CAPE: Optional[Union[Cape, list]] = None
dropped: Optional[list[File]] = None
procdump: Optional[list[ProcessFile]] = None
dropped: list[File] = []
procdump: list[ProcessFile] = []
procmemory: Optional[ListTODO] = None

# =========================================================================
Expand Down
Loading