Analyzer::Kotlin::Cli
Inherits CliEndpointSupport < Analyzer < FileHelper < Reference < Object
Surfaces the command-line attack surface of Kotlin programs as cli://
endpoints: one endpoint per (sub)command with named options
(param_type "flag"), positional arguments ("argument") and consumed
environment variables ("env"). Covers clikt, kotlinx-cli and picocli
plus gated System.getenv reads.
Line-scan analyzer (Go/Ruby/Rust CLI house style) merging endpoints by URL. Subclasses Analyzer directly (KotlinEngine is a module) and uses KotlinEngine.test_path? to skip tests.
Constants
kotlinx-cli.
clikt: class Serve : CliktCommand(name = "serve") (name optional →
class name lower-cased).
One precompiled Regex.union scan (PCRE2 JIT, auto-escapes each
string literal) replaces the three library-marker String#includes?
scans OR-ed with the CliktCommand/ArgParser regex fallback below —
this gate runs once per Kotlin file in the scan.
picocli: annotations sit on the line above the class/property they
decorate (@Command(name = "serve") \n class Serve : Callable<Int>),
so a one-line lookahead resolves each pending annotation.
A @Command( may wrap across lines once description/subcommands are
added, so the annotation start is matched with a bounded body-join
instead of requiring the close paren on the same line.
Class methods
Instance methods
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.