Skip to content

Policy Reference

This page lists every part of the static-analysis policy surface. It is a lookup page. For a guided introduction, read Static-Analysis Policies first.

The tables come from the engine’s registries: the RQLP schema registry, the four built-in pack manifests, the report and SARIF renderers, and the review file loaders. The binary can print some of these lists itself:

CommandPrints
bifrost --list-policiesThe built-in policy catalog as JSON: every pack and every policy with its ID, category, languages, required capabilities, hashes, and activation.
bifrost scan --list-builtin-policiesThe same catalog.
bifrost --versionOne builtin-policy-pack ID@VERSION policies=N line per pack and one builtin-policy-catalog sha256=HEX line.
bifrost --list-row-schemasThe row domains and fields that a relational assertion plan can bind (bind, join, group, aggregate).
MCP list_policiesThe same catalog as --list-policies.

--list-policies and --list-row-schemas cannot be combined with policy selection or evaluation options.

The binary embeds four policy packs. Setting the environment variable BIFROST_POLICY_PACK_ROOT to a directory replaces the embedded catalog for every policy surface: --list-policies, --version, bifrost scan, default runs, built-in selectors, and MCP. The directory must contain one subdirectory per pack. Each subdirectory name must equal the pack ID and must contain a manifest.json and the policies/*.rqlp files it lists. Bifrost verifies each manifest and each policy’s authored hash. An empty value, an empty directory, a symlink, a malformed manifest, or a hash mismatch is an error, and Bifrost does not fall back to the embedded catalog.

The CLI and MCP select built-in policies with three selectors and add workspace policies by file path.

CLI flagMCP run_policy fieldValue
--policy-pack IDpolicy_packsA built-in pack ID.
--policy-category NAMEpolicy_categoriesA built-in category: correctness, performance, security, or effects.
--policy-id IDpolicy_idsA built-in policy ID.
--policy-file PATHpolicy_filesA workspace-relative .rqlp policy file.

Each CLI flag is repeatable. Each MCP field is an array of unique strings with at least one item. MCP explain_policy accepts the same four fields.

These rules decide which built-in policies run:

  1. Values of one selector form a union. --policy-pack bifrost.code-smells --policy-pack bifrost.security selects both packs.
  2. Different selectors intersect. A built-in policy runs only when it matches every selector that has a value. --policy-pack bifrost.code-smells --policy-category performance runs the performance policies of that pack. --policy-pack P --policy-id I runs policy I only.
  3. A value that names no known pack, category, or policy ID is an error, for example unknown built-in policy pack `nope` . A combination that matches no policy is also an error: built-in policy selection matches no policy. Both exit with status 2.
  4. A policy whose catalog activation is opt-in runs only when --policy-id or policy_ids names it. Pack and category selectors, the default run, and bifrost scan never select an opt-in policy. Every other policy has activation default.
  5. On the CLI, a policy invocation with no --policy-file and no built-in selector runs every built-in pack. bifrost --root . --policy is the plain form, and bifrost scan [PATH] does the same. Any --policy-file or built-in selector replaces this default.
  6. --policy-file inputs run beside the selected built-in policies. With only --policy-file, no built-in policy runs. --no-builtin-policies states this explicitly: it requires at least one --policy-file and rejects --policy-pack, --policy-category, and --policy-id.
  7. MCP run_policy has no default. At least one of the four fields is required.
  8. When two inputs define the same policy ID, Bifrost excludes every definition and reports duplicate-policy-id. This includes a copied built-in policy that keeps its ID and is run beside the built-in pack.
  9. Built-in policies run and appear in the report in catalog order.

The full flag syntax is in the CLI reference. These rules apply to policy mode:

  • Policy options cannot be combined with --install, --query-file, --tool, --args, --mcp, --repl, --no-line-numbers, --workspace-scaled-limits, or --diff-snapshot-object-dir.
  • --sources PATH restricts policy evaluation to the named files, directories, or globs. It is repeatable.
  • --accept-current cannot be combined with --fail-on or --diff-base.
  • --explain-finding, --explain-candidate, and --explain-near-misses exclude each other. None can be combined with --format, --fail-on, --suppressions-file, --scope-file, --baseline-file, --accept-current, --evaluation-date, --diff-base, --policy-timings, --verbose, --color, or --sources. An explanation needs an explicit --policy-file or built-in selector, and the selection must resolve to one policy. --explain-near-misses N accepts 1 to 64.
  • --explain-generation HEX requires one of the three explanation flags.
  • --verbose and --color require --format human.
  • --policy-timings adds each policy’s elapsed evaluation time to its report work metrics. It also prints the stage timings to standard error as one JSON object after the text bifrost: policy stage timings.

The tables below list every policy in the embedded catalog, in catalog order. The catalog has four packs and 71 policies. Run bifrost --list-policies to print the catalog of the binary you have.

Categories are the values that --policy-category and policy_categories accept, and that scope entries can name in policy_categories:

CategoryPacks
correctnessbifrost.code-smells, bifrost.correctness
performancebifrost.code-smells
securitybifrost.security
effectsbifrost.effects

The policy ID prefix (bifrost.correctness., bifrost.performance.) is part of the stable ID. It does not name the pack. For example, bifrost.correctness.dynamic-evaluation is in the bifrost.code-smells pack.

bifrost --list-policies prints {"schema_version": 2, "packs": [...]}. Each pack object has these fields:

FieldMeaning
schema_versionManifest schema version, currently 2.
idPack ID.
versionPack version.
name, descriptionHuman-readable pack name and summary.
policiesThe pack’s policies, in catalog order.

Each policy object has these fields:

FieldMeaning
pathPath of the policy source inside the pack, for example policies/dynamic-evaluation.rqlp.
idStable policy ID. Use it with --policy-id, policy_ids, suppressions, and scope entries.
authored_hash, resolved_semantic_hashSHA-256 semantic hashes of the policy as authored and as resolved.
categoryOne of the four categories above.
supported_languagesLanguages the policy claims.
required_capabilitiesAnalyzer capabilities the policy depends on. A policy that requires a capability this engine does not provide is reported as not_run.
severity_rationaleWhy the policy has its severity.
remediationWhat to do about a finding.
activationdefault or opt-in. See Policy selection.

Version 2.16.0, 31 policies. Manifest description: Curated structured RQLP checks for bug-prone and potentially expensive source patterns.

Policy IDCategorySeverityAnalysisLanguagesActivationReports
bifrost.correctness.contradictory-conditioncorrectnesswarningassertionjava, javascript, typescript, python, godefaultA condition has a fixed truth value under proven scalar facts, so one arm cannot run.
bifrost.correctness.discarded-pure-resultcorrectnesswarningassertionjavadefaultThe result of the exact JDK 21 String.trim() call is discarded.
bifrost.correctness.dynamic-evaluationcorrectnesswarningmatchpython, javascript, typescriptdefaultA call named eval or exec (Python) or eval or Function (JavaScript, TypeScript).
bifrost.correctness.identical-conditional-branchescorrectnesswarningassertionjava, javascript, typescript, python, rust, scala, php, ruby, kotlin, csharp, go, c, cppdefaultTwo arms of one conditional have equivalent bodies under proven reference identities.
bifrost.correctness.ignored-status-resultcorrectnessnoteassertionjavadefaultThe Boolean status of the exact JDK 21 Files.deleteIfExists(Path) call is discarded.
bifrost.correctness.repeated-branch-conditioncorrectnesswarningassertionjava, javascript, typescript, python, rust, scala, php, ruby, kotlin, csharp, go, c, cppdefaultA later if/else if condition repeats an earlier one whose tested values cannot have changed.
bifrost.correctness.redundant-boolean-branchescorrectnesswarningassertionjava, javascript, typescript, python, rust, scala, php, ruby, csharp, kotlin, go, c, cppdefaultThe two paths of a conditional return opposite Boolean literals with no other work.
bifrost.correctness.unsafe-deserializationcorrectnesswarningmatchpythondefaultA call to pickle.loads or pickle.load.
bifrost.correctness.python-absent-membercorrectnesserrorassertionpythondefaultA Python receiver can hold a fully classified class whose complete member surface lacks the accessed member.
bifrost.correctness.python-absent-member-conditionalcorrectnesswarningassertionpythondefaultOther receiver values may remain unknown; listed global writes qualify only with no receiver bound and an Any member-name set. A declared parameter qualifies only for one annotated workspace class with no workspace subclasses, unresolved or unmodeled external bases, or attribute hooks. The finding states these conditions.
bifrost.correctness.go-nil-dereferencecorrectnesserrorassertiongodefaultA Go dereference, field access, or reviewed receiver operation is reached with a Nil or MaybeNil fact.
bifrost.correctness.go-wrong-error-on-failure-pathcorrectnesserrorassertiongodefaultOn the exact failure path of a reviewed Go API, a returned call consumes a different error binding whose value is nil.
bifrost.correctness.empty-failure-handlercorrectnesswarningassertionjava, javascript, typescript, python, csharp, php, cpp, kotlin, rubydefaultA catch, except, or rescue clause has no statements other than comments, empty statements, pass, or ....
bifrost.correctness.c-self-assignmentcorrectnesswarningassertioncdefaultA C assignment writes an initialized primitive local back to itself.
bifrost.correctness.local-self-assignmentcorrectnesswarningassertionjava, javascript, typescript, python, csharp, kotlin, go, rustdefaultA direct assignment reads and writes the same initialized local binding.
bifrost.correctness.failed-swapcorrectnesswarningassertionjava, javascript, typescript, python, csharp, kotlin, go, rustdefaultTwo adjacent local assignments a = b; b = a copy the first value back.
bifrost.correctness.overwritten-unread-valuecorrectnesswarningassertionjava, javascript, typescript, python, go, csharp, kotlin, rustdefaultA local value is replaced on every path before it is read.
bifrost.correctness.loop-body-never-repeatscorrectnesswarningassertionjava, javascript, typescript, python, csharp, kotlin, go, rust, phpdefaultEvery path through a while, for, or do loop body leaves before the next iteration.
bifrost.correctness.unreachable-statementcorrectnesswarningassertionjava, javascript, typescript, python, csharp, kotlin, go, rust, phpdefaultA statement inside a callable cannot be reached from the callable entry.
bifrost.performance.loop-invariant-sortperformancewarningassertionrust, python, java, typescript, javascriptdefaultA sort call inside a loop sorts a receiver whose value is established outside the loop.
bifrost.performance.regex-compile-in-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: regular-expression compilation is written inside a loop.
bifrost.performance.file-read-in-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: a file read is written inside a loop.
bifrost.performance.serialization-in-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: serialization is written inside a loop.
bifrost.performance.parsing-in-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: a parse call is written inside a loop.
bifrost.performance.database-call-in-loopperformancenoteassertionpython, java, javascript, typescriptdefaultReview prompt: a database call is written inside a loop.
bifrost.performance.network-call-in-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: a network request is written inside a loop.
bifrost.performance.subprocess-in-loopperformancenoteassertionpython, java, javascript, typescriptdefaultReview prompt: a subprocess launch is written inside a loop.
bifrost.performance.sleep-in-loopperformancenoteassertionpython, java, rustdefaultReview prompt: a sleep call is written inside a for-each loop.
bifrost.performance.expensive-operation-in-nested-loopperformancenoteassertionpython, java, javascript, typescript, rustdefaultReview prompt: an expensive operation is written inside two nested loops.
bifrost.correctness.rayon-in-blocking-lazy-initcorrectnesswarningmatchrustdefaultReview prompt: a blocking Rust lazy initializer contains rayon parallelism, which can self-deadlock.

Version 0.1.0, 1 policy. Manifest description: Selectable lifecycle and ownership policies over reviewed acquisition families.

Policy IDCategorySeverityAnalysisLanguagesActivationReports
bifrost.correctness.resource-lifecyclecorrectnesserrortypestatego, java, javascript, kotlin, php, python, rust, scala, typescriptdefaultA resource from the reviewed acquisition family reaches a normal or exceptional exit of its acquiring procedure while still open.

Version 1.3.0, 29 policies. Manifest description: High-precision security policies backed by exact structural identity and value-flow evidence.

Policy IDCategorySeverityAnalysisLanguagesActivationReports
bifrost.security.java.servlet-parameter-to-jdbcsecurityerrortaintjavadefaultServletRequest.getParameter(String) reaches the SQL operand of Statement.execute(String) or Statement.executeQuery(String).
bifrost.security.java.system-getenv-to-runtime-execsecurityerrortaintjavadefaultSystem.getenv(String) reaches the command operand of Runtime.exec(String).
bifrost.security.python.process-input-to-os-systemsecurityerrortaintpythondefaultos.environ or sys.argv reaches the command operand of os.system.

The declared-storage family has two policies per language. Every row is category security, activation opt-in, and has one language.

Languagestored-request-to-sql (taint, error)store-requires-validation (flow, warning)Source display nameSink display name
Cbifrost.security.c.stored-request-to-sqlbifrost.security.c.store-requires-validationrequest parametersqlite3 exec SQL
C++bifrost.security.cpp.stored-request-to-sqlbifrost.security.cpp.store-requires-validationrequest parametersqlite3 exec SQL
C#bifrost.security.csharp.stored-request-to-sqlbifrost.security.csharp.store-requires-validationRequest.Query getSQL ExecuteRaw
Gobifrost.security.go.stored-request-to-sqlbifrost.security.go.store-requires-validationRequest.FormValuesql.Exec SQL
Javabifrost.security.java.stored-request-to-sqlbifrost.security.java.store-requires-validationServletRequest.getParameter(String)Statement.execute(String) SQL
JavaScriptbifrost.security.javascript.stored-request-to-sqlbifrost.security.javascript.store-requires-validationExpress req.parampg Client.query SQL
Kotlinbifrost.security.kotlin.stored-request-to-sqlbifrost.security.kotlin.store-requires-validationcall.parameters getStatement.execute SQL
PHPbifrost.security.php.stored-request-to-sqlbifrost.security.php.store-requires-validationrequest parametermysqli query SQL
Pythonbifrost.security.python.stored-request-to-sqlbifrost.security.python.store-requires-validationFlask request.args.getsqlite3 Cursor.execute SQL
Rubybifrost.security.ruby.stored-request-to-sqlbifrost.security.ruby.store-requires-validationparams.fetchconnection.execute SQL
Rustbifrost.security.rust.stored-request-to-sqlbifrost.security.rust.store-requires-validationrequest query valueSQL execute
Scalabifrost.security.scala.stored-request-to-sqlbifrost.security.scala.store-requires-validationrequest queryString getStatement.execute SQL
TypeScriptbifrost.security.typescript.stored-request-to-sqlbifrost.security.typescript.store-requires-validationExpress req.parampg Client.query SQL

Version 2.0.0, 10 policies. Manifest description: Configurable forbidden-network-effect specializations. Each policy asserts that every declaration a reviewed declaration-selection document selects reaches no declared network effect, directly or through workspace helpers. The effect is declared by a reviewed semantic model on the exact API identity; purity is never inferred from a name, a file name, a comment, or an unqualified annotation. The policies are opt-in, and a missing or invalid selection document fails activation instead of passing.

Every row is category effects, severity error, analysis assertion, activation opt-in, and has one language. Each policy imports its selection from .bifrost/effect-boundaries/<language>-network-io.rqlp and requires the declaration-selection-imports capability.

Policy IDLanguage
bifrost.effects.csharp.selected-boundary-no-network-ioC#
bifrost.effects.go.selected-boundary-no-network-ioGo
bifrost.effects.java.selected-boundary-no-network-ioJava
bifrost.effects.javascript.selected-boundary-no-network-ioJavaScript
bifrost.effects.kotlin.selected-boundary-no-network-ioKotlin
bifrost.effects.python.selected-boundary-no-network-ioPython
bifrost.effects.ruby.selected-boundary-no-network-ioRuby
bifrost.effects.rust.selected-boundary-no-network-ioRust
bifrost.effects.scala.selected-boundary-no-network-ioScala
bifrost.effects.typescript.selected-boundary-no-network-ioTypeScript

RQLP has one document schema version, 1. Nested RQL selectors also have one schema version, 1. Omitting a version selects 1. Pinning any other value fails with unsupported-policy-schema-version or unsupported-rql-schema-version.

A .rqlp file holds exactly one top-level document: policy, endpoint, endpoint-set-document, or declaration-selection-document. Only policy is executable. A record is a parenthesized form whose first symbol is its label. Keyword fields are written :name value. Each field may appear at most once in a record.

How to read the field tables:

  • Required is relative to the place where the field is legal. For example, :sources is required in a taint analysis and is not legal in a match analysis.
  • Legal in names the documents and analysis types that accept the record or field. “Policy, taint” means a policy document whose (analysis :type taint). Inside an endpoint-set-document, the entry records of the declared :kind are legal.
  • Value describes the accepted value. A set has no duplicates and a list keeps source order; both give their item limits.
  • Some labels name more than one record, for example all, any, assert, transform, and finding-combination. The parent field decides which record applies. The headings below name the context.
(policy [:schema-version N] :id ID :name NAME :message MESSAGE :severity SEVERITY :analysis ANALYSIS ...)

Define one executable static-analysis policy. Top-level document of a policy file.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin the RQLP version exactly; omission selects the compatible lineage head.
:idrequireda stable lowercase policy identifier:id "lowercase.policy-id". Set the stable opaque policy and SARIF rule identity.
:namerequireda bounded human-readable name:name "Human name". Set the human-readable policy name.
:messagerequireda static string or generated-message record:message "text" | (generated-message ...). Set static finding text or the taint-only generated relation.
:severityrequirednote, warning, error, unrated, or a cvss-severity record:severity note|warning|error|unrated|(cvss-severity ...). Set the policy reporting severity without changing analyzer certainty.
:descriptionoptionalbounded human-readable descriptive text:description "text". Add bounded descriptive text.
:help-urioptionalan absolute HTTP or HTTPS URI:help-uri "https://...". Link to absolute HTTP(S) remediation help.
:tagsoptionalpolicy tags; set (no duplicates) of 0 to 64 items:tags [TAG...]. Attach a duplicate-free set of bounded policy tags.
:analysisrequiredan analysis record whose fields agree with its explicit type:analysis (analysis ...). Provide the explicitly typed diagnostic-neutral analysis declaration.
:classificationoptionala classification record:classification (classification ...). Add broad/refined taxonomy and optional CVSS policy.
:reportoptionala report record:report (report ...). Override bounded report retention defaults.
(endpoint [:schema-version N] :id ID :name NAME :display-name TEXT :role source|sink ...)

Define one diagnostic-neutral reusable source or sink endpoint. Top-level document of a reusable endpoint file.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin the endpoint document version exactly.
:idrequireda stable lowercase endpoint identifier:id "lowercase.endpoint-id". Set the stable endpoint identity.
:namerequireda bounded human-readable name:name "Human name". Set the endpoint’s human-readable name.
:display-namerequiredbounded human-readable display text:display-name "Generated-message phrase". Set the phrase used verbatim in generated relationship messages.
:descriptionoptionalbounded human-readable descriptive text:description "text". Add bounded endpoint description text.
:help-urioptionalan absolute HTTP or HTTPS URI:help-uri "https://...". Link to absolute HTTP(S) endpoint documentation.
:rolerequiredsource or sink:role source|sink. Declare whether the endpoint supplies or consumes a value.
:categoriesrequiredopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:categories [CATEGORY...]. Attach opaque exact categories for explicit set composition.
:selectorrequiredan inline rql or deferred rql-file selector:selector (rql ...)|(rql-file ...). Select the endpoint’s diagnostic-neutral code sites.
:bindingrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:binding matched-value|receiver|return-value|(result :index N)|(argument ...). Bind the selected matched value, receiver, singular return, indexed normal result, or argument.
:taintoptionalsource-semantics or sink-semantics matching the endpoint role:taint (source-semantics ...)|(sink-semantics ...). Optionally attach role-compatible taint semantics.
:supersedesoptionalendpoint identifiers; set (no duplicates) of 0 to 64 items:supersedes [ENDPOINT-ID...]. Declare explicit same-event dominance edges.
(endpoint-set-document [:schema-version N] :kind KIND [:language LANGUAGE] [:rql-schema-version N] :set (endpoint-set ...))

Define one standalone typed endpoint-set document for nested policy imports. Top-level document of an endpoint-set file.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin the standalone endpoint-set document version exactly.
:kindrequiredone typed taint or value-flow endpoint-set kind:kind sources|sinks|sanitizers|entry-points|transforms|external-models|stores|origins|observations|kills|flow-transforms. Declare the exact entry family accepted by this standalone document.
:languageoptionalone or more public analyzer language labels or family aliases:language LANGUAGE. Provide one inherited analyzer language default for selectors in this document.
:rql-schema-versionoptionala supported positive schema version:rql-schema-version N. Provide one inherited RQL schema version default for selectors in this document.
:setrequiredan endpoint-set record:set (endpoint-set ...). Provide the typed endpoint-set contents.
(endpoint-set-file :path "workspace-relative.rqlp" [:sha256 HEX])

Reference one nested typed endpoint-set document by workspace-relative path. Legal in: policy, taint or flow.

FieldRequiredValueMeaning
:pathrequireda validated workspace-relative path:path "workspace-relative.rqlp". Name one workspace-relative endpoint-set document.
:sha256optionala lowercase 64-hex SHA-256 value:sha256 "64-lower-hex". Optionally pin the imported endpoint-set semantic content hash.
(declaration-selection-document [:schema-version N] :language LANGUAGE [:rql-schema-version N] :declarations [(rql ...)...])

Define one standalone reviewed set of exact declarations for a policy to import. Top-level document of a declaration-selection file.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin the standalone declaration-selection document version exactly.
:languagerequiredone public analyzer language label:language LANGUAGE. Declare the one analyzer language of every selected declaration; it must equal the importing reference’s language. A family alias such as jvm is rejected.
:rql-schema-versionoptionala supported positive schema version:rql-schema-version N. Provide one inherited RQL schema version default for selectors in this document.
:declarationsrequiredone or more inline rql exact declaration selectors; set (no duplicates) of 1 to 16 items:declarations [(rql (enclosing-decl ...))...]. List the exact declarations: each an inline enclosing-decl selector of a function, method, or class with an exact name, optionally inside one exactly named owner.

An entry that is not exactly (enclosing-decl DECLARATION) or (enclosing-decl (inside-decl OWNER DECLARATION)) over a function, method, or class pattern with an exact :name fails with declaration-selection-not-exact; an entry of another language fails with declaration-selection-wrong-language; an empty list fails with declaration-selection-empty; and a nested rql-file, declaration-selection-file, or endpoint-set-file fails with declaration-selection-nested-import.

(declaration-selection-file :path "workspace-relative.rqlp" :language LANGUAGE)

Bind the declarations of one workspace-relative declaration-selection document; a missing or invalid document fails activation. Legal in: policy, assertion, as a bind :query.

FieldRequiredValueMeaning
:pathrequireda validated workspace-relative path:path "workspace-relative.rqlp". Name one workspace-relative declaration-selection document.
:languagerequiredone public analyzer language label:language LANGUAGE. Require the imported document to select declarations of exactly this analyzer language.

The document is read when the policy activates against a workspace, never before. A missing document fails with declaration-selection-unavailable, a document of another kind with declaration-selection-wrong-document, and a document of another language with declaration-selection-wrong-language. Each failure is a policy-validation-failed diagnostic whose message names that cause, and the policy does not run. The analysis’s :languages and :where scopes do not apply to an imported selection, so an analysis that sets either rejects the reference with declaration-selection-scope-conflict.

(analysis :type match|taint|typestate|assertion|flow ...)

Select and configure exactly one policy analysis kind. Legal in: policy, every analysis type.

FieldRequiredLegal inValueMeaning
:typerequiredpolicy, every analysis typematch, taint, typestate, assertion, or flow:type match|taint|typestate|assertion|flow. Select the analysis variant; fields are never inferred from their presence.
:subjectoptionalpolicy, assertionan inline rql or deferred rql-file selector:subject (rql ...)|(rql-file ...). Select the subject nodes each specialized assertion is evaluated at; required with :asserts.
:assertsoptionalpolicy, assertionassert records; list (source order kept) of 1 to 64 items:asserts [(assert ...)...]. Declare specialized occurrence, resolution, route, or identity invariants; required with :subject.
positional, repeatedoptionalpolicy, assertionbind, join, group, relational assert, and assert-selected-in-winning-tier records; list (source order kept) of 1 to 64 items(bind|join|group|assert ...).... Declare a bounded source-ordered relational assertion plan.
:selectorrequiredpolicy, matchan inline rql or deferred rql-file selector:selector (rql ...)|(rql-file ...). Select positive location-bearing match results.
:moderequiredpolicy, taint, typestate, or flowthe may analysis mode:mode may. Select the schema-version-1 may analysis mode.
:call-modelingoptionalpolicy, taint, typestate, or flowa call-modeling record:call-modeling (call-modeling :unmodeled paranoid|optimistic|require-model). Choose fallback behavior for unmodeled calls; omission defaults to paranoid.
:threat-modelsoptionalpolicy, tainta non-empty set of threat-model values:threat-models [remote|commandargs|environment|stdin|file|database...]. Select active source kinds; omission defaults to [remote].
:on-unknownoptionalpolicy, every analysis typean on-unknown record:on-unknown (on-unknown :verdict abstain|warn-unreliable|fail-closed|treat-may-as-finding). Choose what a verdict blocked by unknown evidence does; omission defaults to abstain.
:languagesoptionalpolicy, every analysis typeone or more language labels, the aliases c++ and c#, file extensions that one language owns (such as py or tsx), or the family aliases jvm and js-ts; list (source order kept) of 1 to 64 items:languages [LANGUAGE...]. Conjoin one shared language scope with every inline RQL and referenced RQL selector in this analysis; jvm expands to [java, kotlin, scala] and js-ts expands to [javascript, typescript]. A label or extension ignores case, a leading dot, -, and _; family aliases must be exact. An unknown entry is invalid-language-label.
:whereoptionalpolicy, every analysis typeone or more workspace-relative path globs; list (source order kept) of 1 to 64 items:where ["GLOB"...]. Conjoin one shared workspace-relative path-glob scope with every inline RQL and referenced RQL selector in this analysis.
:rql-schema-versionoptionalpolicy, every analysis typea supported positive schema version:rql-schema-version N. Pin the RQL schema version for selectors that omit their own; explicit selector pins must agree. This is independent of the RQLP document schema version.
:sourcesrequiredpolicy, taintan endpoint-set record:sources (endpoint-set ...). Compose the complete taint source set.
:sinksrequiredpolicy, taintan endpoint-set record:sinks (endpoint-set ...). Compose the complete taint sink set.
:sanitizersoptionalpolicy, taintan endpoint-set record:sanitizers (endpoint-set ...). Compose optional sanitizer models; omission is empty.
:storesoptionalpolicy, taintan endpoint-set record:stores (endpoint-set ...). Compose optional persistence-store models from local store-write and store-read entries; omission is empty.
:entry-pointsoptionalpolicy, taintan endpoint-set record:entry-points (endpoint-set ...). Compose optional framework entry-point models; omission is empty.
:transformsoptionalpolicy, taint or flowan endpoint-set record:transforms (endpoint-set ...). Compose optional policy-local input-to-output transforms; taint transforms may also rewrite labels.
:external-modelsoptionalpolicy, taintan endpoint-set record:external-models (endpoint-set ...). Compose optional external transfer models; omission is empty.
:originsrequiredpolicy, flowan endpoint-set record:origins (endpoint-set :entries [(origin ...)...]). Compose the complete value-flow origin set.
:observationsrequiredpolicy, flowan endpoint-set record:observations (endpoint-set :entries [(observation ...)...]). Compose the complete value-flow observation set.
:killsoptionalpolicy, flowan endpoint-set record:kills (endpoint-set :entries [(kill ...)...]). Compose optional value-flow kills; omission is empty.
:finding-combinationsoptionalpolicy, taintfinding-combination records; set (no duplicates) of 0 to 256 items:finding-combinations [(finding-combination ...)...]. Declare bounded explicit presentation/classification precedence rules.
:subjectsrequiredpolicy, typestatea subject-set record:subjects (subject-set ...). Compose values newly tracked by typestate.
:uncertaintyrequiredpolicy, typestatean uncertainty record:uncertainty (uncertainty ...). Declare explicit handling for subjects that escape the analysis root.
:automatonrequiredpolicy, typestatean automaton record:automaton (automaton ...). Declare the author-facing typestate automaton and terminal obligations.
(call-modeling :unmodeled paranoid|optimistic|require-model)

Choose fallback semantics for call arms without an executable body or applicable model. Legal in: policy, taint, typestate, or flow.

FieldRequiredValueMeaning
:unmodeledrequiredparanoid, optimistic, or require-model:unmodeled paranoid|optimistic|require-model. Choose conservative propagation, preserve-only propagation, or abstention when no call model applies.
(on-unknown :verdict abstain|warn-unreliable|fail-closed|treat-may-as-finding)

Declare what the run does when unknown or incomplete evidence blocked a verdict. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:verdictrequiredabstain, warn-unreliable, fail-closed, or treat-may-as-finding:verdict abstain|warn-unreliable|fail-closed|treat-may-as-finding. Abstain and exit unreliable, gate on retained findings alone, fail closed, or publish explicit may evidence as possible findings while preserving coverage obligations.
(rql [:schema-version N] QUERY)

Embed one native RQL selector without rendering or reparsing it. Legal in: every document.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin the nested RQL version exactly; omission uses the RQL compatible head.
positionalrequiredone native RQL query expressionQUERY. Embed exactly one spanned RQL query subtree.
(rql-file [:schema-version N] :path "workspace/relative.rql")

Reference one workspace-relative RQL selector for deferred loading. Legal in: every document.

FieldRequiredValueMeaning
:schema-versionoptionala supported positive schema version:schema-version N. Pin or constrain the referenced RQL document version.
:pathrequireda validated workspace-relative path:path "queries/name.rql". Name one workspace-root-relative RQL file for deferred loading.
(argument :index N) | (argument :name "NAME")

Bind a zero-based argument index or exact formal argument name. Legal in: every document.

FieldRequiredValueMeaning
:indexoptionala non-negative integer:index N. Bind a zero-based argument index; mutually exclusive with name.
:nameoptionala bounded human-readable name:name "formal-name". Bind an exact formal argument name; mutually exclusive with index.
(result :index N)

Bind one zero-based normal call result. Legal in: every document.

FieldRequiredValueMeaning
:indexrequireda non-negative integer:index N. Bind the zero-based normal result ordinal.
(field :name "NAME" :of (argument ...)|receiver)

Bind one named field of an argument or receiver as an external-model write destination. Legal in: policy, taint.

FieldRequiredValueMeaning
:namerequireda bounded human-readable name:name "field-name". Name the written field on the base port’s object.
:ofrequiredreceiver, return-value, an indexed result record, or an argument record; matched-value is forbidden:of (argument ...)|receiver. Bind the object whose field is written: an argument or the receiver.
(source-semantics :labels [LABEL...] [:evidence EVIDENCE])

Attach diagnostic-neutral taint source semantics to a source endpoint. Legal in: endpoint and endpoint-set-document.

FieldRequiredValueMeaning
:labelsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:labels [LABEL...]. Declare the non-empty labels introduced by the endpoint.
:evidenceoptionalan evidence or source-evidence record:evidence (evidence ...). Attach coherent source trust/entry evidence.
(sink-semantics :accepts [LABEL...] [:tags [...]] [:impacts [...]])

Attach diagnostic-neutral taint sink semantics to a sink endpoint. Legal in: endpoint and endpoint-set-document.

FieldRequiredValueMeaning
:acceptsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:accepts [LABEL...]. Declare the non-empty labels consumed by the endpoint.
:tagsoptionalnormalized sink tags; set (no duplicates) of 0 to 64 items:tags [TAG...]. Attach exact sink tags for evidence predicates.
:impactsoptionalnormalized sink impacts; set (no duplicates) of 0 to 64 items:impacts [IMPACT...]. Attach exact sink impacts for evidence predicates.
(evidence [:trust-boundary VALUE] [:system-entry VALUE])

Record coherent source evidence; at least one field is required. Legal in: every document.

FieldRequiredValueMeaning
:trust-boundaryoptionalexternal, internal, or same-trust-zone:trust-boundary external|internal|same-trust-zone. Describe the source trust boundary.
:system-entryoptionala supported vulnerable-system entry kind:system-entry ENTRY. Describe how the source enters the vulnerable system.
(source-evidence [:trust-boundary VALUE] [:system-entry VALUE])

Match coherent trust-boundary and system-entry facts from one source scenario. Legal in: policy, taint.

FieldRequiredValueMeaning
:trust-boundaryoptionalexternal, internal, or same-trust-zone:trust-boundary external|internal|same-trust-zone. Match the trust boundary on one coherent source fact.
:system-entryoptionala supported vulnerable-system entry kind:system-entry ENTRY. Match the system entry on the same coherent source fact.
(endpoint-set [:include-sets [...]] [:include-matches [...]] [:entries [...]])

Compose a typed endpoint set from catalogs, endpoint matches, and local entries. A flow analysis composes only local entries. Legal in: policy, taint or flow.

FieldRequiredLegal inValueMeaning
:include-setsoptionalpolicy, taintcatalog records; set (no duplicates) of 0 to 64 items:include-sets [(catalog ...)...]. Include explicitly registered catalog endpoint sets; store sets reject this field but may import typed files. Legal only in :sources, :sinks, :sanitizers, :transforms, :external-models.
:include-matchesoptionalpolicy, taintmatch-directory or match-endpoints records; set (no duplicates) of 0 to 64 items:include-matches [(match-directory ...)|(match-endpoints ...)...]. Include explicitly selected source or sink endpoint leaves; other taint set kinds reject this field. Legal only in :sources or :sinks.
:include-filesoptionalpolicy, taint or flowendpoint-set-file dependency records; set (no duplicates) of 0 to 64 items:include-files [(endpoint-set-file :path "workspace-relative.rqlp" [:sha256 HEX])...]. Include nested typed endpoint-set documents with optional semantic content pins. Legal only in taint or flow entry sets.
:entriesoptionalpolicy, taintpolicy-local source records; set (no duplicates) of 0 to 256 items:entries [(source ...)...]. Add bounded policy-local source entries. Legal only in :sources.
:entriesoptionalpolicy, taintpolicy-local sink records; set (no duplicates) of 0 to 256 items:entries [(sink ...)...]. Add bounded policy-local sink entries. Legal only in :sinks.
:entriesoptionalpolicy, taintpolicy-local sanitizer records; set (no duplicates) of 0 to 256 items:entries [(sanitizer ...)...]. Add bounded policy-local sanitizer entries. Legal only in :sanitizers.
:entriesoptionalpolicy, taintpolicy-local store-write and store-read records; set (no duplicates) of 0 to 256 items:entries [(store-write ...)|(store-read ...)...]. Add bounded policy-local persistence-store entries. Legal only in :stores.
:entriesoptionalpolicy, taintpolicy-local entry-point records; set (no duplicates) of 0 to 256 items:entries [(entry-point ...)...]. Add bounded policy-local entry-point entries. Legal only in :entry-points.
:entriesoptionalpolicy, taint or flowpolicy-local transform records; set (no duplicates) of 0 to 256 items:entries [(transform ...)...]. Add bounded policy-local input-to-output transform entries. Legal only in :transforms.
:entriesoptionalpolicy, flowpolicy-local origin records; set (no duplicates) of 0 to 256 items:entries [(origin ...)...]. Add bounded policy-local value-flow origin entries. Legal only in :origins.
:entriesoptionalpolicy, flowpolicy-local observation records; set (no duplicates) of 0 to 256 items:entries [(observation ...)...]. Add bounded policy-local value-flow observation entries. Legal only in :observations.
:entriesoptionalpolicy, flowpolicy-local kill records; set (no duplicates) of 0 to 256 items:entries [(kill ...)...]. Add bounded policy-local value-flow kill entries. Legal only in :kills.
:entriesoptionalpolicy, taintpolicy-local external-model records; set (no duplicates) of 0 to 256 items:entries [(external-model ...)...]. Add bounded policy-local external-model entries. Legal only in :external-models.
(catalog :name ID :version N [:sha256 HEX])

Reference an explicitly registered, optionally content-pinned taint catalog. Legal in: policy, taint.

FieldRequiredValueMeaning
:namerequireda stable lowercase policy identifier:name "catalog.id". Name an explicitly registered catalog.
:versionrequireda positive integer:version N. Select an exact positive catalog version.
:sha256optionala lowercase 64-hex SHA-256 value:sha256 "64-lower-hex". Optionally pin canonical typed catalog content.
(match-directory :path PATH :scope direct|recursive [:role source|sink] [:phase PHASE] :categories (any|all [...]) [:manifest-sha256 HEX])

Select endpoint leaves transactionally from an explicit capability-rooted directory. Legal in: policy, taint or typestate.

FieldRequiredLegal inValueMeaning
:pathrequiredpolicy, taint or typestatea validated workspace-relative path:path "policies/endpoints". Name the capability-rooted endpoint directory.
:scoperequiredpolicy, taint or typestatedirect or recursive:scope direct|recursive. Choose direct children or bounded recursive traversal.
:roleoptionalpolicy, typestatesource or sink:role source|sink. Constrain a typestate endpoint trigger to one role; the decoder lifts it out of MatchDirectoryRef. Legal only as a typestate event or terminal-expectation trigger.
:phaseoptionalpolicy, typestateat-match, before-call, after-normal-return, or after-exceptional-return:phase PHASE. Choose the typed typestate trigger phase; the decoder lifts it out of MatchDirectoryRef. Legal only as a typestate event or terminal-expectation trigger.
:categoriesrequiredpolicy, taint or typestatean exact any or all category predicate:categories (any|all [CATEGORY...]). Select endpoints by exact categories.
:manifest-sha256optionalpolicy, taint or typestatea lowercase 64-hex SHA-256 value:manifest-sha256 "64-lower-hex". Optionally pin the complete selected endpoint manifest.
(match-endpoints :ids [ENDPOINT-ID...] [:role source|sink] [:phase PHASE])

Select exact endpoint IDs already present in the immutable endpoint index. Legal in: policy, taint or typestate.

FieldRequiredLegal inValueMeaning
:idsrequiredpolicy, taint or typestateendpoint identifiers; set (no duplicates) of 1 to 64 items:ids [ENDPOINT-ID...]. Name a non-empty finite exact endpoint set.
:roleoptionalpolicy, typestatesource or sink:role source|sink. Constrain a typestate exact-endpoint trigger to one role; the decoder lifts it out of the set reference. Legal only as a typestate event or terminal-expectation trigger.
:phaseoptionalpolicy, typestateat-match, before-call, after-normal-return, or after-exceptional-return:phase PHASE. Choose the typed exact-endpoint trigger phase; the decoder lifts it out of the set reference. Legal only as a typestate event or terminal-expectation trigger.
(any [CATEGORY...])

Require at least one exact category from a non-empty set. Legal in: policy, taint or typestate.

FieldRequiredValueMeaning
positionalrequiredopaque exact endpoint categories; set (no duplicates) of 1 to 64 items[CATEGORY...]. Provide the non-empty exact category set.
(all [CATEGORY...])

Require every exact category from a non-empty set. Legal in: policy, taint or typestate.

FieldRequiredValueMeaning
positionalrequiredopaque exact endpoint categories; set (no duplicates) of 1 to 64 items[CATEGORY...]. Provide the non-empty exact category set.
(categories :any [...] | :all [...])

Select endpoints by an exact any-or-all category predicate. Legal in: policy, taint or typestate.

FieldRequiredValueMeaning
:anyoptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:any [CATEGORY...]. Match at least one exact category; mutually exclusive with all.
:alloptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:all [CATEGORY...]. Match every exact category; mutually exclusive with any.
(endpoints [ENDPOINT-REF...])

Select a finite exact set of local, catalog, or match endpoint identities. Legal in: policy, taint or typestate.

FieldRequiredValueMeaning
positionalrequiredendpoint-ref records; set (no duplicates) of 1 to 64 items[ENDPOINT-REF...]. Provide a non-empty exact endpoint reference set.
(endpoint-ref (:local ID | :catalog CATALOG :entry ID | :match-endpoint ID))

Name one endpoint in the current policy, an explicit catalog, or the endpoint index. Legal in: policy, taint or typestate.

FieldRequiredValueMeaning
:localoptionala lowercase local entry identifier:local "entry-id". Reference a policy-local endpoint entry.
:catalogoptionala catalog record:catalog (catalog ...). Reference an endpoint in an explicitly named catalog.
:entryoptionala lowercase local entry identifier:entry "entry-id". Name the catalog entry when catalog is selected.
:match-endpointoptionala stable lowercase endpoint identifier:match-endpoint "endpoint-id". Reference one explicitly loaded match endpoint.
(source :id ID :display-name TEXT :categories [...] :selector SELECTOR :bind PORT :labels [...] [:threat-model KIND] [:evidence EVIDENCE])

Declare one policy-local taint source. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the policy-local source identity.
:display-namerequiredbounded human-readable display text:display-name "phrase". Set the generated-message phrase for this source.
:categoriesrequiredopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:categories [CATEGORY...]. Attach exact source categories.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the source sites.
:bindrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:bind PORT. Bind the source value at each selected site.
:labelsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:labels [LABEL...]. Declare the non-empty labels introduced by the source.
:threat-modeloptionalremote, commandargs, environment, stdin, file, or database:threat-model KIND. Classify the source for analysis-level threat-model selection; omission keeps it active for every selection.
:evidenceoptionalan evidence or source-evidence record:evidence (evidence ...). Attach coherent source trust/entry evidence.
(sink :id ID :display-name TEXT :categories [...] :selector SELECTOR :dangerous-operand PORT :accepts [...] [:tags [...]] [:impacts [...]])

Declare one policy-local taint sink. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the policy-local sink identity.
:display-namerequiredbounded human-readable display text:display-name "phrase". Set the generated-message phrase for this sink.
:categoriesrequiredopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:categories [CATEGORY...]. Attach exact sink categories.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the sink sites.
:dangerous-operandrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:dangerous-operand PORT. Bind the sink operand that consumes tainted data.
:acceptsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:accepts [LABEL...]. Declare the non-empty labels accepted by the sink.
:tagsoptionalnormalized sink tags; set (no duplicates) of 0 to 64 items:tags [TAG...]. Attach exact sink tags.
:impactsoptionalnormalized sink impacts; set (no duplicates) of 0 to 64 items:impacts [IMPACT...]. Attach exact sink impacts.
(sanitizer :id ID :selector SELECTOR :input PORT :output PORT :removes [LABEL...])

Declare one policy-local sanitizer transfer. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the sanitizer identity.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select sanitizer calls or values.
:inputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:input PORT. Bind the sanitizer input value.
:outputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:output PORT. Bind the sanitizer output value.
:removesrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:removes [LABEL...]. Declare the non-empty labels removed by the sanitizer.
(store-write :id ID :selector SELECTOR :store STORE [:key PORT] [:instance PORT] :input PORT)

Declare that the selected call writes its input port’s value into the named persistence store, optionally discriminated by a key port and an instance port. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the store-write identity in the shared local taint entry namespace.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the store-writing calls.
:storerequireda lowercase persistence store name:store STORE. Name the persistence store this call writes into; write and read entries sharing one store name form a persistence boundary.
:keyoptionalmatched-value, receiver, return-value, an indexed result record, or an argument record:key PORT. Optionally bind the port carrying the key the write is stored under.
:instanceoptionalmatched-value, receiver, return-value, an indexed result record, or an argument record:instance PORT. Optionally bind the port carrying the store instance the write targets.
:inputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:input PORT. Bind the port whose value the call writes into the store.
(store-read :id ID :selector SELECTOR :store STORE [:key PORT] [:instance PORT] :output PORT)

Declare that the selected call’s output port returns data from the named persistence store under the same optional key and instance dimensions. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the store-read identity in the shared local taint entry namespace.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the store-reading calls.
:storerequireda lowercase persistence store name:store STORE. Name the persistence store this call reads from; write and read entries sharing one store name form a persistence boundary.
:keyoptionalmatched-value, receiver, return-value, an indexed result record, or an argument record:key PORT. Optionally bind the port carrying the key the read looks up.
:instanceoptionalmatched-value, receiver, return-value, an indexed result record, or an argument record:instance PORT. Optionally bind the port carrying the store instance the read targets.
:outputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:output PORT. Bind the port that returns data read from the store.
(entry-point :id ID :selector SELECTOR :parameter (argument ...) :labels [LABEL...])

Declare one framework-invoked entry point: the analysis roots the selected procedure declaration and taints the bound formal parameter on entry. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the entry-point identity.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the entry-point procedure declarations.
:parameterrequiredan argument record naming the tainted formal parameter:parameter (argument :index N)|(argument :name "NAME"). Bind the formal parameter tainted on entry.
:labelsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:labels [LABEL...]. Declare the non-empty labels the parameter carries on entry.
(transform :id ID :selector SELECTOR :input PORT :output PORT [:removes [...]] [:adds [...]])

Declare one policy-local input-to-output transform; taint may also rewrite labels. Legal in: policy, taint or flow.

FieldRequiredLegal inValueMeaning
:idrequiredpolicy, taint or flowa lowercase local entry identifier:id "entry-id". Set the transform identity.
:selectorrequiredpolicy, taint or flowan inline rql or deferred rql-file selector:selector SELECTOR. Select transform calls or values.
:inputrequiredpolicy, taint or flowmatched-value, receiver, return-value, an indexed result record, or an argument record:input PORT. Bind the transform input value.
:outputrequiredpolicy, taint or flowmatched-value, receiver, return-value, an indexed result record, or an argument record:output PORT. Bind the transform output value.
:removesoptionalpolicy, taintnormalized taint labels; set (no duplicates) of 0 to 64 items:removes [LABEL...]. Declare labels removed by the transform.
:addsoptionalpolicy, taintnormalized taint labels; set (no duplicates) of 0 to 64 items:adds [LABEL...]. Declare labels added by the transform; removes and adds cannot both be empty.
(external-model :id ID :selector SELECTOR :transfers [TRANSFER...])

Declare typed transfer behavior for one external API. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the external model identity.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the modeled external calls.
:transfersrequiredtransfer records; set (no duplicates) of 1 to 256 items:transfers [(transfer ...)...]. Declare a duplicate-free semantic set of typed port transfers.
(transfer :from PORT :to PORT :labels [LABEL...] :effect EFFECT)

Move selected labels between two typed external-model ports. Legal in: policy, taint.

FieldRequiredValueMeaning
:fromrequiredreceiver, return-value, an indexed result record, or an argument record; matched-value is forbidden:from receiver|return-value|(result :index N)|(argument ...). Bind the transfer input call port; matched-value is forbidden.
:torequiredan external-model call port, or a field record naming one written field of an argument or receiver; matched-value is forbidden:to receiver|return-value|(result :index N)|(argument ...)|(field :name "NAME" :of PORT). Bind the transfer output call port or one written field of an argument or receiver; matched-value is forbidden.
:labelsrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:labels [LABEL...]. Select the non-empty labels affected by this transfer.
:effectrequiredpropagate, sanitize, or transform transfer semantics:effect propagate|(sanitize ...)|(transform ...). Choose propagation, sanitization, or transformation.
(sanitize :removes [LABEL...])

Remove one or more labels during an external transfer. Legal in: policy, taint.

FieldRequiredValueMeaning
:removesrequirednormalized taint labels; set (no duplicates) of 1 to 64 items:removes [LABEL...]. Declare the non-empty labels removed by the effect.
(transform [:removes [...]] [:adds [...]])

Remove and/or add labels during an external transfer. Legal in: policy, taint.

FieldRequiredValueMeaning
:removesoptionalnormalized taint labels; set (no duplicates) of 0 to 64 items:removes [LABEL...]. Declare labels removed by the effect.
:addsoptionalnormalized taint labels; set (no duplicates) of 0 to 64 items:adds [LABEL...]. Declare labels added by the effect; removes and adds cannot both be empty.
(finding-combination :id ID :source PREDICATE :sink PREDICATE :message TEXT ...)

Override generic presentation for one finite source/sink endpoint combination. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase finding-combination identifier:id "combination-id". Set the stable combination identity.
:sourcerequireda categories or endpoints predicate:source (categories ...)|(endpoints ...). Select the finite source endpoint identities covered by this rule.
:sinkrequireda categories or endpoints predicate:sink (categories ...)|(endpoints ...). Select the finite sink endpoint identities covered by this rule.
:messagerequiredbounded human-readable display text:message "static text". Replace the generic message for the winning combination.
:severityoptionalnote, warning, error, unrated, or a cvss-severity record:severity SEVERITY. Optionally replace the policy severity for this combination.
:add-classificationsoptionalclassification-id records; set (no duplicates) of 0 to 64 items:add-classifications [(classification-id ...)...]. Add taxonomy classifications for the winning combination.
:supersedesoptionalfinding-combination identifiers; set (no duplicates) of 0 to 64 items:supersedes [COMBINATION-ID...]. Declare explicit presentation precedence over other combinations.
(origin :id ID :display-name TEXT :selector SELECTOR :bind PORT)

Declare one value-flow origin: the site and typed port where the tracked value is established. Legal in: policy, flow.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the policy-local origin identity.
:display-namerequiredbounded human-readable display text:display-name "phrase". Set the reported phrase for this origin.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the origin sites.
:bindrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:bind PORT. Bind the established value at each selected origin site.
(observation :id ID :display-name TEXT :selector SELECTOR :observed-operand PORT)

Declare one value-flow observation: the site and typed port that consumes the tracked value. Legal in: policy, flow.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the policy-local observation identity.
:display-namerequiredbounded human-readable display text:display-name "phrase". Set the reported phrase for this observation.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the observation sites.
:observed-operandrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:observed-operand PORT. Bind the operand whose value the observation consumes.
(kill :id ID :selector SELECTOR :input PORT :output PORT)

Declare one value-flow kill: at this site the output port no longer carries the tracked value established at the input port. Legal in: policy, flow.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "entry-id". Set the policy-local kill identity.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select the kill sites.
:inputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:input PORT. Bind the value the kill consumes.
:outputrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:output PORT. Bind the value the kill establishes; it no longer carries the tracked provenance.
(subject-set [:include-matches [...]] [:entries [...]])

Compose the values newly tracked by a typestate policy. Legal in: policy, typestate.

FieldRequiredValueMeaning
:include-matchesoptionalmatch-directory or match-endpoints records; set (no duplicates) of 0 to 64 items:include-matches [MATCH-SET...]. Include source endpoint leaves as newly tracked subjects.
:entriesoptionalsubject records; set (no duplicates) of 0 to 256 items:entries [(subject ...)...]. Add policy-local subject seed selectors.
(subject :id ID :selector SELECTOR :subject BINDING)

Declare one policy-local typestate seed and its bound subject. Legal in: policy, typestate.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "subject-id". Set the policy-local subject identity.
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select values that begin typestate tracking.
:subjectrequiredmatched-value, receiver, return-value, an indexed result record, or an argument record:subject BINDING. Bind the newly tracked value.
(uncertainty :escape inconclusive)

Make escape capability gaps explicit. Legal in: policy, typestate.

FieldRequiredValueMeaning
:escaperequiredthe inconclusive uncertainty policy:escape inconclusive. Mark subjects escaping the analysis root as incomplete.
(automaton :states [...] :initial STATE :accepting-states [...] :error-states [...] :events [...] :transitions [...] [:terminal-expectations [...]])

Define the public typestate states, events, transitions, and terminal obligations. Legal in: policy, typestate.

FieldRequiredValueMeaning
:statesrequiredtypestate state identifiers; set (no duplicates) of 1 to 256 items:states [STATE...]. Declare every typestate state.
:initialrequireda lowercase typestate state identifier:initial STATE. Select the declared initial state.
:accepting-statesrequiredtypestate state identifiers; set (no duplicates) of 1 to 256 items:accepting-states [STATE...]. Declare non-absorbing states that satisfy terminal expectations.
:error-statesrequiredtypestate state identifiers; set (no duplicates) of 1 to 256 items:error-states [STATE...]. Declare states whose transitions produce policy violations.
:eventsrequiredevent records; set (no duplicates) of 1 to 256 items:events [(event ...)...]. Declare the bounded typed event set.
:transitionsrequiredtransition records; set (no duplicates) of 1 to 4096 items:transitions [(transition ...)...]. Declare deterministic state/event transitions.
:terminal-expectationsoptionalterminal-expectation records; set (no duplicates) of 0 to 256 items:terminal-expectations [(terminal-expectation ...)...]. Declare explicit or implicit terminal accepting-state obligations.
(event :id ID (:calls CALLS | :matches MATCH-SET | :on SEMANTIC-EVENT) ...)

Define one direct-call, endpoint, or semantic typestate event. Legal in: policy, typestate.

FieldRequiredValueMeaning
:idrequireda lowercase typestate event identifier:id EVENT. Set the stable event identity.
:callsoptionala calls record:calls (calls ...). Trigger on a direct selector call; exclusive with matches and on.
:matchesoptionala match-directory or match-endpoints record:matches MATCH-SET. Trigger on selected endpoint observations; exclusive with calls and on.
:onoptionala normal-procedure-exit, exceptional-procedure-exit, or suspension-boundary record:on SEMANTIC-EVENT. Trigger on an implicit semantic event; exclusive with calls and matches.
:applies-to-subjectsoptionala categories or endpoints predicate:applies-to-subjects ENDPOINT-PREDICATE. Restrict the event to a finite resolved subject set.
:supersedesoptionaltypestate event identifiers; set (no duplicates) of 0 to 64 items:supersedes [EVENT...]. Declare explicit same-observation event dominance.
(calls :selector SELECTOR :subject BINDING :phase PHASE)

Observe a direct call selector using one tracked receiver, return, or argument binding. Legal in: policy, typestate.

FieldRequiredValueMeaning
:selectorrequiredan inline rql or deferred rql-file selector:selector SELECTOR. Select direct call observations.
:subjectrequiredreceiver, return-value, an indexed result record, or an argument record:subject receiver|return-value|(result :index N)|(argument ...). Bind the already tracked object at the call.
:phaserequiredat-match, before-call, after-normal-return, or after-exceptional-return:phase PHASE. Observe before the call or after a specific continuation.
(transition :from STATE :on EVENT :to STATE)

Apply one deterministic typestate transition. Legal in: policy, typestate.

FieldRequiredValueMeaning
:fromrequireda lowercase typestate state identifier:from STATE. Name the declared source state.
:onrequireda lowercase typestate event identifier:on EVENT. Name the declared triggering event.
:torequireda lowercase typestate state identifier:to STATE. Name the declared destination state.
(terminal-expectation :id ID (:matches MATCH-SET | :on SEMANTIC-EVENT) :expected-states [...])

Require an accepting state after an explicit or implicit terminal observation. Legal in: policy, typestate.

FieldRequiredValueMeaning
:idrequireda lowercase typestate expectation identifier:id EXPECTATION. Set the stable expectation identity.
:matchesoptionala match-directory or match-endpoints record:matches MATCH-SET. Observe an explicit endpoint terminal; exclusive with on.
:onoptionala normal-procedure-exit, exceptional-procedure-exit, or suspension-boundary record:on SEMANTIC-EVENT. Observe normal or exceptional analysis-root exit; exclusive with matches.
:applies-to-subjectsoptionala categories or endpoints predicate:applies-to-subjects ENDPOINT-PREDICATE. Restrict the expectation to a finite resolved subject set.
:expected-statesrequiredtypestate state identifiers; set (no duplicates) of 1 to 256 items:expected-states [ACCEPTING-STATE...]. Name the non-empty accepting-state subset required at the terminal.
:supersedesoptionaltypestate expectation identifiers; set (no duplicates) of 0 to 64 items:supersedes [EXPECTATION...]. Declare explicit same-terminal expectation dominance.
(normal-procedure-exit :scope analysis-root)

Observe normal completion of the outer analysis root. Legal in: policy, typestate.

FieldRequiredValueMeaning
:scoperequiredthe analysis-root exit scope:scope analysis-root. Limit the implicit normal terminal to the outer analysis root.
(exceptional-procedure-exit :scope analysis-root)

Observe exceptional completion of the outer analysis root. Legal in: policy, typestate.

FieldRequiredValueMeaning
:scoperequiredthe analysis-root exit scope:scope analysis-root. Limit the implicit exceptional terminal to the outer analysis root.
(suspension-boundary :scope analysis-root)

Observe suspension boundaries of the outer analysis root. Legal in: policy, typestate.

FieldRequiredValueMeaning
:scoperequiredthe analysis-root exit scope:scope analysis-root. Limit the suspension boundary to the outer analysis root.
(bind :name NAME :query SELECTOR)

Bind one named typed row relation from a CodeQuery. Legal in: policy, assertion.

FieldRequiredValueMeaning
:namerequireda bounded row binding, group, or aggregate name:name NAME. Set the unique row binding name.
:queryrequiredan inline rql, deferred rql-file, declaration-selection-file, or procedure-effects-of selector:query (rql ...)|(rql-file ...)|(declaration-selection-file ...)|(procedure-effects-of ...). Execute one typed CodeQuery as the binding source.
(procedure-effects-of :binding NAME)

Bind the procedure effects of the declarations an earlier row binding selects, so both bindings read one selection. Legal in: policy, assertion, as a bind :query.

FieldRequiredValueMeaning
:bindingrequireda bounded row binding, group, or aggregate name:binding NAME. Name the earlier row binding whose selected declarations feed procedure-effects.

The named binding must come earlier and use an inline rql query or a declaration-selection-file; otherwise the policy fails with unknown-row-binding or invalid-procedure-effects-input.

(join :left NAME :right NAME [:kind inner|semi|anti] :on ((LEFT RIGHT)...))

Join two named row relations by registered equal-typed fields. Legal in: policy, assertion.

FieldRequiredValueMeaning
:leftrequireda bounded row binding, group, or aggregate name:left NAME. Name the left row binding.
:rightrequireda bounded row binding, group, or aggregate name:right NAME. Name the right row binding.
:kindoptionalinner, semi, or anti:kind inner|semi|anti. Choose an inner join, a semi join that keeps matching left rows without the right relation columns, or an anti-join that keeps left rows with no partner; omission means inner.
:onrequiredone or more equality field pairs; list (source order kept) of 1 to 16 items:on ((LEFT-FIELD RIGHT-FIELD)...). Declare equal-typed field pairs relative to the left and right bindings.
(group :name NAME :by (BINDING.FIELD...) (aggregate ...) ...)

Group joined rows by registered fields and compute named aggregates. Legal in: policy, assertion.

FieldRequiredValueMeaning
:namerequireda bounded row binding, group, or aggregate name:name NAME. Set the unique row group name.
:byrequiredone or more binding.field row references; list (source order kept) of 1 to 16 items:by (BINDING.FIELD...). Choose the typed row fields that identify each group.
positional, repeatedrequiredaggregate records; list (source order kept) of 1 to 32 items(aggregate ...).... Declare the source-ordered aggregates computed for the group.
(aggregate :name NAME :op min|max|count|count-distinct|any|all|ordered-equal|set-equal|subset [:value BINDING.FIELD] [:left COLUMN|(BINDING.POSITION BINDING.VALUE) :right COLUMN|(BINDING.POSITION BINDING.VALUE)] [:where ((BINDING.FIELD OP VALUE)...)] )

Compute one bounded typed aggregate within a row group. Legal in: policy, assertion.

FieldRequiredValueMeaning
:namerequireda bounded row binding, group, or aggregate name:name NAME. Set the unique aggregate name within its group.
:oprequiredmin, max, count, count-distinct, any, all, ordered-equal, set-equal, or subset:op min|max|count|count-distinct|any|all|ordered-equal|set-equal|subset. Choose the bounded aggregate operation.
:valueoptionala binding.field row reference:value BINDING.FIELD. Select the typed input field the fold reads: an integer field for min or max, a boolean field for any or all, any field for count-distinct.
:whereoptionalzero or more typed row predicates, each (BINDING.FIELD eq|ne|lt|le|gt|ge VALUE-OR-FIELD), (BINDING.FIELD regex STRING), (BINDING.FIELD is-null|is-not-null), or (BINDING.FIELD in (VALUE…)); list (source order kept) of 0 to 16 items:where ((BINDING.FIELD OP VALUE)...). Conjoin bounded typed predicates a row must satisfy to contribute to the fold.
:leftoptionala stable-key COLUMN for set-equal/subset or a (POSITION-FIELD VALUE-FIELD) ordered sequence:left COLUMN|(BINDING.POSITION BINDING.VALUE). Name the left stable-key column for set-equal/subset, or the integer position and value columns for ordered-equal.
:rightoptionala stable-key COLUMN for set-equal/subset or a (POSITION-FIELD VALUE-FIELD) ordered sequence:right COLUMN|(BINDING.POSITION BINDING.VALUE). Name the right stable-key column for set-equal/subset, or the ordered-equal sequence; both sides must have the same scalar type.
(assert [:id ID] :group NAME :value NAME :cardinality (exactly|at-least|at-most N))

Assert a cardinality over one named aggregate in every row group. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idoptionala lowercase local entry identifier:id ID. Optionally override the stable assertion identity derived from group and aggregate names.
:grouprequireda bounded row binding, group, or aggregate name:group NAME. Name the row group being asserted.
:valuerequireda bounded row binding, group, or aggregate name:value NAME. Name the aggregate being asserted.
:cardinalityrequiredan exactly, at-least, or at-most cardinality record:cardinality (exactly|at-least|at-most N). Set the expected aggregate cardinality.
(assert-selected-in-winning-tier :id ID :site NAME :candidates NAME [:cardinality (exactly|at-least|at-most N)])

Require the selected candidate of every overload-selection row to sit in the winning applicability tier, meaning the set of candidates the resolver’s own applicability check accepted. Authoring sugar: it lowers to one inner join on site_ast_id, one group keyed on the site, one counting aggregate over selected applicable candidates, and one cardinality assertion, and adds no evaluation rule of its own. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id ID. Set the assertion identity, which also names the row group this sugar declares.
:siterequireda bounded row binding, group, or aggregate name:site NAME. Name the binding holding one overload-selection row per call site.
:candidatesrequireda bounded row binding, group, or aggregate name:candidates NAME. Name the binding holding the callable-applicability rows of the same sites.
:cardinalityoptionalan exactly, at-least, or at-most cardinality record:cardinality (exactly|at-least|at-most N). Bound the number of candidates that are both selected and applicable; omission means exactly 1. State (exactly 0) to assert an unresolved site and (at-least 2) to assert an ambiguous one.
(assert :id ID :at CAPTURE :role ROLE :expect declaration|reference|binding|none [:cardinality (exactly N)] [:namespace NAMESPACE] [:require-target true|false])

Require or forbid occurrences at one captured AST node with exact cardinality. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose AST node the occurrence rows are joined to; it must capture the identifier token itself, never its enclosing declaration.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the asserted occurrence role; capability reporting narrows to exactly this role.
:expectrequireddeclaration, reference, binding, or none:expect declaration|reference|binding|none. Name the expected occurrence class, or none to forbid any occurrence at the role.
:cardinalityoptionalan exactly, at-least, or at-most cardinality record:cardinality (exactly N)|(at-least N)|(at-most N). Bound the joined row count; omission means exactly 1, and :expect none means exactly 0.
:namespaceoptionaltype, value, module, macro, label, or path_prefix:namespace NAMESPACE. Additionally require the joined rows to resolve in one naming space.
:require-targetoptionaltrue or false:require-target true|false. Count only reference-class rows whose semantic target resolved; omission is false.
(assert-resolution :id ID :at CAPTURE :role ROLE :expect-tier TIER [:at-least true|false] [:forbid-tier TIER] [:require-unique true|false])

Require the resolver’s selected candidate for one captured reference to sit at, or above, one precedence tier. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose reference the candidate rows are joined to; it must capture the identifier token itself.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the reference-class occurrence role being resolved; capability reporting narrows to exactly this role.
:expect-tierrequiredone precedence tier from the analyzer registry:expect-tier TIER. Name the precedence tier the selected candidate must sit at.
:at-leastoptionaltrue or false:at-least true|false. Accept any tier at least as strong as the expected one; omission requires the exact tier.
:forbid-tieroptionalone precedence tier from the analyzer registry:forbid-tier TIER. Forbid any selection at one named tier, which is how the anti-fallback contract is spelled.
:require-uniqueoptionaltrue or false:require-unique true|false. Require exactly one selected candidate, making ambiguity a violation rather than a silent pick; omission is false.
(assert-binding-scope :id ID :at CAPTURE :role ROLE :declared inside|outside :relative-to CAPTURE)

Require the binding of one captured reference to be declared inside or outside a second captured node. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose binding-of answer is asserted about.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the reference-class occurrence role being reached from; capability reporting narrows to exactly this role.
:declaredrequiredinside or outside:declared inside|outside. Require the binding’s declaring scope to be contained, or not contained, in the related capture.
:relative-torequiredan RQL capture name bound by the subject selector:relative-to CAPTURE. Name the second subject capture whose node interval the declaring scope is compared against.
(assert-value-origin :id ID :at CAPTURE :role ROLE :established inside|outside :relative-to CAPTURE)

Require the value read at one captured reference to be established — by its binding’s declaring scope, or by an assignment reaching that binding — inside or outside a second captured node. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose value origin is asserted about.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the reference-class occurrence role being reached from; capability reporting narrows to exactly this role.
:establishedrequiredinside or outside:established inside|outside. Require the value’s origin — its binding’s declaring scope, or an assignment reaching that binding — to be contained, or not contained, in the related capture.
:relative-torequiredan RQL capture name bound by the subject selector:relative-to CAPTURE. Name the second subject capture whose node interval the value origins are compared against.
(assert-origin-shape :id ID :at LOOP_CAPTURE :anchor CAPTURE :role ROLE :shape collection-literal :max-elements N)

Require the captured loop’s iterated expression to provably originate from a collection literal with at most N elements. Inverted polarity: anything short of positive proof — a loop with no iterated expression in evidence, no lexical binding, no establishing initializer, or a non-qualifying initializer — violates and keeps the finding, which anchors at the anchor capture. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the captured loop whose iterated expression’s origin shape is asserted about. The loop joins to its iterated expression internally; a loop that does not iterate an expression in evidence (a while loop, a counting for) violates rather than abstaining.
:anchorrequiredan RQL capture name bound by the subject selector:anchor CAPTURE. Name the capture the finding anchors to, so two subject matches sharing one iterated expression stay distinct findings. Must be bound by every selector alternative.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the reference-class occurrence role the origin join reads from; capability reporting narrows to exactly this role.
:shaperequiredcollection-literal:shape collection-literal. Name the required origin shape. The only shape today is collection-literal: an array, list, set, dictionary, or tuple display literal.
:max-elementsrequireda positive integer:max-elements N. Bound the qualifying literal’s element count. A literal with more elements does not satisfy the assert.
(assert-boundary :id ID :at CAPTURE :role ROLE :forbid-fallback-past external_declared_unindexed|external_unknown)

Forbid a name-only fallback selection once resolution reached or passed one authoritative boundary. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose reference the candidate rows are joined to.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the reference-class occurrence role being resolved; capability reporting narrows to exactly this role.
:forbid-fallback-pastrequiredexternal_declared_unindexed or external_unknown:forbid-fallback-past external_declared_unindexed|external_unknown. Name the boundary strength at or past which a name-only fallback selection is forbidden.
(assert-generation :id ID :at CAPTURE [:kind KIND] [:cardinality (exactly N)] [:forbid-dynamic true|false])

Require one captured generation site to materialize an exact generated set, optionally forbidding dynamic inputs. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture addressing the generation site node itself.
:kindoptionalone generation kind from the analyzer registry:kind KIND. Restrict the joined site rows to one generation kind.
:cardinalityoptionalan exactly, at-least, or at-most cardinality record:cardinality (exactly N). Require the literal site’s generated set to satisfy this cardinality.
:forbid-dynamicoptionaltrue or false:forbid-dynamic true|false. Report a dynamic generation site as a finding instead of an inconclusive verdict.
(assert-declaration-state :id ID :at CAPTURE [:origin ORIGIN] [:declaration-only true|false] [:config-gated true|false])

Require one captured declaration’s state row to carry an expected origin, declaration-only flag, or configuration gate. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture addressing the declaration node whose state is asserted.
:originoptionalparsed, generated, or recovered:origin ORIGIN. Require the state row’s origin to be exactly this value.
:declaration-onlyoptionaltrue or false:declaration-only true|false. Require the state row’s declaration-only flag to match.
:config-gatedoptionaltrue or false:config-gated true|false. Require the state row’s configuration gate to match.
(assert-edge-parity :id ID :at CAPTURE :role ROLE [:surface external-usages|lsp-references])

Require field-for-field agreement between the forward and inverse reference-edge projections at the captured token, within one workspace generation. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture; it must capture the identifier token whose edges are compared.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. A reference-class role compares forward to inverse; declaration_name compares the declaration’s inverse listing to forward.
:surfaceoptionalexternal-usages or lsp-references:surface external-usages|lsp-references. Compare only edges of one usage surface; omission compares the complete row set.
(assert-edge-class :id ID :at CAPTURE :role ROLE :axis relation|usage|site-class|kind [:require [..]] [:forbid [..]] [:surface external-usages|lsp-references])

Require or forbid typed classifications on the captured token’s reference edges. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture; it must capture the identifier token whose edges are classified.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. A reference-class role reads the token’s forward edges; declaration_name reads the declaration’s inverse listing.
:axisrequiredrelation, usage, site-class, or kind:axis relation|usage|site-class|kind. Name the classification axis the constraint applies to.
:requireoptionalone or more classification labels of the constrained axis:require [value ...]. Every edge’s value on the axis must be one of these labels.
:forbidoptionalone or more classification labels of the constrained axis:forbid [value ...]. No edge’s value on the axis may be one of these labels.
:surfaceoptionalexternal-usages or lsp-references:surface external-usages|lsp-references. Classify only edges of one usage surface; omission classifies the complete row set.
(assert-canonical :id ID :at CAPTURE :role ROLE :equals CAPTURE :equals-role ROLE [:distinct true|false])

Require two captured tokens’ resolved declarations to share, or not share, one canonical identity. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose resolved declarations carry the first canonical identity.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the subject token’s reference-class occurrence role; capability reporting narrows to exactly this role.
:equalsrequiredan RQL capture name bound by the subject selector:equals CAPTURE. Name the second capture whose resolved declarations carry the compared canonical identity.
:equals-rolerequiredone occurrence role from the analyzer registry:equals-role ROLE. Name the second token’s occurrence role.
:distinctoptionaltrue or false:distinct true|false. Invert the requirement: the two selections must share no canonical identity; omission requires a shared one.
(assert-route :id ID :at CAPTURE :role ROLE :to CAPTURE :to-role ROLE [:via HOP] [:forbid HOP])

Require an identity route from the captured site to a second capture’s declaration, optionally via or never via one hop kind. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose site the route starts from.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the subject token’s occurrence role; capability reporting narrows to exactly this role.
:torequiredan RQL capture name bound by the subject selector:to CAPTURE. Name the capture whose resolved declaration the route must terminate at.
:to-rolerequiredone occurrence role from the analyzer registry:to-role ROLE. Name the target token’s occurrence role.
:viaoptionalone identity route hop kind from the analyzer registry:via HOP. Require at least one hop of this kind on the route.
:forbidoptionalone identity route hop kind from the analyzer registry:forbid HOP. Never follow hops of this kind, so a route needing one does not exist for this assert.
(assert-round-trip :id ID :at CAPTURE :role ROLE)

Require forward resolution and inverse enumeration to round-trip the captured site. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture whose site is round-tripped.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the subject token’s occurrence role; capability reporting narrows to exactly this role.
(assert-flow-establishment :id ID :at CAPTURE :role ROLE [:require dominated|reached] [:forbid-same-evaluation true|false])

Require control flow to have established the captured subject before the read: some path carries an establishment to it (:require reached, the default), or every entry-to-read path passes one (:require dominated). Optionally forbid an establishment from serving a read of its own evaluation. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:atrequiredan RQL capture name bound by the subject selector:at CAPTURE. Name the subject capture; it must capture the identifier token whose read is asserted about.
:rolerequiredone occurrence role from the analyzer registry:role ROLE. Name the occurrence role the read is spelled at; capability reporting narrows to exactly this role.
:requireoptionaldominated or reached:require dominated|reached. Require an establishment on some path (reached, the default) or on every entry-to-read path (dominated).
:forbid-same-evaluationoptionaltrue or false:forbid-same-evaluation true|false. Additionally forbid an establishment from serving a read inside its own evaluation.
(assert-rewrite-termination :id ID :domain DOMAIN [:scope CAPTURE])

Require every bounded rewrite chase of one declared finite domain to converge within the bound the domain declares for itself. A repeated semantic state is a finding with its ordered witness; an exhausted budget is absence of evidence and makes the run inconclusive. Legal in: policy, assertion.

FieldRequiredValueMeaning
:idrequireda lowercase local entry identifier:id "assert-id". Set the stable assertion identity used by finding anchors and messages.
:domainrequiredone bounded rewrite domain from the analyzer registry:domain DOMAIN. Name the declared finite rewrite domain whose chases must converge.
:scopeoptionalan RQL capture name bound by the subject selector:scope CAPTURE. Narrow the file set to the files whose subject rows bind this capture; omission states the domain terminates on every analyzed file.
(exactly N)

Require exactly N joined occurrence rows. Legal in: policy, assertion.

FieldRequiredValueMeaning
positionalrequireda non-negative integerN. Provide the exact required row count.
(at-least N)

Require at least N joined occurrence rows. Legal in: policy, assertion.

FieldRequiredValueMeaning
positionalrequireda non-negative integerN. Provide the inclusive lower bound on the row count.
(at-most N)

Require at most N joined occurrence rows. Legal in: policy, assertion.

FieldRequiredValueMeaning
positionalrequireda non-negative integerN. Provide the inclusive upper bound on the row count.
(generated-message :relation can-reach)

Generate the fixed source-display can-reach sink-display message after proven flow. Legal in: policy, taint.

FieldRequiredValueMeaning
:relationrequiredthe can-reach generated relation:relation can-reach. Select the fixed can-reach relation renderer.
(cvss-severity :when-unscored unrated|note|warning|error)

Derive severity from CVSS with an explicit unscored fallback. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:when-unscoredrequirednote, warning, error, or unrated:when-unscored unrated|note|warning|error. Set the fallback when no complete CVSS assessment exists.
(report [:witness WITNESS] [:witnesses-per-finding N] [:origins-per-finding N])

Bound witness and origin retention for each finding. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:witnessoptionala witness record:witness (witness ...). Override the per-witness bounds.
:witnesses-per-findingoptionala non-negative integer:witnesses-per-finding N. Bound retained witnesses per finding.
:origins-per-findingoptionala non-negative integer:origins-per-finding N. Bound retained dependency origins per finding.
(witness [:max-steps N] [:max-bytes N])

Bound the retained steps and encoded bytes of one witness. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:max-stepsoptionala non-negative integer:max-steps N. Bound retained steps in one witness.
:max-bytesoptionala non-negative integer:max-bytes N. Bound encoded bytes in one witness.
(classification :fallback CLASSIFICATION [:refinements [...]] [:cvss CVSS])

Declare a broad taxonomy classification, ordered refinements, and optional CVSS policy. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:fallbackrequireda classification-id record:fallback (classification-id ...). Preserve one broad taxonomy classification for every finding.
:refinementsoptionalordered refinement records; list (source order kept) of 0 to 128 items:refinements [(refinement ...)...]. Apply bounded refinements in source order.
:cvssoptionala cvss record:cvss (cvss ...). Optionally establish evidence-backed CVSS Base metrics.
(classification-id :taxonomy "NAME" :id "IDENTIFIER" [:name "DISPLAY NAME"])

Name one taxonomy classification without deriving semantics from its text. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:taxonomyrequireda bounded exact taxonomy name:taxonomy "NAME". Name the taxonomy exactly.
:idrequireda bounded exact taxonomy identifier:id "IDENTIFIER". Name the taxonomy identifier exactly.
:nameoptionala bounded human-readable name:name "Display name". Add optional taxonomy display text.
(refinement :when PREDICATE :add [CLASSIFICATION...])

Add classifications when a typed evidence predicate holds. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:whenrequireda typed classification evidence predicate:when PREDICATE. Select complete typed evidence for this refinement.
:addrequiredclassification-id records; set (no duplicates) of 1 to 64 items:add [(classification-id ...)...]. Add a non-empty duplicate-free classification set.
(all [PREDICATE...])

Require every non-empty child evidence predicate. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
positionalrequiredtyped evidence predicate records; set (no duplicates) of 1 to 256 items[PREDICATE...]. Provide the non-empty duplicate-free child predicate set.
(any [PREDICATE...])

Require at least one non-empty child evidence predicate. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
positionalrequiredtyped evidence predicate records; set (no duplicates) of 1 to 256 items[PREDICATE...]. Provide the non-empty duplicate-free child predicate set.
(analysis-type :is match|taint|typestate)

Match the current typed analysis kind. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:isrequiredmatch, taint, typestate, assertion, or flow:is match|taint|typestate. Match one exact analysis kind.
(source-categories (:any [...] | :all [...]))

Match exact categories on the resolved source endpoint. Legal in: policy, taint.

FieldRequiredValueMeaning
:anyoptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:any [CATEGORY...]. Match any listed source category; exclusive with all.
:alloptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:all [CATEGORY...]. Match all listed source categories; exclusive with any.
(sink-categories (:any [...] | :all [...]))

Match exact categories on the resolved sink endpoint. Legal in: policy, taint.

FieldRequiredValueMeaning
:anyoptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:any [CATEGORY...]. Match any listed sink category; exclusive with all.
:alloptionalopaque exact endpoint categories; set (no duplicates) of 1 to 64 items:all [CATEGORY...]. Match all listed sink categories; exclusive with any.
(source-labels (:any [...] | :all [...]))

Match normalized labels on the resolved source endpoint. Legal in: policy, taint.

FieldRequiredValueMeaning
:anyoptionalnormalized taint labels; set (no duplicates) of 1 to 64 items:any [LABEL...]. Match any listed source label; exclusive with all.
:alloptionalnormalized taint labels; set (no duplicates) of 1 to 64 items:all [LABEL...]. Match all listed source labels; exclusive with any.
(sink-tags (:any [...] | :all [...]))

Match normalized tags on the resolved sink endpoint. Legal in: policy, taint.

FieldRequiredValueMeaning
:anyoptionalnormalized sink tags; set (no duplicates) of 1 to 64 items:any [TAG...]. Match any listed sink tag; exclusive with all.
:alloptionalnormalized sink tags; set (no duplicates) of 1 to 64 items:all [TAG...]. Match all listed sink tags; exclusive with any.
(sink-impacts (:any [...] | :all [...]))

Match normalized impacts on the resolved sink endpoint. Legal in: policy, taint.

FieldRequiredValueMeaning
:anyoptionalnormalized sink impacts; set (no duplicates) of 1 to 64 items:any [IMPACT...]. Match any listed sink impact; exclusive with all.
:alloptionalnormalized sink impacts; set (no duplicates) of 1 to 64 items:all [IMPACT...]. Match all listed sink impacts; exclusive with any.
(finding-combination :id ID)

Match the selected intentional finding-combination identity. Legal in: policy, taint.

FieldRequiredValueMeaning
:idrequireda lowercase finding-combination identifier:id COMBINATION. Match one selected finding-combination ID.
(typestate-expectation :id ID)

Match the violated typestate terminal-expectation identity. Legal in: policy, typestate.

FieldRequiredValueMeaning
:idrequireda lowercase typestate expectation identifier:id EXPECTATION. Match one violated terminal-expectation ID.
(cvss :version "4.0" :emit when-base-complete :metric-rules [METRIC...])

Establish evidence-backed CVSS v4.0 Base metrics without authored scores. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:versionrequiredthe string 4.0:version "4.0". Select the only schema-version-1 CVSS authoring version.
:emitrequiredwhen-base-complete:emit when-base-complete. Emit a score only when all Base metrics are established coherently.
:metric-rulesrequiredCVSS metric records; list (source order kept) of 1 to 256 items:metric-rules [(metric ...)...]. Declare non-empty bounded evidence-backed Base metric rules.
(metric :name BASE-METRIC :value VALUE :when PREDICATE :basis policy-assertion :scope SCOPE :evidence-refs [...] :rationale TEXT [:assumptions [...]])

Establish one static CVSS Base metric from typed policy evidence. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
:namerequiredone of the eleven CVSS v4.0 Base metric names:name AV|AC|AT|PR|UI|VC|VI|VA|SC|SI|SA. Name one authorable CVSS v4.0 Base metric.
:valuerequireda value legal for the selected CVSS Base metric:value LEGAL-BASE-VALUE. Set a value legal for the selected Base metric; X is never authorable.
:whenrequireda typed CVSS evidence predicate:when PREDICATE. Select complete typed evidence that establishes the metric.
:basisrequiredpolicy-assertion:basis policy-assertion. Declare the only authorable static evidence basis.
:scoperequiredvulnerable-system, subsequent-system, or global:scope vulnerable-system|subsequent-system|global. Name the system scope required by the selected metric.
:evidence-refsrequiredpolicy evidence references; set (no duplicates) of 1 to 64 items:evidence-refs [EVIDENCE-REF...]. Cite a non-empty set of resolvable typed evidence facts.
:rationalerequiredbounded human-readable display text:rationale "text". Explain the static metric assertion.
:assumptionsoptionalbounded strings; set (no duplicates) of 0 to 64 items:assumptions ["text"...]. Record bounded explicit assumptions without changing evidence identity rules.
(all [CVSS-EVIDENCE-PREDICATE...])

Require every non-empty child CVSS evidence predicate. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
positionalrequiredtyped CVSS evidence predicate records; set (no duplicates) of 1 to 256 items[CVSS-EVIDENCE-PREDICATE...]. Provide the non-empty duplicate-free child CVSS evidence predicate set.
(any [CVSS-EVIDENCE-PREDICATE...])

Require at least one non-empty child CVSS evidence predicate. Legal in: policy, every analysis type.

FieldRequiredValueMeaning
positionalrequiredtyped CVSS evidence predicate records; set (no duplicates) of 1 to 256 items[CVSS-EVIDENCE-PREDICATE...]. Provide the non-empty duplicate-free child CVSS evidence predicate set.

An atom is an unquoted symbol from a closed set. An unknown spelling fails with invalid-enum-value, and the message lists every accepted spelling. Some values have an alternative spelling, shown in parentheses.

Used by (analysis :type ...).

SpellingMeaning
matchExecute a direct location-bearing selector.
taintDeclare set-oriented taint propagation inputs.
typestateDeclare endpoint-bound protocol tracking.
assertionDeclare correlated occurrence invariants over captured AST nodes.
flowDeclare policy-authored generic bounded value flow.

Used by (generated-message :relation ...).

SpellingMeaning
can-reachRender source display, can reach, and sink display after proven flow.

Used by :severity, (cvss-severity :when-unscored ...).

SpellingMeaning
unratedDo not assign a fixed report level.
noteReport at note level.
warningReport at warning level.
errorReport at error level.

Used by (endpoint :role ...), :role on match-directory and match-endpoints.

SpellingMeaning
sourceThe endpoint introduces or identifies a tracked value.
sinkThe endpoint consumes or observes a tracked value.

Used by (endpoint-set-document :kind ...).

SpellingMeaning
sourcesA standalone source endpoint set.
sinksA standalone sink endpoint set.
sanitizersA standalone sanitizer endpoint set.
entry-pointsA standalone entry-point endpoint set.
transformsA standalone taint transform endpoint set.
external-modelsA standalone external-model endpoint set.
storesA standalone store endpoint set.
originsA standalone value-flow origin endpoint set.
observationsA standalone value-flow observation endpoint set.
killsA standalone value-flow kill endpoint set.
flow-transformsA standalone value-flow transform endpoint set.

Used by :binding, :bind, :dangerous-operand, :input, :output, :observed-operand, :key, :instance, :subject.

SpellingMeaning
matched-valueBind the location-bearing value selected directly by non-call RQL.
receiverBind the call receiver.
return-valueBind the normal return value.

Used by (calls :subject ...) and external-model ports.

SpellingMeaning
receiverBind the already tracked call receiver.
return-valueBind the already tracked normal return value.

Used by (analysis :mode ...).

SpellingMeaning
mayReport flows or protocol paths that may occur.

Used by (call-modeling :unmodeled ...).

SpellingMeaning
paranoidConservatively propagate every transfer justified by structured call-site metadata.
optimisticPreserve existing facts without adding flows through the unseen body.
require-modelAbstain from input-dependent transfer when no exact or curated model applies.

Used by (on-unknown :verdict ...).

SpellingMeaning
abstainKeep the findings, publish the inconclusive completion, and exit unreliable. The default.
warn-unreliableKeep the findings and the inconclusive completion, mark them unreliable, and exit on the findings alone.
fail-closedTreat the blocked verdict as a gate failure at the policy severity, and name the unknown that caused it.
treat-may-as-findingPublish explicit may evidence as possible findings with its reasons; unmet coverage obligations still make the run inconclusive. Flow and taint already retain possible findings under every verdict.

Used by (evidence :trust-boundary ...), (source-evidence :trust-boundary ...).

SpellingMeaning
externalThe value crosses an external trust boundary.
internalThe value originates inside the system trust boundary.
same-trust-zoneThe value remains in the same trust zone.

Used by (evidence :system-entry ...), (source-evidence :system-entry ...).

SpellingMeaning
vulnerable-system-network-stackThe value enters through the vulnerable system network stack.
downloaded-artifactThe value enters through a downloaded artifact.
local-inputThe value enters through local input.
adjacent-networkThe value enters from an adjacent network.
physicalThe value requires physical access.

Used by (match-directory :scope ...).

SpellingMeaning
directInspect only direct directory children.
recursiveInspect the bounded subtree recursively.

Used by (transfer :effect ...); the records (sanitize ...) and (transform ...) are the other two effects.

SpellingMeaning
propagatePropagate the selected labels unchanged.

Used by (uncertainty :escape ...).

SpellingMeaning
inconclusiveMark the policy run incomplete rather than assuming behavior.

Used by :phase on calls, match-directory, and match-endpoints.

SpellingMeaning
at-matchObserve a direct matched value.
before-callObserve the bound value before call execution.
after-normal-returnObserve after the normal continuation.
after-exceptional-returnObserve after the exceptional continuation.

Used by :scope on normal-procedure-exit, exceptional-procedure-exit, suspension-boundary.

SpellingMeaning
analysis-rootObserve only the outer demand procedure, not helper returns.

Used by (cvss :version ...).

SpellingMeaning
4.0Use CVSS version 4.0.

Used by (cvss :emit ...).

SpellingMeaning
when-base-completeScore only a coherent complete Base vector.

Used by (metric :basis ...).

SpellingMeaning
policy-assertionEstablish a static metric from verified policy evidence.

Used by (metric :scope ...).

SpellingMeaning
vulnerable-systemThe metric concerns the vulnerable system.
subsequent-systemThe metric concerns a subsequent system.
globalThe metric is global rather than system-scoped.

Used by (metric :evidence-refs [...]).

SpellingMeaning
policy:selfReference the policy assertion itself.
selector:PATH (prefix selector:)Reference one stable selector semantic path.

Used by :role, :equals-role, :to-role on specialized assertions.

SpellingMeaning
declaration_nameThe name token of a declaration head.
binderA pure binding introduction.
label_or_keyA label, keyword-argument name, or keyed-field position.
type_operandAn identifier consumed as a type.
path_segmentA non-terminal segment of a qualified path.
import_aliasThe locally introduced alias name in an import or export.
import_targetThe imported or exported source name.
receiver_positionThe receiver of a member access or call.
member_positionThe member name in a member access or call.
pattern_positionA non-binding identifier inside a pattern.
generated_sourceA token whose presence generates declarations elsewhere.
value_referenceA plain read or write of a value in expression position.

Used by (assert :expect ...).

SpellingMeaning
declarationRequire declaration-class rows at the asserted role.
referenceRequire reference-class rows at the asserted role.
bindingRequire binding-class rows at the asserted role.
noneForbid any occurrence at the asserted role.

Used by (assert :namespace ...).

SpellingMeaning
typeThe type naming space.
valueThe value naming space.
moduleThe module naming space.
macroThe macro naming space.
labelThe label naming space.
path_prefixThe qualifier naming space: a non-terminal path segment names a module or a type, decided by lookup rather than by syntax.

Used by (assert-generation :kind ...).

SpellingMeaning
accessor_macroA member-generating attribute macro such as attr_accessor.
alias_macroAn alias-generating call such as alias_method.
preprocessor_definitionA #define that materializes a macro unit.

Used by (assert-declaration-state :origin ...).

SpellingMeaning
parsedExtracted from its own declaration node in a clean parse.
generatedMaterialized by a macro-like construct with no declaration node of its own.
recoveredReconstructed from a broken parse by analyzer recovery.

Used by :expect-tier, :forbid-tier on assert-resolution.

SpellingMeaning
lexical_bindingA binding introduced by the lexical environment.
own_memberA member declared by the enclosing type itself.
inherited_memberA member inherited from a supertype.
explicit_importA name introduced by an explicit single-name import.
package_or_moduleA name reachable in the same package or module.
wildcard_importA name introduced by an on-demand or wildcard import.
external_rootA name reached through an external declaration root.
name_only_fallbackA selection made by bare-name scan after structured routes were available.

Used by :declared on assert-binding-scope, :established on assert-value-origin.

SpellingMeaning
insideThe declaring scope is contained in the named capture.
outsideThe declaring scope is not contained in the named capture.

Used by (assert-origin-shape :shape ...).

SpellingMeaning
collection-literalA collection display literal: an array, list, set, dictionary, or tuple literal.

Used by (assert-boundary :forbid-fallback-past ...).

SpellingMeaning
external_declared_unindexedThe lookup reached an external root the build declares but nothing indexed.
external_unknownThe lookup reached ground nothing is known about.

Used by :surface on assert-edge-parity and assert-edge-class.

SpellingMeaning
external-usages (also external_usages)Compare only edges the external-usage surface counts.
lsp-references (also lsp_references)Compare every editor-visible edge, imports and self receivers included.

Used by (assert-edge-class :axis ...).

SpellingMeaning
relationConstrain the owner relation between the site’s encloser and the target.
usageConstrain the usage kind of the edge.
site-class (also site_class)Constrain whether the site is a use site or a declaration site.
kindConstrain the structured source-reference kind of the edge.

Used by (assert-flow-establishment :require ...).

SpellingMeaning
reachedSome control-flow path carries an establishment to the read.
dominatedEvery entry-to-read path passes an establishment.

Used by (assert-rewrite-termination :domain ...).

SpellingMeaning
rust-import-alias (also rust_import_alias)The Rust import-alias specifier chase, keyed on the specifier root and bounded by the importing file’s binder root count.

Used by :via and :forbid on assert-route.

SpellingMeaning
aliasA local respelling of a declaration: an import alias or a type alias.
importAn import binding that brings a declaration’s name into a file or scope.
exportAn export site that makes a local declaration reachable from outside its file or module.
re_exportAn export whose subject comes from elsewhere, forwarding identity onward.
partial_partOne physical part of a declaration source spells in several pieces.
declaration_definition_peerThe peer link between a declaration head and its definition body.
nested_ownerThe projection from a nested declaration onto its owner.
implementationThe link from an abstract member to a concrete member implementing it.
generated_peerThe link between a synthetic declaration and its source declaration.

Used by flag fields such as :require-target, :at-least, :distinct, :forbid-dynamic.

SpellingMeaning
trueEnable the flag.
falseDisable the flag.

Used by (join :kind ...).

SpellingMeaning
innerRetain rows with matching right-side rows.
semiRetain left rows that have at least one matching right-side row, without carrying the right relation columns.
antiRetain left rows with no matching right-side row.

Used by (aggregate :op ...).

SpellingMeaning
minCompute the minimum integer value.
countCount retained rows.
count-distinctCount distinct non-null typed values.
maxCompute the maximum integer value.
anyFold a boolean column to one when some contributing row is true, and to zero otherwise.
allFold a boolean column to one when every contributing row is true, and to zero otherwise. A group with no contributing row folds to one.
set-equalOne when the distinct present left and right stable-key values are equal as sets, zero otherwise.
subsetOne when every distinct present left stable-key value occurs on the right, zero otherwise.
ordered-equalCompare two ordered row sequences position by position: one when they hold the same value at every position and have the same length, zero otherwise.

(metric :name ...) accepts the eleven CVSS v4.0 Base metric names. Each metric accepts only the values in its row. :scope must match the metric’s system scope.

:nameMetricLegal :valueScope
AVAttack VectorN, A, L, Pvulnerable-system
ACAttack ComplexityL, Hvulnerable-system
ATAttack RequirementsN, Pvulnerable-system
PRPrivileges RequiredN, L, Hvulnerable-system
UIUser InteractionN, P, Avulnerable-system
VCVulnerable System ConfidentialityH, L, Nvulnerable-system
VIVulnerable System IntegrityH, L, Nvulnerable-system
VAVulnerable System AvailabilityH, L, Nvulnerable-system
SCSubsequent System ConfidentialityH, L, Nsubsequent-system
SISubsequent System IntegrityH, L, Nsubsequent-system
SASubsequent System AvailabilityH, L, Nsubsequent-system

A scored CVSS assessment requires all eleven metrics. A policy never supplies a numeric score.

Every policy run (--policy, --policy-file, built-in selectors, and bifrost scan) exits with one of three statuses. MCP run_policy returns the same value as the computed policy status.

StatusMeaning
0The run is reliable, no active finding met the --fail-on threshold, and no suppression record is orphaned.
1The run is reliable, and at least one active finding met the threshold or at least one suppression record has orphan_state: orphaned.
2The run is unreliable, or the command could not run. Status 2 takes precedence over status 1.

An orphaned suppression record gives status 1 even with --fail-on never.

A run is unreliable, and exits 2, when any of these is true:

  • The CLI rejected an argument, a selector, or a combination of options.
  • The run stopped at its deadline (execution.termination is set).
  • The report has a report diagnostic with severity error. Every report diagnostic code except workspace-model-inert has severity error.
  • The report dropped diagnostics (diagnostics_truncated: true).
  • A policy run’s completion is inconclusive, unsupported, or failed, or it is not_run after the user explicitly named its policy ID. The exception: an inconclusive run whose policy declares (on-unknown :verdict warn-unreliable) or (on-unknown :verdict fail-closed) does not make the batch unreliable.
  • No finding met the threshold and a policy run’s completion is proven_subset. A proven subset cannot support a clean result.

An active finding is a finding that no suppression, scope entry, or baseline entry claims, and, under --diff-base, whose disposition is new.

--fail-on thresholds:

ValueA finding gates when its severity is
neverNever. Orphaned suppressions still give status 1.
findingAny severity, including unrated.
notenote, warning, or error.
warning (default)warning or error.
errorerror.

With (on-unknown :verdict fail-closed), an inconclusive run counts as a finding at the policy’s severity.

The explanation flags (--explain-finding, --explain-candidate, --explain-near-misses) exit 0 whenever they produce an answer, whatever the answer says, and 2 when they cannot produce one. --accept-current exits 0 after it writes the baseline and 2 when the run is unreliable.

Each entry of runs[] has a completion object. Its type is one of seven values.

typeExtra fieldsReliableExhaustiveZero findings can exit 0SARIF notification ID
completenoneyesyesyesnone
proven_subsetcodes: the CodeQuery diagnostic codes that limited the searchyesnono; exits 2BIFROST_POLICY_PROVEN_SUBSET (warning)
proven_by_summarynoneyesnoyesBIFROST_POLICY_PROVEN_BY_SUMMARY (warning)
inconclusivereasons: list of incomplete reasons; scope: which files the verdict concernsnonono; exits 2 unless on-unknown says otherwiseBIFROST_POLICY_INCONCLUSIVE (warning)
not_rununavailable_capabilities: unavailable capability labels and reasons; selected_by: explicit policy ID or pack/category/defaultyes for implicit selection; no for an explicit policy IDnoimplicit selection does not affect the exit status; explicit ID exits 2BIFROST_POLICY_NOT_RUN (note)
unsupportedcapability: the missing capabilitynonono; exits 2BIFROST_POLICY_UNSUPPORTED (warning)
failedreasons: list of failure reasonsnonono; exits 2BIFROST_POLICY_FAILED (error)
  • Reliable means the run’s findings are trustworthy evidence. A reliable run with a gated finding exits 1.
  • Exhaustive means a zero-finding result proves absence from analyzed code. Only complete is exhaustive.
  • proven_subset: every retained finding is proven, but the run searched only part of the program. Zero findings is not a clean result.
  • proven_by_summary: the result is precise, but it depends on authored external procedure summaries rather than on analyzed code. A clean result is a claim under those summaries, not proof from code.
  • not_run: the policy was selected, but a required capability was unavailable. It has no findings and makes no absence claim. The report keeps it separate from policies that ran. A pack, category, or default selection remains reliable; an explicitly named policy ID exits 2 because Bifrost could not honor that request.

An inconclusive run’s scope says which files the blocked verdict concerns, tagged by type:

  • files: files lists workspace-relative paths, sorted and spelled like a finding’s primary.path. Every finding the run could have missed lies in one of these files, so its verdict on any other file is as reliable as a complete run’s. At most 256 files are listed; truncated: true means more were left out, and the list then makes no promise.
  • run: at least one cause could not be tied to files, so the verdict concerns the whole run.

An assertion that judges each file on its own names the files it could not conclude. A taint run whose solve could not finish names the files of every sink the policy bound, where every taint finding is anchored, rather than the file where the solve stopped. A relational assertion with no join that bounds an unfiltered count above by zero (exactly 0 or at-most 0), as the code-smell rules do, names the files of the rows it could not see, when every query diagnostic behind the gap names them in withheld_rows_path. Every other cause, such as budgets, incomplete selectors and report retention, is run.

inconclusive reasons: cancelled, deadline_exceeded, query_result_limit, batch_finding_limit, scanned_file_budget, source_byte_budget, fact_node_budget, pipeline_row_budget, import_graph_budget, reference_candidate_budget, no_analyzable_files, partial_discovery, capability_incomplete, endpoint_dominance_undecidable, stable_anchor_unavailable, report_retention_budget, cvss_variant_budget, projection_scenario_membership_budget, organizational_risk_overlay_budget.

failed reasons: invalid_execution_plan, workspace_snapshot_unavailable, source_read_failed, workspace_io, ambiguous_endpoint_dominance, ambiguous_typestate_binding, conflicting_organizational_risk_overlay, internal_invariant.

unsupported capability, tagged by type:

typeFields
taint_evaluationnone
typestate_evaluationnone
query_featurelanguage, feature
query_domaindomain, optional capability, and reason: capability_unavailable, provider_unavailable, pack_unavailable, or cross_domain_operator_unavailable

--format json prints the canonical policy report. MCP run_policy returns the same document. Its schema_version is 6. The human and SARIF renderers read the same document, so the three formats agree on finding IDs, hashes, locations, severity, certainty, completion, evidence, and classifications.

Fields appear in this order. Fields marked “when present” are omitted when they do not apply.

FieldTypeMeaning
schema_versionintegerAlways 6.
evaluationobjectThe evaluation date and the review file sources. See below.
executionobjectTiming and progress metadata. See below.
rulesarrayOne rule descriptor per loaded policy.
runsarrayOne run object per evaluated policy and one not_run object for each selected policy skipped for an unavailable capability.
suppressionsarrayOne suppression review per loaded suppression record.
scopearrayOne scope review per loaded scope entry.
diffobject, when presentThe diff review. Present only with --diff-base or MCP diff_base.
incrementalobject, when presentWhat the run reused from the policy-unit cache.
packsobject, when presentSemantic-model pack activation decisions.
baselineobject, when presentThe baseline review. Present only when a baseline document loaded.
diagnosticsarrayReport diagnostics. See Report diagnostic codes.
diagnostics_truncatedBooleanTrue when diagnostics were dropped. This makes the run exit 2.
omitted_diagnostics_lower_boundintegerAt least this many diagnostics were dropped.
worst_omitted_diagnostic_severitystring or nullnote, warning, or error for the worst dropped diagnostic.

evaluation:

FieldMeaning
evaluation_dateThe UTC date used for suppression expiry and baseline acceptance, YYYY-MM-DD.
suppression_sourcesOne {path, state} per configured suppression file: the three conventional files in order, or the one file that --suppressions-file names. A file that does not exist is listed with state not_found.
scope_pathThe scope file path.
scope_document_stateState of the scope file.

A document state is not_evaluated, not_found, loaded, or invalid.

execution:

FieldMeaning
total_elapsed_msTotal elapsed time. Successful reports keep it at 0 so the output is deterministic.
stage_timings{stage, elapsed_ms} entries. Stages: policy_selection, suppression_preflight, workspace_snapshot, policy_registration, policy_preparation, diff_base, policy_evaluation, report_construction.
terminationnull, or deadline_exceeded when the run stopped at its deadline.
terminal_stageThe stage that was running when the run stopped, or null.
active_policy_idThe policy that was running when the run stopped, or null.
completed_policy_ids, pending_policy_idsProgress at the time the run stopped.

Each rules[] entry describes one loaded policy.

FieldMeaning
policy_idStable policy ID.
policy_hashSHA-256 semantic hash of the resolved policy.
analysis_typematch, taint, typestate, assertion, or flow.
policy_schema{version, origin}. origin is explicit, implicit_compatible, or referenced_document_explicit.
selector_schemas{path, resolution} for every selector. path is a JSON pointer into the policy, for example /analysis/selector. resolution has the same shape as policy_schema.
endpoint_dependencies, match_directory_manifests, endpoint_set_dependenciesThe endpoint, match-directory, and endpoint-set inputs the policy resolved.
precedence_manifest{edges}: the finding-combination precedence edges.
name, description, help_uri, tagsPolicy metadata. description and help_uri can be null.
message{type: "static", text} or {type: "generated", relation: "can_reach"}.
severity{type: "fixed", level} with level note, warning, or error; {type: "unrated"}; or {type: "cvss", when_unscored}.
FieldMeaning
policy_id, policy_hash, analysis_typeThe policy that ran.
completionThe completion state. See Completion states.
findingsRetained findings.
diagnosticsRun diagnostics. Each has code (tagged by type), severity, impact, family, message, family_count, primary, and related.
diagnostics_truncatedTrue when run diagnostics were folded or dropped.
obligationsUnmet negative-proof obligations of an assertion policy. Each names the assertion, the kind (absence_requires_exhaustive_coverage or verdict_requires_witnessed_rows), the group, and the group_key.
obligations_truncated, omitted_obligations_lower_boundObligation truncation.
workWork counters: scanned_files, scanned_source_bytes, fact_nodes, pipeline_rows, examined_references, retained_findings, omitted_findings_lower_bound, retained_report_bytes, and metrics. --policy-timings adds elapsed time to metrics.
authored_arm_closuresWhen present, evidence that an authored model closed a dispatch arm.
unknown_verdictWhen present, the policy’s declared on-unknown verdict, applied to an inconclusive run.

Run diagnostic impact values: advisory, declared_non_exhaustive, finding_partial, run_incomplete, run_unsupported, run_failed. Run diagnostic code.type values: code_query (with a nested CodeQuery code), unsupported_analysis, stable_anchor_unavailable, endpoint_dominance_undecidable, evaluation_failure, empty_selection, unknown_verdict_fail_closed, batch_finding_limit, report_retention_budget, cvss_variant_budget, projection_scenario_membership_budget, organizational_risk_overlay_budget.

FieldMeaning
idFinding ID: 64 lowercase hex digits.
identity_stabilitystrong or weak. Only a strong ID is stable across runs and can be suppressed or baselined.
policy_id, policy_hash, analysis_typeThe policy that produced the finding.
severityunrated, note, warning, or error.
messageFinding text.
classification{type: "unclassified"}, or {type: "classified", broad, refinements}.
certainty{type: "definite"} or {type: "possible", reasons}.
completeness{type: "complete"} or {type: "partial", reasons}.
primary{path, byte_span: {start, end}, region: {start_line, start_column, end_line, end_column}}. path is workspace-relative with forward slashes.
relatedRelated locations, each with a relationship such as source, sink, origin, evidence, witness_step, or declaration.
related_truncated, omitted_related_locations_lower_boundRelated-location truncation.
evidenceTyped evidence, tagged by type: match, taint, typestate, assertion, or flow.
evidence_refs_truncated, omitted_evidence_refs_lower_boundEvidence-reference truncation.
cvssCVSS assessments, or null.
organizational_riskOrganizational risk assessment, or null.
proof{state, reasons, evidence_refs}. state is proven, unproven, or ambiguous.
witnessesBounded witness paths.
witnesses_truncated, omitted_witnesses_lower_boundWitness truncation.
display_pathWhen present, the display path of a taint finding.
suppressionnull, or the applied suppression: identity_stability, status, reason, policy_hash_at_acceptance, accepted_by, accepted_at, expires_at, and policy_hash_state.
scopenull, or the scope entry that claimed the finding: {path, reason}.
diffWhen present (diff runs): {disposition, weak_identity}. disposition is new or persisting. A weak identity is always new.
baselineWhen present (baselined findings): reason, optional accepted_by, accepted_at, and policy_hash_state.

certainty possible reasons and completeness partial reasons are typed lists. Finding partial reasons: query_provenance_truncated, related_locations_truncated, origins_truncated, source_scenarios_truncated, typestate_scenarios_truncated, witness_truncated, evidence_truncated, declared_non_exhaustive, proof_partial, stable_anchor_weak.

Suppression review, one per entry of suppressions[]:

FieldValuesMeaning
policy_id, finding_idThe record’s join key.
identity_stability, status, reason, policy_hash_at_acceptance, accepted_by, accepted_at, expires_atCopied from the record.
match_statestrong_finding, current_finding_not_strong, finding_absent, policy_not_evaluated, policy_incompleteHow the record joined this run. finding_absent requires a completed run that proves absence.
temporal_statecurrent, expiredexpired when the evaluation date is after expires_at.
policy_hash_statematching, drifted, unknownComparison of policy_hash_at_acceptance with the current hash. unknown when either is missing.
orphan_stateresolved, orphaned, path_not_analyzed, path_unrecordedWhether the record still resolves to a finding. orphaned gives exit status 1.
appliedBooleanTrue when the record claimed a finding.
result_omittedBooleanTrue when the review result did not fit the report retention budget.
rekey_candidateslist of finding IDsOnly on an orphaned record: up to 8 unclaimed finding IDs of the same policy in the record’s file.

Scope review, one per entry of scope[]: the entry’s path, reason, exclude_roots, policy_ids, and policy_categories, plus matched_findings (count), excluded_root_files (count, omitted when zero), applied (true when the entry matched a finding or excluded a root), and result_omitted.

Diff review (diff):

FieldMeaning
base_revisionThe revision as given to --diff-base.
base_commitThe resolved commit.
degradedTrue when the base evaluation was unreliable and every head finding gates.
unqualified_policiesPolicies whose base run was not reliable: {policy_id, completion, completion_detail, diagnostics}.
new_count, persisting_count, fixed_countExact counts.
fixedUp to 256 {policy_id, finding_id} of base findings the head no longer produces.
fixed_truncatedTrue when fixed was cut at 256.

Incremental review (incremental): base is evaluated or reused. policies holds one entry per policy with policy_id, mode (sliced or full), units_total, units_reused, units_recomputed, units_unbounded, and, for a full policy, widen_reason. The widen reasons are listed in What a second run reuses.

Pack activation review (packs):

FieldMeaning
document_pathThe packs document path, .bifrost/packs.json.
dependency_modedefault (no packs document), configured, or disabled (empty ecosystems).
ecosystemsEcosystems considered.
completeTrue when activation evidence was complete.
decisions{pack, status, reason} per pack. reason is omitted when there is none. status is selected, version_mismatch, missing, incompatible, or rejected. Each Python, PHP, Rust, TypeScript, and JavaScript workspace has a row for its expected standard-library pack, whose reason starts with the language. A row whose pack is node:<module> is a Node built-in module the workspace imports that no active pack declares.
decisions_truncatedTrue when decisions were dropped.

Baseline review (baseline):

FieldMeaning
document_pathThe baseline file path.
reason, accepted_by, accepted_atBatch metadata from the document. accepted_by is omitted when absent.
entry_countNumber of entries in the document.
applied_countEntries that claimed a finding.
claimed_countEntries whose finding a suppression or scope entry already claimed.
not_strong_countEntries whose current finding has a weak identity.
stale_countEntries that a completed run proves absent.
policy_not_evaluated_countEntries whose policy did not run.
policy_incomplete_countEntries whose policy ran but not exhaustively.
drifted_countEntries whose policy hash changed since acceptance.
result_omitted_countEntries whose review did not fit the retention budget.
entriesUp to 256 entries that need attention: everything except applied entries with a matching hash.
entries_truncatedTrue when entries was cut. The counts stay exact.

Each baseline entry review has policy_id, finding_id, match_state (strong_finding, finding_claimed, current_finding_not_strong, finding_absent, policy_not_evaluated, policy_incomplete), policy_hash_state (matching, drifted, unknown), applied, stale, and result_omitted.

--format sarif writes SARIF 2.1.0 with one run. Region columns use Unicode code points (columnKind: unicodeCodePoints), and artifact URIs are workspace-relative under uriBaseId: SRCROOT.

tool.driver.rules[] has one reporting descriptor per policy. id is the policy ID. shortDescription is the policy name, fullDescription is the description (or the message when there is none), helpUri is the policy’s :help-uri, and defaultConfiguration.level comes from the policy severity (unrated maps to none). properties.tags holds the policy tags, and properties["bifrost.ruleDescriptor"] holds the full rule descriptor.

One result per retained finding.

SARIF fieldValue
ruleId, ruleIndexThe policy.
message.textThe finding message.
levelerror, warning, note, or none (unrated).
kindreview for a finding with possible certainty; informational for an unrated finding; omitted otherwise.
baselineStateDiff runs only: new, or unchanged for a persisting finding. Fixed base findings are not emitted as results.
locations, relatedLocationsThe primary location and the related locations. Each related location has properties["bifrost.relationship"] and properties["bifrost.evidenceRefs"].
codeFlowsTaint findings with a display path: one code flow.
partialFingerprints["bifrostFinding/v1"]The finding ID. Present only for a strong identity.
suppressionsOne entry when a suppression or the baseline claims the finding. See below.

Result properties:

KeyValue
bifrost.findingIdFinding ID.
bifrost.policyHashPolicy semantic hash.
bifrost.analysisTypeAnalysis type.
bifrost.identityStabilitystrong or weak.
bifrost.severityFinding severity.
bifrost.unratedtrue for an unrated finding; omitted otherwise.
bifrost.runCompletionThe run’s completion object.
bifrost.findingCompletenessThe finding’s completeness object.
bifrost.certaintyThe certainty object.
bifrost.classificationThe classification object.
bifrost.evidenceThe typed evidence object.
bifrost.relatedLocationsTruncated, bifrost.omittedRelatedLocationsLowerBoundRelated-location truncation.
bifrost.evidenceRefsTruncated, bifrost.omittedEvidenceRefsLowerBoundEvidence-reference truncation.
bifrost.cvssCVSS assessments; omitted when absent.
bifrost.organizationalRiskOrganizational risk; omitted when absent.
bifrost.proofThe proof object.
bifrost.witnessesTruncated, bifrost.omittedWitnessesLowerBoundWitness truncation.
bifrost.diffDispositionDiff runs only: new or persisting.

A code flow carries bifrost.displayPathSchemaVersion, bifrost.representativeWitnessId, bifrost.witnessIds, bifrost.canonicalIncomplete, bifrost.omittedMeaningfulSteps, bifrost.alternativesTruncated, bifrost.omittedAlternativePathsLowerBound, and bifrost.omittedWitnessesLowerBound. Each thread-flow location carries bifrost.kind.

A suppressions entry has kind: "external", status: "accepted", and the reason as justification. For a suppression, its properties hold bifrost.identityStability, bifrost.acceptedBy (when set), bifrost.acceptedAt, bifrost.expiresAt (when set), bifrost.policyHashAtAcceptance (when set), and bifrost.policyHashState. For a baseline entry, they hold bifrost.decision: "baseline", bifrost.acceptedBy (when set), bifrost.acceptedAt, and bifrost.policyHashState. A scoped finding has no suppressions entry; its scope decision is in the run’s bifrost.scopeReviews.

KeyValue
bifrost.executionThe execution object.
bifrost.incrementalThe incremental review; omitted when absent.
bifrost.policyReportSchemaVersion5.
bifrost.policyEvaluationThe evaluation object.
bifrost.policyRunsPer policy: policy_id, policy_hash, analysis_type, completion, diagnostics, diagnostics_truncated, and work.
bifrost.suppressionReviewsThe suppression reviews.
bifrost.scopeReviewsThe scope reviews.
bifrost.diffBaselineThe diff review; omitted when absent.
bifrost.packActivationThe pack activation review; omitted when absent.
bifrost.baselineThe baseline review; omitted when absent.
bifrost.reportDiagnosticsThe report diagnostics.
bifrost.reportDiagnosticsTruncated, bifrost.omittedReportDiagnosticsLowerBoundReport diagnostic truncation.
bifrost.worstOmittedReportDiagnosticSeverityWorst dropped diagnostic severity; omitted when none.

runs[].invocations[] has one invocation:

FieldValue
exitCodeThe policy exit status (0, 1, or 2). The CLI sets it; a library renderer without an outcome omits it.
exitCodeDescriptionPolicy gate passed: no gated findings (0), Policy gate failed: findings or policy obligations met the failure threshold (1), or Policy analysis was incomplete or invalid and is unreliable (2).
executionSuccessfulfalse when any report diagnostic is an error, diagnostics were dropped, the run stopped at its deadline, any policy run is not reliable, or the exit status is 2.
toolExecutionNotificationsOne notification per report diagnostic, one for dropped diagnostics, and one per policy run whose completion is not complete.

Notification descriptor.id values:

IDLevelEmitted for
a report diagnostic code, for example policy-load-failedthe diagnostic severityOne report diagnostic. properties["bifrost.reportDiagnostic"] holds the diagnostic. See Report diagnostic codes.
BIFROST_REPORT_DIAGNOSTICS_TRUNCATEDworst omitted severity, or warningDropped report diagnostics. properties hold bifrost.diagnosticsTruncated and bifrost.omittedDiagnosticsLowerBound.
BIFROST_POLICY_PROVEN_SUBSETwarningA proven_subset run.
BIFROST_POLICY_PROVEN_BY_SUMMARYwarningA proven_by_summary run.
BIFROST_POLICY_INCONCLUSIVEwarningAn inconclusive run.
BIFROST_POLICY_UNSUPPORTEDwarningAn unsupported run.
BIFROST_POLICY_FAILEDerrorA failed run.

A policy-run notification’s properties hold bifrost.policyId, bifrost.policyHash, bifrost.completion, bifrost.diagnosticsTruncated, bifrost.omittedDiagnosticsLowerBound, bifrost.authoredArmClosures (when present), and bifrost.obligations (when the run has unmet obligations: count, up to four kinds, and truncation fields). A notification is information about the run. Its ID alone is not a failure verdict; read exitCode for that.

Report diagnostics are in the JSON report’s top-level diagnostics array and in SARIF toolExecutionNotifications. Each has code, severity, message, optional source (a workspace-relative path or source identity), optional byte_range, and related locations. Use the code for automation; message wording can change.

Every code has severity error, and so makes the run exit 2, except workspace-model-inert, which is a warning.

CodeMeaningNext step
workspace-snapshot-deadline-exceededThe workspace snapshot was not ready within the request’s time budget. No policy ran.Retry after workspace initialization finishes.
diff-base-deadline-exceededThe time budget expired while the diff base was evaluated. No policy ran against the head.Retry, or run without --diff-base to measure the head alone.
diff-base-unreliableThe diff base resolved, but its evaluation was not reliable. Every head finding gates, and the diff review has degraded: true.Read the message for the base’s failure, fix it, and rerun.
diff-base-policy-unqualifiedOne policy’s base run was not reliable. That policy uses full gating.Read the policy’s completion and diagnostics in the message and in diff.unqualified_policies.
suppression-load-failedA suppression file is malformed, unsafe, oversized, or conflicts with another. None of that file applies.Fix the file named in source. Limits are in Suppression file.
suppression-audit-retention-exceededSuppression or scope reviews did not fit the report retention budget.Remove dead records, or split the run into smaller selections.
scope-load-failedThe scope file is malformed or exceeds a limit. None of it applies.Fix the file named in source. Limits are in Scope file.
scope-audit-retention-exceededScoped finding results did not fit the report retention budget.Narrow the selection or the scope entries.
baseline-load-failedThe baseline file is malformed or exceeds a limit. None of it applies.Fix or regenerate the file with --accept-current.
baseline-audit-retention-exceededBaselined finding results did not fit the report retention budget.Narrow the selection.
packs-load-failed.bifrost/packs.json could not be read or parsed.Fix the packs document.
pack-activation-failedSemantic-model pack activation failed.Read the named pack and reason in the message.
workspace-model-load-failedA reviewed model under .bifrost/semantic-models/ could not be discovered, compiled, registered, or activated.Fix the model file named in source.
workspace-model-inertWarning. A reviewed workspace model registered but stayed inactive behind its review gate, so it contributed nothing.Add an enable entry for the model’s pack to .bifrost/packs.json if you intend to use it.
policy-load-failedA policy file could not be read.Check the path and permissions.
policy-parse-failedThe policy text is not one well-formed S-expression document: too large, invalid, incomplete, missing, or followed by a second document.Fix the syntax at byte_range.
policy-validation-failedThe policy parsed but is invalid, or a dependency such as an endpoint-set file is missing or invalid.Fix the declaration at byte_range, or create the missing dependency.
not-executable-endpointAn endpoint or endpoint-set-document file was passed as a policy root.Pass the policy that imports it instead.
duplicate-policy-idTwo inputs define the same policy ID. Every definition is excluded.Give each policy a unique ID, or do not run a copy beside the original.
duplicate-endpoint-idTwo endpoints share an ID.Give each endpoint a unique ID.
policy-count-limitThe run loaded more policies than the registry allows.Split the run.
endpoint-count-limitThe run loaded more endpoints than the registry allows.Reduce the endpoint set.
match-directory-limitA match-directory exceeds its entry or candidate limits.Narrow the directory or use :scope direct.
match-directory-manifest-mismatchA match-directory content does not match its :manifest-sha256.Update the pin or restore the reviewed directory.
unsupported-policy-schema-versionA policy or endpoint pins a schema version the engine does not have.Pin :schema-version 1 or omit it.
unsupported-rql-schema-versionA selector pins an RQL schema version the engine does not have.Pin :schema-version 1 or omit it.
conflicting-rql-schema-versionAn rql-file wrapper and the file it references pin different RQL versions.Make the two pins agree, or remove one.
explicit-policy-schema-version-requiredWith --require-explicit-schema-versions, a policy or endpoint omits :schema-version.Add :schema-version 1.
explicit-rql-schema-version-requiredWith --require-explicit-schema-versions, a selector omits its RQL version.Add :schema-version 1 to the selector.

All three review files are JSON documents with schema_version: 1. Unknown fields are rejected. Paths inside them are workspace-relative, use forward slashes, and contain no . or .. components. A missing file means no decisions. A malformed, oversized, or invalid file applies none of its records, produces a report diagnostic, and makes the run exit 2. Dates are YYYY-MM-DD. The configuration files reference lists every file Bifrost reads.

FileOverrideMCP field
.bifrost/suppressions.json, .bifrost/suppressions.private.json, .bifrost/suppressions.local.json--suppressions-file PATH replaces all three with one file.suppression_file
.bifrost/policy-scope.json--scope-file PATHscope_file
.bifrost/baseline.json--baseline-file PATHbaseline_file

A finding is claimed by at most one mechanism, in this order: suppression, then scope, then baseline.

By default Bifrost reads .bifrost/suppressions.json, .bifrost/suppressions.private.json, and .bifrost/suppressions.local.json, in that order, and merges their records. Each file is optional. Two records that claim the same finding are rejected.

{
"schema_version": 1,
"suppressions": [
{
"policy_id": "bifrost.correctness.dynamic-evaluation",
"finding_id": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"path": "src/migrate.py",
"identity_stability": "strong",
"status": "accepted",
"reason": "This evaluator runs only a checked-in migration script",
"policy_hash_at_acceptance": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"accepted_by": "security-review",
"accepted_at": "2026-07-27",
"expires_at": "2026-10-27"
}
]
}
FieldRequiredValueLimit
schema_versionyes1
suppressionsyesarray of records512 records per file, and 512 across the merged files
policy_idyespolicy ID
finding_idyes64 lowercase hex digits
identity_stabilityyesstrong
statusyesaccepted
reasonyesnon-blank text4,096 bytes
accepted_atyesdate
pathnoworkspace-relative file the finding was reported in1,024 bytes
policy_hash_at_acceptanceno64 lowercase hex digits
accepted_bynonon-blank text256 bytes
expires_atnodate; the record stays active on this date and expires after it

A file is at most 256 KiB. policy_id and finding_id are the join key; path is never part of it. Record path so that a run can tell an orphaned record (orphan_state: orphaned, exit 1) from a record whose file the run did not analyze. The --suppressions-file path is at most 1,024 bytes. The review fields are listed in Review objects.

{
"schema_version": 1,
"scopes": [
{
"path": "fixtures/smells",
"reason": "Intentional smell corpus used as policy test fixtures.",
"exclude_roots": true
},
{
"path": "test",
"reason": "Test code is not performance-sensitive.",
"policy_categories": ["performance"]
}
]
}
FieldRequiredValueLimit
schema_versionyes1
scopesyesarray of entries256 entries
pathyesworkspace-relative directory1,024 bytes
reasonyesnon-blank text4,096 bytes
exclude_rootsnoBoolean, default false
policy_idsnonon-empty list of unique policy IDs64 values
policy_categoriesnonon-empty list of unique categories64 values

A file is at most 256 KiB. An entry with no policy_ids and no policy_categories applies to every policy. Otherwise it applies to a policy whose ID or category is listed. Categories exist only for built-in policies. path matches by whole path components: test covers test/a.py but not tests/a.py. Two entries may share a path only when their selectors differ. exclude_roots: true also removes matching files as analysis starting roots; taint, flow, and typestate policies cannot honor it and run unreliable.

{
"schema_version": 1,
"reason": "Bulk baseline acceptance of existing findings via --accept-current",
"accepted_at": "2026-10-01",
"policies": [
{
"policy_id": "bifrost.correctness.dynamic-evaluation",
"policy_hash_at_acceptance": "2000b90cff88f7a3f786ab9ad7e8e3e2f124345bfc84e08152200adb3c398edf",
"finding_ids": [
"1ea04d764dbb0855bd1e6b983ba46956db5f08ba789812b4ed43ea4b365f05ac"
]
}
]
}
FieldRequiredValueLimit
schema_versionyes1
reasonyesnon-blank text4,096 bytes
accepted_bynonon-blank text256 bytes
accepted_atyesdate
policiesyesarray of policy records
policies[].policy_idyespolicy ID
policies[].policy_hash_at_acceptanceno64 lowercase hex digits
policies[].finding_idsyesfinding IDs100,000 entries in the whole file

A file is at most 16 MiB. The --baseline-file path is at most 1,024 bytes.

--accept-current runs the selected policies and writes this file:

  • It records every current strong finding that no suppression or scope entry claims. Weak-identity findings are never written; their count is printed.
  • reason is always Bulk baseline acceptance of existing findings via --accept-current, and accepted_at is the evaluation date (--evaluation-date, or today’s UTC date).
  • It overwrites the target file. It writes .bifrost/baseline.json unless --baseline-file names another path.
  • It exits 0 after writing. An unreliable run writes nothing and exits 2.
  • It cannot be combined with --fail-on or --diff-base.