Skip to Content
mlab docs

Blocks

Every RedKit flow block: the trigger, the HTTP, DNS, port and TLS checks, logic, transforms, outputs and Capri triage, with their fields, outputs and the facts they record.

A flow is a graph of blocks with exactly one Trigger. Blocks are linked from an output (a port) to the next block's input. A block runs once every one of its inputs is settled and at least one was taken; a block none of whose inputs was taken is skipped. Loops are not supported.

What travels along a link: the findings of the blocks before (severity, title, description, evidence, recommendation), their counts per severity, the worst severity, and the facts each block recorded (a status code, the DNS values, the days left on a certificate...).

References

Text fields can read earlier blocks with {{ }}. The { } button next to a field inserts one, and a preview shows the result on example data.

ReferenceReads
{{target}}The domain the run is on.
{{<block id>.facts.<key>}}A fact an earlier block recorded, e.g. {{tls.facts.days_left}}.
{{<block id>.max_severity}}Its worst severity, or none.
{{<block id>.count}}How many findings above info it raised.

A reference must point to a block that comes before, and name a fact that block records: the flow does not save otherwise. Substitution is text only, nothing is evaluated. A missing value reads empty; a list is joined with commas.

Trigger

Starts the flow, by hand or every day or week, on one or many verified domains. Run is always available too. Output: next. Fact: target.

FieldValuesDefault
Runsby hand, daily, weeklyby hand
At (UTC hour)0 to 236
OnMonday to Sunday (weekly)Monday
Domainspicked at Run, all verified domains, domains with a tag, domains by criticalitypicked at Run
TagA tag set on your domains
Criticality at leastcritical, high, medium, lowhigh

A scheduled flow needs domains it can pick by itself: all, a tag or a criticality.

Checks

Checks run from mlab.sh, one after another, on the domain. Each one has two outputs:

  • next: the check ran, with one finding for each assertion that failed;
  • error: it could not run (timeout, unreachable). With nothing linked there, the run fails.

Every check has Severity if it fails (critical, high, medium, low, info; default medium) and Retries on error (0 to 3; 2, 4 and 8 seconds apart).

HTTP check

Requests a page of the domain over HTTPS and checks the status, headers and body.

FieldNotes
PathFrom /, default /. No spaces.
MethodGET or HEAD.
Expected statusComma-separated, e.g. 200, 301.
Headers requiredComma-separated header names.
Headers forbiddenHeaders that must not be sent, e.g. Server, X-Powered-By.
Body must contain / must not containText, case-sensitive.

Facts: status_code, final_url, redirects, redirect_not_followed, headers (cookie values dropped). Redirects are followed 5 times at most, and only within the domain and its subdomains; a redirect elsewhere is recorded, not followed. Timeout 20 seconds; the first 500 kB of the body are read. Header names are matched case-insensitively.

DNS check

Looks up a record of the domain and checks it exists or holds a value.

FieldNotes
RecordA, AAAA, CNAME, MX, NS, TXT, CAA (default TXT).
NameLabel before the domain, e.g. _dmarc. Empty for the domain itself.
Must existOff: the record must not exist.
Must containText one value must contain (case-sensitive), e.g. v=DMARC1; p=reject.

Facts: name, record, values. No answer means no values, not an error; a DNS timeout (10 seconds) is an error.

Port check

Connects to a TCP port and checks it is open or closed. Port (1 to 65535) is required; Expected is closed (default) or open. A refusal or a timeout (8 seconds) counts as closed. Facts: port, open.

TLS check

Checks the certificate is valid, not about to expire, and the TLS version.

FieldDefault
Port443
Days left at least14 (0 to 365)
Minimum versionTLSv1.2 (or TLSv1.3)

Facts: port, valid, days_left, version, issuer. An invalid certificate is always a high finding, "Certificate is not valid", whatever the severity set, and the other assertions are not checked.

Logic

