mate_query.cpg.models.node.analysis module

Analysis nodes.

At runtime, the models here are accessed via attributes on a CPG, not directly.

class mate_query.cpg.models.node.analysis.DataflowSignature(uuid: str, kind: NodeKind, attributes: Dict[str, Any] = {})

Bases: mate_query.cpg.models.node._typechecking.NodeMixin

Abstract representation of a dataflow derived from a signature

Parameters
  • uuid (str) –

  • kind (NodeKind) –

  • attributes (Dict[str, Any]) –

context
Return type

str

property control_flows_from: RelationshipProperty
deallocator
Return type

str

property directly_flows_from: RelationshipProperty
property flows_to: RelationshipProperty
property indirectly_flows_from: RelationshipProperty
is_allocator
property signature_for: RelationshipProperty
property signature_for_function: RelationshipProperty
tags
Return type

list

class mate_query.cpg.models.node.analysis.InputSignature(uuid: str, kind: NodeKind, attributes: Dict[str, Any] = {})

Bases: mate_query.cpg.models.node._typechecking.NodeMixin

Abstract representation of a dataflow input derived from a signature

Parameters
  • uuid (str) –

  • kind (NodeKind) –

  • attributes (Dict[str, Any]) –

context
Return type

str

property flows_to: RelationshipProperty
property signature_for: RelationshipProperty
property signature_for_function: RelationshipProperty
tags
Return type

list

class mate_query.cpg.models.node.analysis.MemoryLocation(uuid: str, kind: NodeKind, attributes: Dict[str, Any] = {})

Bases: mate_query.cpg.models.node._typechecking.NodeMixin

An abstract memory location represents a set of runtime heap locations.

Parameters
  • uuid (str) –

  • kind (NodeKind) –

  • attributes (Dict[str, Any]) –

property accessed_by: RelationshipProperty
alias_set_identifier
Return type

str

property allocated_by: RelationshipProperty
allocation_context
Return type

str

allocation_size_bytes

The number of bytes allocated on the heap, as determined by the points-to analysis.

Return type

int

property contained_by: RelationshipProperty
property loaded_to: RelationshipProperty
property may_alias: RelationshipProperty
property must_alias: RelationshipProperty
property pointers: RelationshipProperty
pretty_string
Return type

str

property stored_from: RelationshipProperty
property subregion_of: RelationshipProperty
class mate_query.cpg.models.node.analysis.OutputSignature(uuid: str, kind: NodeKind, attributes: Dict[str, Any] = {})

Bases: mate_query.cpg.models.node._typechecking.NodeMixin

Abstract representation of a dataflow output derived from a signature

Parameters
  • uuid (str) –

  • kind (NodeKind) –

  • attributes (Dict[str, Any]) –

context
Return type

str

property flows_from: RelationshipProperty
property signature_for: RelationshipProperty
property signature_for_function: RelationshipProperty
tags
Return type

list