Parameters
Parameters is an object type to specify detailed checker behavior.
It has many parameters.
But, few parameters are useful to users, and the others are not needed to be set manually.
The parameters are defined in a JSON Schema written in YAML.
The TypeScript type, the Scala class, the CLI options and the list below are generated from it.
In TypeScript and JSON (e.g. the agent mode of the CLI), a duration is a number of milliseconds, and null means infinite.
The CLI takes a duration with a unit, e.g. --timeout=10s.
accelerationHitRatio
- Type:
number(TypeScript),Double(Scala) - Default:
0.01 - CLI:
--acceleration-hit-ratio - Since: v5.0.0
The ratio of the hits to the lookups of the memoization table under which a run of the VM stops the acceleration.
A run looks up the table again and again, and it stops memoizing when the hits are fewer than this ratio of the lookups so far. With 0, it never stops.
accelerationMode
- Type:
"auto" | "on" | "off"(TypeScript),AccelerationMode(Scala) - Default:
"auto"(TypeScript),AccelerationMode.Auto(Scala) - CLI:
--acceleration-mode - Since: v4.2.0
The acceleration mode of the fuzzing.
autoturns it on asondoes, unless the pattern has back-references, where it is on only for the runs that confirm an attack string.onturns it on, unless the pattern has backtracking control verbs (e.g.(*PRUNE)) or non-atomic look-arounds (e.g.(?*...)), which memoization does not follow.offturns it off.
alphabetRepresentative
- Type:
"pretty" | "non-latin1" | "smallest"(TypeScript),AlphabetRepresentative(Scala) - Default:
"pretty"(TypeScript),AlphabetRepresentative.Pretty(Scala) - CLI:
--alphabet-representative - Since: v5.0.0
The character that stands for a set of characters in an attack string.
prettyis a character that looks good in an attack string, outside Latin-1 (U+0000 to U+00FF) if the set has one. It is the first one that the set has ofあ,α,Ω,字,0,、,∆and the ideographic space, or else the smallest letter, number, punctuation or symbol outside Latin-1, the smallest character outside Latin-1, the smallest printable ASCII character, or the smallest character.non-latin1is the smallest character outside Latin-1, or the smallest one if the set has none.smallestis the smallest character.
An engine may optimize the matching against a string of only Latin-1 characters (e.g. V8), so an attack string with another character is more likely to work there.
attackLimit
- Type:
number(TypeScript),Int(Scala) - Default:
1500000000 - CLI:
--attack-limit - Since: v1.0.0
The upper limit of the VM's steps when the fuzz checker runs an attack string.
A step is a character that the VM reads, including each character that a back-reference compares. The fuzz checker also sizes the attack string to reach this number of steps.
attackStringCharacteristics
- Type:
"none" | "latin1" | "char-class" | "alphabet"(TypeScript),AttackStringCharacteristics(Scala) - Default:
"latin1"(TypeScript),AttackStringCharacteristics.Latin1(Scala) - CLI:
--attack-string-characteristics - Since: v5.0.0
The characteristics of an attack string that tell an attack from a refuted one.
An attack with the same complexity, hotspots and characteristics as a refuted one is not run on the runtime. An engine may refute an attack and confirm another that differs only in its characters (e.g. V8, which is faster on a string of only Latin-1 characters). Finer characteristics tell more attacks apart, and more of them are run on the runtime.
noneis no characteristics.latin1is whether the string has a character outside Latin-1 (U+0000 to U+00FF).char-classis the sets of characters of the pattern that the characters of the string belong to, where the pattern divides all the characters into the sets that its parts read alike, without the sets of its literal characters.alphabetis those sets with the ones of the literal characters.
attackTimeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
1000(TypeScript),Duration(1, SECONDS)(Scala) - CLI:
--attack-timeout - Since: v4.2.0
The upper limit of matching time on the attack.
boundedWidthRatio
- Type:
number(TypeScript),Double(Scala) - Default:
2 - CLI:
--bounded-width-ratio - Since: v5.0.0
The ratio to the bounded width of the pattern of the length of the repeated parts beyond which the fuzz checker confirms an attack string.
The bounded width of a pattern is the largest width of what it matches when each repetition without the largest count iterates the least times. The fuzz checker confirms the growth of the steps of an attack string on a repeat count whose repeated parts are longer than the bounded width times this ratio. It also takes the steps of the shorter strings as bounded by this length, when it skips the fuzzing of a pattern whose steps grow linearly beyond the counts of its repetitions.
checker
- Type:
"auto" | "fuzz" | "automaton"(TypeScript),Checker(Scala) - Default:
"auto"(TypeScript),Checker.Auto(Scala) - CLI:
--checker - Since: v1.0.0
The checker to use.
autochooses one of the two below by the criteria.fuzzuses the fuzzing with static analysis.automatonuses the algorithm based on automata theory.
crossoverSize
- Type:
number(TypeScript),Int(Scala) - Default:
25 - CLI:
--crossover-size - Since: v4.2.0
The number of crossovers on each generation.
dialect
- Type:
DialectParameter(TypeScript),Dialect(Scala) - Default:
"javascript"(TypeScript),Dialect.JavaScript(Scala) - CLI:
--dialect - Since: v5.0.0
The regular expression dialect of the pattern, with its settings.
It is the name of the dialect, which takes the default settings, or an object of the name and the settings (e.g. "python" or { "name": "python", "type": "bytes" }). The flags are the dialect's own flag letters. See Dialects for the dialects and their settings.
incubationLimit
- Type:
number(TypeScript),Int(Scala) - Default:
25000 - CLI:
--incubation-limit - Since: v3.0.0
The upper limit of the VM's steps when the fuzz checker runs a gene string on incubation.
static seeding also sizes its seed strings to reach this number of steps.
incubationTimeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
250(TypeScript),Duration(250, MILLISECONDS)(Scala) - CLI:
--incubation-timeout - Since: v4.2.0
The upper limit of matching time on incubation.
logger
- Type:
(message: string) => void(TypeScript),Option[Context.Logger](Scala) - Default:
null(TypeScript),None(Scala) - Since: v4.2.0
The logger function to record execution traces.
null in TypeScript or None in Scala disables the logging. The CLI enables it with --enable-log.
maxAttackCandidates
- Type:
number(TypeScript),Int(Scala) - Default:
8 - CLI:
--max-attack-candidates - Since: v5.0.0
The maximum number of attack candidates, the strings whose steps grow more than linearly as they repeat, that each generation collects on fuzzing before the attacks.
maxAttackStringSize
- Type:
number(TypeScript),Int(Scala) - Default:
300000 - CLI:
--max-attack-string-size - Since: v4.2.0
The maximum length of the attack string on fuzzing.
maxBackReferenceStrings
- Type:
number(TypeScript),Int(Scala) - Default:
100 - CLI:
--max-back-reference-strings - Since: v5.0.0
The maximum number of strings that the groups referred by back-references match together, up to which the automaton checker expands the back-references.
With more strings, or back-references that it does not expand, the automaton checker bounds the complexity from above, and the fuzz checker decides it (see Criteria).
maxBoostIteration
- Type:
number(TypeScript),Int(Scala) - Default:
10 - CLI:
--max-boost-iteration - Since: v5.0.0
The maximum number of times that the fuzz checker boosts an attack candidate.
Each time, it adds a character or a repetition of a character to the string of the steepest candidate, and it goes on from the one whose steps grow steeper. With 0, it attacks with the candidates as they are.
maxDFASize
- Type:
number(TypeScript),Int(Scala) - Default:
20000 - CLI:
--max-dfa-size - Since: v5.0.0
The maximum size of the DFA to determine which algorithm is used.
maxDegree
- Type:
number(TypeScript),Int(Scala) - Default:
4 - CLI:
--max-degree - Since: v1.1.0
The maximum degree to be considered in fuzzing.
maxExtraDegree
- Type:
number(TypeScript),Int(Scala) - Default:
3 - CLI:
--max-extra-degree - Since: v5.0.0
The maximum number of degrees above maxDegree that the fuzz checker tells from the exponential growth.
The fuzz checker runs a string on consecutive repeat counts, and it takes the growth of the steps for a polynomial up to the degree of maxDegree plus this value, or else for the exponential one.
maxGeneStringSize
- Type:
number(TypeScript),Int(Scala) - Default:
2400 - CLI:
--max-gene-string-size - Since: v4.2.0
The maximum length of the gene string on fuzzing.
maxGenerationSize
- Type:
number(TypeScript),Int(Scala) - Default:
100 - CLI:
--max-generation-size - Since: v1.0.0
The maximum size of each generation on fuzzing.
maxIncubationBoundedWidth
- Type:
number(TypeScript),Int(Scala) - Default:
256 - CLI:
--max-incubation-bounded-width - Since: v5.0.0
The maximum bounded width of the pattern up to which the fuzz checker measures the growth of a gene string beyond the bounded width on incubation.
The bounded width of a pattern is the largest width of what it matches when each repetition without the largest count iterates the least times. The steps of a string grow as on an attack string only when its repeated parts are longer than the bounded width, which takes long to run for a large one.
maxInitialGenerationSize
- Type:
number(TypeScript),Int(Scala) - Default:
500 - CLI:
--max-initial-generation-size - Since: v4.2.0
The maximum size of the initial generation on fuzzing.
maxIteration
- Type:
number(TypeScript),Int(Scala) - Default:
10 - CLI:
--max-iteration - Since: v1.0.0
The maximum number of fuzzing iterations.
maxNFASize
- Type:
number(TypeScript),Int(Scala) - Default:
70000 - CLI:
--max-nfa-size - Since: v1.0.0
The maximum size of the NFA to determine which algorithm is used, and of the NFA on static seeding.
maxPatternSize
- Type:
number(TypeScript),Int(Scala) - Default:
1500 - CLI:
--max-pattern-size - Since: v1.1.1
The maximum size of the regular expression pattern to determine which algorithm is used.
maxRefutedAttackPartSize
- Type:
number(TypeScript),Int(Scala) - Default:
3 - CLI:
--max-refuted-attack-part-size - Since: v5.0.0
The maximum number of the characters of a run of literal characters in the pattern that tell an attack from a refuted one.
An attack with the same complexity and hotspots as a refuted one is not run on the runtime. There, a run of literal characters (e.g. edit_profile) counts by its characters read first up to this number, so the attacks that differ only in the rest of the run are the same. A larger number tells more attacks apart, and more of them are run on the runtime. An engine may refute an attack that reads the first character of a run only, and confirm another that reads more (e.g. V8).
maxRefutedAttacks
- Type:
number(TypeScript),Int(Scala) - Default:
10 - CLI:
--max-refuted-attacks - Since: v5.0.0
The maximum number of attacks that the runtime attacks refute.
When the runtime attacks refute this many attacks, the checking stops, and the result is unknown with the runtime-attacks-refuted error. With the auto checker, when it happens while the fuzz checker looks for another attack after the refuted attacks of the automaton checker, the result is safe by the automaton checker.
maxRepeatCount
- Type:
number(TypeScript),Int(Scala) - Default:
30 - CLI:
--max-repeat-count - Since: v1.0.0
The maximum sum of the repeat counts of the repetition quantifiers to determine which algorithm is used.
maxRuntimeAttackStringSize
- Type:
number(TypeScript),Int(Scala) - Default:
300000 - CLI:
--max-runtime-attack-string-size - Since: v5.0.0
The maximum length of the attack string in the diagnostics, which the runtime attack runs.
maxSimpleRepeatCount
- Type:
number(TypeScript),Int(Scala) - Default:
100 - CLI:
--max-simple-repeat-count - Since: v4.2.0
The maximum sum of the repeat counts of the repetition quantifiers on static seeding.
mutationSize
- Type:
number(TypeScript),Int(Scala) - Default:
50 - CLI:
--mutation-size - Since: v4.2.0
The number of mutations on each generation.
randomSeed
- Type:
number(TypeScript),Long(Scala) - Default:
0 - CLI:
--random-seed - Since: v4.0.0
The PRNG seed number.
runtimeAttackCompileTimeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
60000(TypeScript),Duration(60, SECONDS)(Scala) - CLI:
--runtime-attack-compile-timeout - Since: v5.0.0
The upper limit of the time to compile the program of the runtime attack.
Some dialects compile the program before running it (e.g. java and dotnet), after the command printing the version of the runtime (see Runtime-Attack Verification). This time limits both, which do not count toward timeout. A compilation that does not finish within this time makes the result unknown with the unexpected error. It has no limit if it is infinite in Scala or null in TypeScript.
runtimeAttackLimit
- Type:
number(TypeScript),Int(Scala) - Default:
1500000000 - CLI:
--runtime-attack-limit - Since: v5.0.0
The number of steps that the attack string in the diagnostics is sized for.
It is not a limit of the VM. The repeat count of the attack string, which the runtime attack runs, is chosen so that a backtracking matcher reads about this many characters, counted as the VM counts its steps (see attackLimit).
runtimeAttackTimeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
-1000(TypeScript),Duration(-1, SECONDS)(Scala) - CLI:
--runtime-attack-timeout - Since: v5.0.0
The upper limit of matching time on the runtime attack.
The runtime attack runs the attack string on the real engine of the dialect (see Runtime-Attack Verification). An attack string that the engine matches within this time is refuted: it is recorded in refutedAttacks of the diagnostics, and the checking goes on. The time is also bounded by the time left of timeout. The runtime attack is skipped if this value is not positive, or where commands cannot run (e.g. in the browser).
seeder
- Type:
"static" | "dynamic"(TypeScript),Seeder(Scala) - Default:
"static"(TypeScript),Seeder.Static(Scala) - CLI:
--seeder - Since: v4.2.0
The seeder of the fuzzing.
staticuses the seeding based on automata theory.dynamicuses the seeding with dynamic analysis.
seedingLimit
- Type:
number(TypeScript),Int(Scala) - Default:
1000 - CLI:
--seeding-limit - Since: v4.2.0
The upper limit of the VM's steps on dynamic seeding.
seedingTimeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
100(TypeScript),Duration(100, MILLISECONDS)(Scala) - CLI:
--seeding-timeout - Since: v4.2.0
The upper limit of matching time on dynamic seeding.
timeout
- Type:
number | null(TypeScript, in milliseconds),Duration(Scala) - Default:
10000(TypeScript),Duration(10, SECONDS)(Scala) - CLI:
--timeout - Since: v1.0.0
The upper limit of checking time.
When it is exceeded, the result is unknown with the timeout error. It has no limit if it is infinite in Scala or null in TypeScript. The time starts when the check starts, not while the check waits in a queue. The compilation of the program of a runtime attack does not count, and runtimeAttackCompileTimeout limits it instead (see Runtime-Attack Verification). In TypeScript, it is in milliseconds.