Framework Overview - cr/Foxalyzer GitHub Wiki

Foxalyzer's main components are getters, parsers, matchers, and reporters. To ensure portability, each main component acts upon a fixed input type and produces a fixed output type.

Major framework components

Getter

Getters retrieve data from an arbitrary source, like an app's zip file or an internet URI, and the data in a common data structure.

Input

A getter-specific handle, like a file name, URI, or object.

Output

An array of reference:binarystring where reference is a unique reference – usually a file name or URI – that the getter must recognize, and binarystring is a string containing the raw data.

This will likely change in the near future to improve the memory footprint when working with large archives.

Parser

Parsers take getter output (array of files) and extract certain features about the files therein. One example would be a parser that extracts metadata about image files, like height, width, color depth, and format.

Input

Array of files.

Output

An array of [reference:{feature: value, ...}, ...]

Matcher

Matchers take the output of specific parsers and apply a given ruleset, and return an array of report items. For now, think of report items as rule matches that will have to be mentioned in a report, like "all icons must be square".

Input

Combined output of getters.

Output

An array of report items (to be defined)

Reporter

Reporters are the parent control objects in Foxalyzer. Their task is to produce a certain type of output, for example an HTML security status report for an FxOS app. So reporters instantiate all the getters, parsers, and matchers they require to fulfill their task. They're also responsible for sourcing and filtering the appropriate rulesets and to pass them to their respective matchers.

Input

An input suitable to be processed and passed to getters.

Output

Anything, basically.