BlockWhat it doesOutputs
ConditionTrue when its rules hold on what came in. With no rule: true when anything above info was found. Match all or any of up to 10 rules.true, false
Severity switchFollows the output of the worst severity found before it (info only goes to none).critical, high, medium, low, none
Run a flowRuns another flow of the organization here, on the same domain, as one block: its checks, logic and outputs. What reaches the ends of its branches comes out, duplicates removed. Uses its published version (or its draft if never published); its trigger is ignored.next
EndEnds this branch.none

Condition rules:

RuleOperatorsValue
Worst severityat least, belowcritical, high, medium, low
Findings above infoat least, at most0 to 1000
A finding titlecontains, does not containtext, case does not matter
A recorded fact (name it, e.g. status_code)equals, differs, contains, above, below, is true, is falsetext, or a number for above and below

A fact rule holds when any earlier block recorded a matching fact.

Run a flow limits: 3 levels deep, 10 per run, never a flow calling itself (even through another). Its checks count toward your plan's checks per run. A check in the called flow that cannot run fails the run.

Transform

BlockWhat it doesFacts
Filter findingsKeeps the findings at or above a severity (default low), with or without some text in their title (case does not matter).kept, dropped
Remove duplicatesKeeps one finding per severity and title.removed
Merge branchesBrings branches back together as one list, to feed one alert or one case.branches
Count findingsRecords how many findings came in, by severity, for a Condition or a message.total, critical, high, medium, low
Skip accepted risksDrops the findings set aside for this domain in the exceptions register (accepted risks still in force, false positives), matched by title.skipped

Outputs

mlab.sh performs outputs itself, once, with the findings that reach them. All have one output, next. Most have Only what is new (on by default): only findings this flow did not report on this domain at its previous run; a run with nothing new sends nothing ("Nothing new, nothing sent"). An output that fails marks the run failed once it ends; the rest of the flow still runs.

BlockWhat it doesFields
Send alertSends the event scan.redkit.flow.alert to the organization's webhooks and email rules, with the findings and a link to the run.Message (optional), Only what is new
Open caseOpens a case with the findings, the domain as an indicator. Team and Enterprise only.Case title (optional), Only what is new
Open incidentOpens an incident with the findings and the domain as an indicator: takes one of the plan's open-incident places, gets its type's first tasks, fires incident.opened.Incident title, Severity (from the findings: the worst sets it, info counts as low; or fixed), Type, Only what is new
Open ticketFiles one GitHub issue or Jira ticket in a repository or project connected in Alerting › Trackers.Repository or project (required), Ticket title, Only what is new
Trigger PagerDutyTriggers an incident on a service connected in Alerting › PagerDuty. Runs of this flow on the same domain group into one incident until it is resolved.PagerDuty service (required), Incident summary, Only what is new
Call webhookPosts the findings to one endpoint set up in Alerting › Webhooks (event scan.redkit.flow.alert), signed with X-Mlab-Signature when the endpoint is generic. Not retried.Endpoint (required), Only what is new
Write reportA report of the run with the findings that reach it, to download as Markdown or PDF from the run. Always all findings.Report title (optional)

Default titles: a case or a report takes the flow name and the domain; a ticket [worst severity] flow: domain.

Capri triage

Capri reads the findings that come in (50 at most), sorts them most urgent first, and writes a summary and up to 5 recommendations. It never drops or changes a finding, and the flow goes on if Capri cannot answer. Booked on the organization's AI tokens.

FieldNotes
ModelOptional: the organization's default model when empty.
FocusOptional: what to stress, e.g. "our mail is on Microsoft 365, focus on what an attacker can use today".

Facts: summary, recommendations, model, tokens, skipped. Capri is skipped (and says why) when no finding came in, AI is off for the organization, the month's AI tokens are spent, the findings are too large, or it does not answer within 20 seconds.

Notes

Note (palette, under Canvas) adds a text note to the canvas, up to 2,000 characters: who owns the flow, what to do when it fires. Runs ignore notes.

Set a finding aside

From a run's result, each finding can be Set aside… as an accepted risk (30, 90, 180 or 365 days; default 90) or a false positive, with a reason of 10 characters at least. It goes to the organization's exceptions register; a Skip accepted risks block then drops it on that domain.

On this page