Argus.Extractors.ApiCalls (Panoptes v0.13.0)

Copy Markdown View Source

Calls to known APIs, classified by a table.

Most of what the domain extractors record is one shape: a remote call to a function on a fixed list, with one or two of its arguments read back as a literal, and a row that says which API it was. Five extractors each kept such a list and each walked the module to apply it; the lists lived in module attributes, inline function heads and MapSets, and encoded "infinity" three different ways. This one table holds them all, and the readers — the resolved target module, an atom argument, a timeout, a port target — are named once.

An entry is {{mod, fun, arity}, relation, columns}; arity may be a list, and fun may be :any to match every function of a module. Columns are readers (see read/4): :id, :func, :api, :fun, :arity, {:const, value}, {:module_target, n}, {:atom, n, category}, {:timeout, n, category}, and a few domain readers. A reader that resolves to "dynamic" records the imprecision under its category, exactly as the extractors it replaces did.

Emitted facts

  • sync_call, sync_call_timeout, async_cast, sup_call — process calls (GenServer, gen_statem, GenStage, Agent, gen_event, supervisors)
  • unsafe_atom_creation, unsafe_deserialization, code_execution
  • port_open
  • rpc_call, global_register, global_op, node_operation, distributed_store_op