ADT
psengine.analyst_notes.note
¶
AnalystNote
¶
Bases: RFBaseModel
Validate data received from the /search
and /analystnote/{note}
endpoints.
This class supports hashing, equality comparison, string representation, and total ordering
of AnalystNote
instances.
Hashing
Returns a hash value based on the note id_
.
Equality
Checks equality between two AnalystNote
instances based on the id_
and published time.
Greater-than Comparison
Defines a greater-than comparison between two AnalystNote
instances based on the published
time and the id_
.
String Representation
Returns a string representation of the AnalystNote
instance including the id_
, title
,
and published timestamp.
Ordering
The ordering of AnalystNote
instances is determined primarily by the published timestamp.
If two instances have the same published timestamp, the note id_
is used as a secondary
criterion.
detection_rule_type
property
¶
Returns the attachment type if present, else None. It checks for specific types like
sigma rule
, yara rule
, and snort rule
in the topics of the note.
model_config
class-attribute
instance-attribute
¶
__eq__
¶
__eq__(other: AnalystNote)
__gt__
¶
__gt__(other: AnalystNote)
__hash__
¶
__str__
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
markdown
¶
markdown(
extract_entities: bool = True,
diamond_model: bool = True,
html_tags: bool = False,
defang_malicious_infrastructure: bool = False,
character_limit: Optional[int] = None,
) -> str
Return the markdown representation of the note.
PARAMETER | DESCRIPTION |
---|---|
extract_entities
|
Extract and include entities in the markdown.
TYPE:
|
diamond_model
|
Include a diamond model visualization.
TYPE:
|
html_tags
|
Include HTML tags in the output.
TYPE:
|
defang_malicious_infrastructure
|
Defang URLs or other malicious indicators.
TYPE:
|
character_limit
|
Limit the output to a specified number of characters.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The generated markdown string. |
Source code in psengine/analyst_notes/note.py
AnalystNotePreviewIn
¶
Bases: RFBaseModel
Validate data sent to /preview
endpoint.
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
AnalystNotePreviewOut
¶
Bases: RFBaseModel
Validate data received from /preview
endpoint.
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
AnalystNotePublishIn
¶
Bases: AnalystNotePreviewIn
Validate data sent to /publish
endpoint.
attachment_content_details
class-attribute
instance-attribute
¶
attachment_content_details: Optional[RequestAttachment] = (
None
)
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
AnalystNotePublishOut
¶
Bases: RFBaseModel
Validate data received from /publish
endpoint.
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
AnalystNoteSearchIn
¶
Bases: RFBaseModel
Validate data sent to /search
endpoint.
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|