# Panoptes v0.13.0 - Table of Contents

Whole-program BEAM analysis via Souffle Datalog: supervision, GenServer and OTP bug detectors over compiled beams (the Argus modules).

## Pages

- [Panoptes](readme.md)
- [Changelog](changelog.md)

## Modules

- [Argus](Argus.md): BEAM program analysis via Souffle Datalog.
- [Argus.Analyses.AtomSafety](Argus.Analyses.AtomSafety.md): Atom safety analysis.
- [Argus.Analyses.CallCycle](Argus.Analyses.CallCycle.md): Call cycle (deadlock) detection.
- [Argus.Analyses.CallbackReceive](Argus.Analyses.CallbackReceive.md): Bare `receive` inside an OTP callback.
- [Argus.Analyses.Coverage](Argus.Analyses.Coverage.md): Coverage and precision meta-analysis.
- [Argus.Analyses.DeferredStartupDeadlock](Argus.Analyses.DeferredStartupDeadlock.md): Deferred startup deadlock detection.
- [Argus.Analyses.Distributed](Argus.Analyses.Distributed.md): Distributed systems analysis.
- [Argus.Analyses.ErrorHandling](Argus.Analyses.ErrorHandling.md): Error handling analysis.
- [Argus.Analyses.Ets](Argus.Analyses.Ets.md): ETS table analysis.
- [Argus.Analyses.GenStatem](Argus.Analyses.GenStatem.md): gen_statem state machine correctness analysis.
- [Argus.Analyses.MessageContract](Argus.Analyses.MessageContract.md): A message a module sends itself and cannot handle.
- [Argus.Analyses.MonitorLeak](Argus.Analyses.MonitorLeak.md): A monitor whose `{:DOWN, ...}` nobody is waiting for any more.
- [Argus.Analyses.OneForOneCoupling](Argus.Analyses.OneForOneCoupling.md): One-for-one coupling analysis.
- [Argus.Analyses.ProcessBottleneck](Argus.Analyses.ProcessBottleneck.md): Process bottleneck detection.
- [Argus.Analyses.ProcessRegistry](Argus.Analyses.ProcessRegistry.md): Process registry and naming analysis.
- [Argus.Analyses.Purity](Argus.Analyses.Purity.md): Verifies `@pure true` contracts (see `Argus.Purity`).
- [Argus.Analyses.ReplyContract](Argus.Analyses.ReplyContract.md): A deferred reply that can never be sent.
- [Argus.Analyses.RequestSurface](Argus.Analyses.RequestSurface.md): Dangerous operations reachable from request-shaped input.
- [Argus.Analyses.SecretExposure](Argus.Analyses.SecretExposure.md): Credentials an `inspect/1` will print.
- [Argus.Analyses.ShutdownSafety](Argus.Analyses.ShutdownSafety.md): Cleanup in `terminate/2` that will not run when it matters.
- [Argus.Analyses.Supervision](Argus.Analyses.Supervision.md): Supervision tree analysis.
- [Argus.Analyses.SyncCallInInit](Argus.Analyses.SyncCallInInit.md): Synchronous calls in init/1 detection.
- [Argus.Analyses.TimeoutChain](Argus.Analyses.TimeoutChain.md): GenServer timeout chain detection.
- [Argus.Analyses.TlsVerification](Argus.Analyses.TlsVerification.md): TLS that encrypts without authenticating.
- [Argus.Analyses.TransactionSafety](Argus.Analyses.TransactionSafety.md): Side effects inside a database transaction that the database cannot undo.
- [Argus.Analyses.UnboundedDynamicChildren](Argus.Analyses.UnboundedDynamicChildren.md): Processes an outside party can create without limit.
- [Argus.Analyses.UnlinkedSpawn](Argus.Analyses.UnlinkedSpawn.md): Unlinked spawn detection.
- [Argus.Analyses.UnsafeTask](Argus.Analyses.UnsafeTask.md): Unsafe task usage detection.
- [Argus.Analysis](Argus.Analysis.md): Behaviour and API for BEAM program analyses.
- [Argus.Cfg](Argus.Cfg.md): Basic-block control-flow graphs derived from Layer-1 facts, with dominators
and loop headers.
- [Argus.Cfg.Block](Argus.Cfg.Block.md): One basic block: a maximal straight-line run of instructions with a single
entry (the leader) and a single exit (the terminator).
- [Argus.Cfg.Function](Argus.Cfg.Function.md): One function's control-flow graph: basic blocks, typed edges, dominators,
post-dominators, and loop headers, plus lookup helpers.
- [Argus.Cfg.Walk](Argus.Cfg.Walk.md): Forward, all-paths walks over a function's control flow, one instruction
at a time.
- [Argus.Corpus](Argus.Corpus.md): Real-world checkouts as a regression corpus: a repository at the commit
before a closed-issue fix, and at the fix, compiled once into a cache
and analyzed in this VM.
- [Argus.Dataflow](Argus.Dataflow.md): Reaching definitions over Layer-1 facts: which instruction's register
write feeds which instruction's register read.
- [Argus.Extractor](Argus.Extractor.md): Behaviour for domain-specific fact extractors.
- [Argus.Extractor.CallSites](Argus.Extractor.CallSites.md): Every call instruction in a module, indexed once.
- [Argus.Extractor.Dispatch](Argus.Extractor.Dispatch.md): How a multi-clause function chooses a clause, read from its bytecode.
- [Argus.Extractor.Helpers](Argus.Extractor.Helpers.md): Shared helpers for domain-specific fact extractors.
- [Argus.Extractors.ApiCalls](Argus.Extractors.ApiCalls.md): Calls to known APIs, classified by a table.
- [Argus.Extractors.CallArgs](Argus.Extractors.CallArgs.md): Call-site argument extractor.
- [Argus.Extractors.CallbackTag](Argus.Extractors.CallbackTag.md): The message tags a `handle_call/3`, `handle_cast/2` or `handle_info/2`
discriminates on, and whether it has a catch-all.
- [Argus.Extractors.ETS](Argus.Extractors.ETS.md): ETS usage extractor.
- [Argus.Extractors.EctoSchema](Argus.Extractors.EctoSchema.md): Ecto schema fields, and which of them are redacted.
- [Argus.Extractors.Endpoint](Argus.Extractors.Endpoint.md): Which socket transports a Phoenix endpoint actually enables.
- [Argus.Extractors.ErrorHandling](Argus.Extractors.ErrorHandling.md): Error handling extractor.
- [Argus.Extractors.ErrorHandling.CatchClauses](Argus.Extractors.ErrorHandling.CatchClauses.md): What a `try` handler catches: the classes it tests for, the reason tags
it discriminates on, and whether some path catches a class outright.
- [Argus.Extractors.GenStatem](Argus.Extractors.GenStatem.md): gen_statem extractor.
- [Argus.Extractors.GenStatem.CallClauses](Argus.Extractors.GenStatem.CallClauses.md): `{:call, from}` clauses that return without answering the caller.
- [Argus.Extractors.GenStatem.EventClauses](Argus.Extractors.GenStatem.EventClauses.md): What event types a gen_statem callback discriminates on, and whether it
has a catch-all.
- [Argus.Extractors.Monitor](Argus.Extractors.Monitor.md): Monitor and demonitor call sites.
- [Argus.Extractors.OTP](Argus.Extractors.OTP.md): OTP pattern extractor.
- [Argus.Extractors.ProcessRegistry](Argus.Extractors.ProcessRegistry.md): Process registry and naming extractor.
- [Argus.Extractors.Purity](Argus.Extractors.Purity.md): Purity contracts and call classification.
- [Argus.Extractors.Reply](Argus.Extractors.Reply.md): What an OTP callback returns, and whether it kept the means to reply.
- [Argus.Extractors.Router](Argus.Extractors.Router.md): The HTTP routes a Phoenix router declares.
- [Argus.Extractors.Supervision](Argus.Extractors.Supervision.md): Supervision tree extractor.
- [Argus.Extractors.Tls](Argus.Extractors.Tls.md): TLS peer verification, where it is disabled and where it is left to the
default.
- [Argus.Facts](Argus.Facts.md): Schema-driven typed decoding of raw fact rows for in-process consumers.
- [Argus.Findings](Argus.Findings.md): Structured findings from running analyses in-process.
- [Argus.InstrId](Argus.InstrId.md): Structured form of an instruction ID (`"Mod:func/arity#idx"`).
- [Argus.Lines](Argus.Lines.md): Resolves anchor IDs to source lines using `line_info` facts.
- [Argus.Pipeline](Argus.Pipeline.md): Orchestrates parallel fact extraction from BEAM modules.
- [Argus.Pipeline.Disassemble](Argus.Pipeline.Disassemble.md): Resolves module identifiers to `.beam` paths and disassembles them.
- [Argus.Pipeline.Emit](Argus.Pipeline.Emit.md): Transforms normalized BEAM instructions into Layer 1 fact tuples.
- [Argus.Pipeline.Normalize](Argus.Pipeline.Normalize.md): Thin normalization pass over disassembled BEAM instructions.
- [Argus.Pipeline.Writer](Argus.Pipeline.Writer.md): Appends one module's facts at a time to per-relation `.facts` files,
opening each file on first use. Rows land in the order extraction
yields them, which `Argus.Pipeline` keeps deterministic.

