VulnCheck.Workspace.MixProject (VulnCheck v1.0.1)

Copy Markdown View Source

Static (non-evaluating) reader for mix.exs files.

Extracts the application name, version, apps_path and the declared dependencies with their only:, runtime:, optional:, path: and in_umbrella: options. Dependency declarations built dynamically (for example with if or ++) are still found because every literal dependency tuple inside the deps function body is collected.

Summary

Functions

Analyzes an already encoded mix.exs AST.

Reads and analyzes a mix.exs file.

Types

t()

@type t() :: %VulnCheck.Workspace.MixProject{
  app: String.t() | nil,
  apps_path: String.t() | nil,
  deps: [VulnCheck.Workspace.MixProject.Dep.t()],
  deps_parsed: boolean(),
  file: String.t(),
  version: String.t() | nil
}

Functions

analyze(ast, file)

@spec analyze(Macro.t(), String.t()) :: t()

Analyzes an already encoded mix.exs AST.

parse_file(path)

@spec parse_file(Path.t()) :: {:ok, t()} | {:error, String.t()}

Reads and analyzes a mix.exs file.