class

Analyzer::Elixir::Cli

Inherits CliEndpointSupport < Analyzer < FileHelper < Reference < Object

Surfaces the command-line attack surface of Elixir programs as cli:// endpoints: stdlib OptionParser (switches), System.argv and System.get_env. Line-scan; one root endpoint per binary (stdlib OptionParser has no subcommands), params flag/argument/env, merged by URL.

Constants

GET_ENV = /\bSystem\.(?:get_env|fetch_env!?)\s*\(\s*"([^"]+)"/
MARKERS = /\bOptionParser\.(?:parse|parse!|next)\b|\bSystem\.argv\b|\bOptimus\.new!?\b/
SWITCH_KEY = /([a-z_]\w*):/
SWITCHES = /switches:\s*\[([^\]]*)\]/
WEB_RE = /\buse\s+(?:Phoenix|Plug)\b|\bimport\s+Plug\b|\bBandit\b/

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source