- [Argus.Purity](Argus.Purity.md): Declare that a function performs no side effects, and have it checked.
- [Argus.Purity.Effects](Argus.Purity.Effects.md): The effect model: which calls are observable effects, and which are known
to be free of them.
- [Argus.Schema](Argus.Schema.md): Fact relation definitions for Argus analysis.
- [Argus.Souffle](Argus.Souffle.md): Souffle execution via shell-out to the `souffle` command-line tool.
- [Argus.Symbols](Argus.Symbols.md): Interned fact symbols: every string a fact row carries, mapped once to a
small integer.
- [Argus.Symbols.ETS](Argus.Symbols.ETS.md): The default store: two public ETS tables and an atomic counter, so
parallel extraction workers intern without coordination. A binary
that loses the insert race takes the id the winner assigned.

- [Argus.Symbols.Store](Argus.Symbols.Store.md): Where a `Argus.Symbols` table keeps its mapping. Both directions must
be safe to call from any process, and `intern/2` must return the same
id for the same binary for the table's lifetime.

## Mix Tasks

- [mix argus.corpus](Mix.Tasks.Argus.Corpus.md): Maintainer tooling over `Argus.Corpus`, the checkouts the test suite
verifies rules against.
- [mix argus.gen.dl](Mix.Tasks.Argus.Gen.Dl.md): Writes `priv/dl/base.dl` and `priv/dl/layer2.dl` from `Argus.Schema`.
- [mix argus.pins](Mix.Tasks.Argus.Pins.md): Writes `test/argus/analysis_inputs.exs`: for every built-in analysis,
the relations Souffle's transformed program actually reads.

