Output Formats
xgrep emits human-readable text, Semgrep-compatible JSON, SARIF 2.1.0, a GitLab SAST report, or a CycloneDX 1.6 CBOM.
Text (default)
src/app.py:10:my-rule: Avoid using eval()JSON
xgrep -f rules.yaml --json src/JSON output is a Semgrep-compatible ScanReport with a results array. Each result
carries check_id, path, start/end positions (each with line, col, and
byte offset), and an extra object with a short human-readable title
(schema_version 1.7), the full message, severity (INFO, WARNING, ERROR — the
Semgrep-compatible names, kept stable for machine consumers), a promoted
confidence (HIGH/MEDIUM/LOW, schema_version 1.7), captured metavars, rule
metadata (CWE, OWASP, …), and the matched lines. xgrep additionally includes
always-on context and remediation guidance per finding, plus a structured
fix_info (concrete replacement edits and/or remediation hint) whenever the
rule can offer one. A finding in a test, spec, fixture, example or docs path
carries extra.scope: "test" (schema_version 1.16) — in practice a secret, since
production scope drops the other categories there — and
production findings carry no scope at all.
Add --with-overview to prepend a code-graph summary of the scanned tree to
the report (schema_version 1.1).
Human output (the terminal summary and the plain-text format) shows severity on the security-standard ladder — CRITICAL / HIGH / MEDIUM / LOW — while the JSON
results[].extra.severity, SARIFlevel, and GitLab/LSP mappings keep their respective machine vocabularies. The two rank 1:1 (ERROR≡HIGH, WARNING≡MEDIUM, INFO≡LOW), and--severity/--max-severityaccept either.
Run summary (run)
A --json report also carries a top-level run object (schema_version 1.6) — a
machine-readable statement of what the scan did, distinct from the per-finding
results. It lets an automated caller tell "scanned and uploaded N findings to
<scope>" apart from "scanned but uploaded nothing" without inferring from the
exit code:
"run": {
"target": "https://github.com/acme/app",
"scan": {
"categories": ["secrets", "security"], "code": true, "dependencies": true,
"files_skipped_out_of_scope": 12, "cross_file": true
},
"repository": { "url": "…", "branch": "main", "revision": "9f2c…", "on_default_branch": true },
"findings": {
"total": 42,
"by_category": { "security": 30, "secrets": 12 },
"by_severity": { "CRITICAL": 2, "HIGH": 18, "MEDIUM": 15, "LOW": 7 }
},
"upload": {
"requested": true, "performed": true, "skip_reason": "",
"scope_mrn": "//…/spaces/…", "asset": "acme/app",
"findings_uploaded": 42, "findings_total": 42, "truncated": false,
"dep_vex_uploaded": 3
},
"dependencies": {
"requested": true, "performed": true, "skip_reason": "",
"packages_submitted": 20, "packages_correlated": 6,
"packages_uncorrelatable": 0, "advisories": 9,
"ecosystems": [
{ "name": "maven", "submitted": 9, "correlated": 2 },
{ "name": "npm", "submitted": 11, "correlated": 4 }
]
}
}scan.files_skipped_out_of_scope (schema_version 1.10) is how many files
production scope kept the security and correctness rules
from running on — test, spec, fixture, example, and docs paths. It is a file
count, not a finding count: those rules are skipped before they are evaluated, so
the findings they would have produced were never computed. Those files were still
read and secrets-scanned. The field is omitted when nothing was skipped (and
under --include-tests, which turns production scope off), so its presence always
means the scan covered less than the path you pointed at.
upload.performed reports whether findings actually reached Mondoo Platform, and
upload.skip_reason explains a non-upload — one of incognito, no-credentials,
not-default-branch, diff-aware, archive, org-scope, error,
asset-unresolvable, or asset-unconfirmed (empty when performed).
The last two are about the asset the findings attach to. Mondoo Platform accepts an upload before it creates the asset, and the upload response does not say whether it did, so xgrep checks the repository identity itself:
asset-unresolvable— the git remote does not name a host, owner and repository (for example a local-path remote), so no asset can be created from it. Nothing is sent.asset-unconfirmed— the findings were sent (findings_uploadedcounts them), but the repository is on a host Mondoo Platform is not known to create repository assets for: anything other thangithub.comandgitlab.com, such as GitHub Enterprise Server, GitHub Enterprise Cloud with data residency (*.ghe.com), self-hosted GitLab, or Bitbucket. They may not appear in the space. xgrep prints a warning instead of the "Reported" check mark, and--require-uploadexits 3.
truncated is true when
the upload cap kept only the highest-severity findings (findings_uploaded < findings_total). The run object is emitted for the batch --json report only
(not --stream); the human formats omit it.
Cross-file analysis (run.cross_file)
cross_file (schema_version 1.23) reports whether cross-file analysis ran. It
finds flows whose source and sink are in different files, and it runs only under
--graph (or --with-overview, which implies it), or when a rule pack passed
with -f contains a cross-file rule and --no-graph was not given
(details):
This example shows a scan where the pass was skipped (a different scan from the
successful run example above, whose scan.cross_file is true):
"cross_file": { "requested": true, "performed": false, "skip_reason": "memory-limit" }performedis whether the pass actually ran.scan.cross_filecarries the same value.skip_reasonexplains aperformed: false:disabled(not requested: the default scan,--no-graph, or--no-code-scan),too-many-files(the scan has more files thanXGREP_MAX_GRAPH_FILES),graph-too-large(the code graph exceedsXGREP_MAX_CROSSFILE_NODES),memory-limit(the scan reached its memory limit before the pass started), orindex-error(building the code definition index failed, so the pass could not run). It is omitted whenperformedistrue.
A requested pass that did not run is also a warning in errors, which SARIF
renders as a tool notification and --strict turns into exit code 4. The console
lists it under "Coverage may be incomplete". Without these, a --graph scan whose
pass was skipped reads exactly like one that ran and found no cross-file flow.
The same holds for cross-file rules from a -f pack that ran under --no-graph:
run.cross_file reports disabled, and a warning in errors names the rules
whose cross-file findings were not looked for.
Dependency coverage (run.dependencies)
dependencies (schema_version 1.11) reports what the dependency pass did, so an
empty dependency result can be read correctly. Without it, "no dependency
findings" has three indistinguishable meanings: nothing vulnerable, the pass never
ran, or the advisory service returned nothing for the packages asked about.
performedis whether the pass actually ran — packages submitted and a response received.scan.dependenciescarries the same value.skip_reasonexplains aperformed: false:disabled(--no-dep-scan),no-manifests,sbom-error,no-credentials,invalid-credentials(the service account cannot be loaded, or the platform rejected it),permission-denied(the service account may not look up vulnerabilities in the space),org-scope(the service account is organization-scoped, and a vulnerability lookup needs a space — pass--scope-mrn //…/spaces/<id>to choose one; the platform is not contacted), orerror. A platform that rejects the credentials (HTTP 401) is reported asinvalid-credentialsand a permission refusal (HTTP 403) aspermission-denied; earlier releases reported both aserror, and an organization-scoped account aserrorwith the platform's rawmissing spacemessage.packages_submittedandpackages_correlatedare how many packages were sent for matching and how many of them at least one returned advisory landed on.packages_uncorrelatablecounts packages carrying no package URL. Matching is package-URL-based, so these can never match, whatever the advisory data holds — a different fact from "no advisory matched".ecosystemsrepeats the split per package-URL type. This is the row to read when a result looks short:{"name": "maven", "submitted": 9, "correlated": 0}says nine maven packages were asked about and nothing came back for any of them, which is not the same statement as "these nine packages are fine".
The counts are descriptive. A clean project correlates zero packages, and xgrep does not editorialise: it reports the question it asked and the answer it got.
Incomplete file coverage (paths.partial, paths.timed_out)
paths.scanned lists every file the scan read. Two of them can be read without
being fully analysed, because the per-file --timeout bounds how long any one
file may take, and paths names both cases (schema_version 1.13):
{
"paths": {
"scanned": ["src/app.js", "vendor/bundle.js", "src/big.java"],
"partial": [
{ "path": "src/big.java", "stopped_at_rule": "java-sql-injection", "rules_skipped": 326 }
],
"timed_out": ["vendor/bundle.js"]
}
}partial— the file's deadline expired part-way through the rule list, so the rules after that point never ran on it. Its findings are real; there are just fewer rules behind them.stopped_at_ruleis the rule being evaluated when the deadline hit andrules_skippedis how many never ran, which is the difference between a file that lost one rule and one that lost three hundred.timed_out— the file's findings were discarded. Evaluation did not stop when asked, so the whole file's results were given up and nothing was reported for it.
Both are omitted when a scan loses no coverage, so their presence always
means some of the report is incomplete. A file in either list stays in scanned
— it was read, and scanned keeps meaning "what xgrep read" — so read these two
as the caveats on it. Each affected file also gets a warning in errors
naming what was lost.
Read them whenever an empty or shrunken result matters. Without them, a file
whose results were thrown away is indistinguishable from a clean one, and a
before/after comparison of two scans can differ purely because a large file
truncated in one run and not the other. Comparing scans is the case that needs
this most: exclude the files these two lists name, and what remains is
comparable. Raise --timeout (or --timeout 0 to disable it) to shrink both
lists.
A partial entry can also carry a reason (schema_version 1.17). One reason is
tree-too-deep: the file's syntax tree nests more than 10,000 levels
deep, which is far deeper than real source code and is typically a crafted or
machine-generated file (thousands of nested parentheses, for example). xgrep
does not run its code rules on such a file, because analysing a tree that deep
could exhaust the process's stack. The file is still read and scanned for
credentials. Its entry has rules_skipped (how many code rules did not run) and
no stopped_at_rule, and no --timeout value changes it:
{ "path": "deep.ps1", "rules_skipped": 30, "reason": "tree-too-deep" }A second reason is parse-budget (schema_version 1.18): parsing the file was
stopped before it finished. Every parse has a time budget (15 seconds plus 10
seconds per MiB of input) and a memory budget, and it also stops when the
file's --timeout deadline passes. Real source parses far inside both budgets;
a file that exhausts them is typically crafted to make the parser's error
recovery slow, such as thousands of commands chained into a pipeline that ends
in a dangling |. xgrep does not run its code rules on such a file. It still
scans it for credentials, unless the file's deadline is what stopped the
parse. The entry has rules_skipped and no stopped_at_rule:
{ "path": "pipeline.sh", "rules_skipped": 40, "reason": "parse-budget" }The third reason is panic (schema_version 1.19): scanning the file hit an
internal error in xgrep. The scan carries on with the other files, but every
finding for this file is discarded, from all rules, so treat the file as not
analysed. The entry has rules_skipped: 0 and no stopped_at_rule, because
xgrep cannot tell which rule failed, and its errors warning says the findings
were discarded. This is always an xgrep bug; please report it with the file (or
a reduced copy) that triggers it:
{ "path": "src/Repro.java", "rules_skipped": 0, "reason": "panic" }A fourth reason is parse-truncated (schema_version 1.20). It applies to
languages parsed by the pure-Go runtime (PowerShell, PHP, Perl, Lua, HTML, XML
and others). That parser has its own size limits, and some very large or
unusual files, such as big XML reports, reach them. When it stops at one, it
returns a syntax tree for only the first part of the file. xgrep still runs
the code rules on that part, and text-based rules still see the whole file,
but code past the cut is not analysed. The entry has rules_skipped 0:
{ "path": "report.xml", "rules_skipped": 0, "reason": "parse-truncated" }A fifth reason is minified (schema_version 1.21). It marks a file that
looked minified, so xgrep ran only its credential rules on it, although it
does not look like a build bundle. xgrep skips the code rules on minified files by default, because
code patterns matched against minified source are unreliable. A real bundle
is expected to be skipped: a file named *.min.* or *.bundle.*, a chunk or
content-hashed file, or one under dist/, build/, out/, a vendor or
dependency directory (such as vendor/ or node_modules/) or a web-static
root (such as static/ or public/). Such files are counted but not listed.
A source file outside those places that reads as minified is unusual, and it
can be hand-written code padded until it looks minified, so it is listed.
--include-minified scans every such file in full:
{ "path": "src/util.c", "rules_skipped": 86, "reason": "minified" }Every file the gate skipped, listed or not, is counted in a warning in
errors and in the end-of-scan summary on stderr. Under
--exclude-minified-files, which leaves minified files out entirely at your
request, nothing is counted or listed.
An entry without a reason is a deadline-truncated file, as described above.
Coverage lost to the memory budget (paths.memory_aborted, paths.memory_skipped)
--max-memory is a bound on the whole process, and it is kept by giving up
coverage, which the report names (schema_version 1.15):
{
"paths": {
"scanned": ["src/app.js", "src/Generated.java"],
"memory_aborted": ["src/Generated.java"],
"memory_skipped": ["src/Other.java"]
}
}memory_aborted— the file was being scanned when the process neared its budget, and its scan was cancelled to bring memory back down. Likepartial, its findings up to that point are real and it stays inscanned.memory_skipped— the scan was stopped before this file was started. Likeunreadable, it was never analysed, so it is not inscanned, anderrorscarries anerror-level entry saying the report is partial.
Both are omitted when the budget cut nothing. Raise --max-memory, or exclude
the files memory_aborted names, to shrink them.
Findings you cannot vouch for (paths.degraded)
A parser does not refuse a file it cannot read. Given input the grammar does not
accept, it recovers — filling the gaps with error markers and carrying on — so a
tree always comes back and a scan of a file xgrep only partly understood looks
exactly like a scan of one it read perfectly. paths.degraded names those files
(schema_version 1.14):
{
"paths": {
"scanned": ["src/app.js", "kernel/sched.c"],
"degraded": [{ "path": "kernel/sched.c", "lang": "c" }]
}
}These files stay in scanned, because they were read. This is not a gap in
coverage like partial or timed_out — it is a caveat on the findings
themselves: they are real matches against a recovered structure, which can
differ from the one the source actually has. That cuts both ways. A recovered
tree can hide a construct, so a real bug goes unreported; it can equally put a
name somewhere the source never did, so a finding appears with no counterpart in
the program.
lang is the first thing to look at. One file degrading points at that file —
usually a genuine syntax error, or a dialect the grammar does not model. A whole
language degrading at once points at the grammar, or at a preprocessor the parser
cannot see through: heavily macro-driven C is the common case, and on a large
kernel tree the majority of .c files land here.
The list is omitted when every file parsed cleanly, and it is capped, with
the accompanying errors entry stating the exact total when there are more. A
--verbose run prints the same count broken down by language.
Read it before treating a scan as authoritative, and before comparing two scans against each other — a tool that could not read its input has not scored zero, it has not scored at all. Findings on these paths are best treated as needing a human look rather than as confirmed either way.
Per-rule finding volume (rule_findings)
A --json report also carries a top-level rule_findings array (schema_version
1.8): for every rule that produced at least one finding, how many findings it made
(count) and across how many distinct files (files_hit), sorted highest-count
first. It is a compact per-rule volume rollup for spotting a single rule that
dominates a scan's output, without walking the full results array:
"rule_findings": [
{ "id": "java-path-traversal-http-request", "count": 27, "files_hit": 9 },
{ "id": "generic-hardcoded-secret", "count": 3, "files_hit": 2 }
]Every code-scan finding is counted once, including any later downgraded by
severity or confidence. Suppressed (ignored) findings and
dependency-vulnerability (SCA) findings are excluded — the rollup ranks code-scan
rules, not advisories. The array is emitted for the batch --json report only
(not --stream) and is omitted when no code-scan rule fired.
Original source positions for bundled code (original_location)
A finding in a bundled or minified JavaScript file is reported at a position
nobody can act on — main.a1b2.js:1:48022 names a column in a file that is
never edited. When the scanned file carries a source map, xgrep adds the
position in the code the bundle was built from:
dist/main.js:1:489: AWS access key ID
[aws-access-key-id] (MEDIUM) confidence: HIGH
original: src/routes/user.ts:8:23 (via dist/main.js.map)
| const accessKeyId = "AKIAQYLPMN5HXTB3CDEF";
> AKIAQYLPMN5HXTB3CDEFand, in --json, an original_location object on the finding (schema_version
1.12):
"original_location": {
"path": "src/routes/user.ts", // resolved against the map's directory
"source": "../src/routes/user.ts", // exactly what the map declares
"line": 8,
"col": 23,
"name": "accessKeyId", // the identifier before minification
"snippet": "const accessKeyId = \"AKIA…\";",
"source_map": "dist/main.js.map" // or "inline" for a data: URL
}This is an addition, never a replacement. path, start and end keep
naming the generated file: they are what the byte offsets, the matched lines
excerpt and any fix contract refer to, and a source map maps single positions
rather than ranges, so it cannot re-describe a span.
The map is found the way a browser finds it: a trailing //# sourceMappingURL=
comment (the legacy //@ and the /*# … */ forms are read too) naming a path
relative to the bundle, a data:application/json;base64,… URL carrying the map
inline, or — when the file declares nothing — a <file>.map sitting beside it.
snippet and name come from the map's own sourcesContent and names; the
original file is never read from disk, so the excerpt is always the revision
that was actually built.
Three things it deliberately does not do:
- A remote
sourceMappingURLis not fetched. A map named by anhttp(s)URL is a build artifact that belongs beside the bundle; a scanner does not make network requests on the say-so of the file it is scanning. - An absolute
sourceMappingURLis not followed. It is a path from the machine that produced the build, so on yours it names a different file. - A section of an index map that names its map by URL is not read. The
sectionsform itself IS composed — see below — but a section that points at a map to fetch rather than carrying one is refused, for the same reason a remotesourceMappingURLis.
Whenever a map is absent, unreadable, or simply does not cover the finding's
position — maps are sparse, and generated runtime glue maps to nothing at all —
the finding is reported exactly as before, with no original_location. Nothing
is guessed. Run with --verbose to see, per file, how many findings were
offered to the map, how many resolved, and why the rest did not.
Both map shapes are read: the ordinary one, and the index map (sections)
that describes one output file as a series of offset sub-maps. Every mapping
form a bundler writes in practice has been checked against real output from
esbuild, rollup, webpack and a rollup→terser chain, and against the decoder the
rest of the JavaScript ecosystem reads maps with, over several hundred published
.map files.
The reported source is the map's own string. For a bundle it is usually
relative to the map (../src/routes/user.ts) and sometimes a generator's URL
(webpack://app/src/user.js); sourceRoot is applied and ./.. inside the
result resolve, matching what a browser or a stack-trace service shows for the
same position. path is the best-effort resolution of that against the
directory the map was read from, and is empty when the source is a pseudo-URL or
an absolute path from the build machine — cases where no honest local path
exists.
A bundle that carries a source map is scanned by default, which is what makes this remap reachable on a deployed front end without any flag — a vendored library's bundle stays skipped even though it ships a map of its own. See File filtering for the full rule and the flags that override it.
Streaming JSON (NDJSON)
xgrep -f rules.yaml --json --stream src/--stream turns --json into newline-delimited JSON (NDJSON), emitted as each
file is scanned rather than as one document at the end — so editors and tools can
render findings while the scan is still running. Each line is a typed envelope:
{"type":"finding","check_id":"…","path":"a.py","start":{…},"extra":{…}}
{"type":"finding","check_id":"…","path":"b.py","start":{…},"extra":{…}}
{"type":"summary","findings":2,"files":2,"errors":0}A finding line carries the same fields as an element of the batch results
array, plus a type discriminator. The single trailing summary line closes the
stream. Findings are emitted in file-completion order (not path-sorted), already
deduplicated and production-scope-filtered per file, so the streamed set matches
the batch report.
When some files did not parse cleanly, the summary line also carries the
paths.degraded caveat, so a
stream consumer can tell those findings apart just as a batch consumer can:
{
"type": "summary",
"findings": 4,
"files": 2,
"errors": 1,
"degraded": [{ "path": "cut.js", "lang": "javascript" }],
"degraded_total": 1,
}degraded is capped like the batch list; degraded_total is the exact count.
Both are omitted when every file parsed cleanly. --stream requires --json and cannot be combined with
--sarif/--gitlab, --validate, --baseline-commit, --history, or
--with-overview.
Consuming findings (light-mode & agent integrations)
A finding already carries everything an integration needs to render actionable output with no LLM in the loop — a review comment, a ranked triage entry, or a GitHub ```suggestion block. The fields most consumers under-read:
| You want… | Read this field | Notes |
|---|---|---|
| A short header | extra.title | Curated per rule; distinct from the machine check_id and the paragraph message. |
| The problem / "why" | extra.message | Full explanation. |
| The fix guidance ("how") | extra.fix_info.hint | Prose remediation; present whenever the rule offers remediation. |
| A ```suggestion-ready patch | extra.fix_info.patch | Whole-line unified diff, present for deterministic fixes (ADR-0435). Render a suggestion straight from it — no byte→line conversion. See "GitHub suggestions" below. |
| A concrete replacement | extra.fix / extra.fix_info.edits[] | edits[] carry start_byte/end_byte (+ line/col) and a replacement string (the replacement for that byte span — may be a partial line). Prefer fix_info.patch for suggestions; edits[] are for SARIF/LSP. Present only for rules with an authored fix:/fix-regex:. |
| The exact span to rewrite | start/end .col (and .offset) | Column-precise, so a suggestion can target the vulnerable expression, not the whole line. |
| Ranking / triage signal | extra.confidence, extra.severity | confidence is HIGH/MEDIUM/LOW; severity ranks 1:1 with the CRITICAL/HIGH/MEDIUM/LOW ladder. |
| Classification tags | extra.metadata.cwe, extra.metadata.owasp | Also category, likelihood, impact (a level, not prose), technology. |
| Taint source → sink | dataflow_trace | Source location, intermediate steps, and sink for taint-mode findings. |
Example (trimmed):
{
"check_id": "go-weak-hash",
"path": "crypto.go",
"start": { "line": 3, "col": 34, "offset": 71 },
"end": { "line": 3, "col": 45, "offset": 82 },
"extra": {
"title": "Weak hash",
"message": "Use of weak hash algorithm detected (MD5 or SHA-1) …",
"confidence": "HIGH",
"severity": "WARNING",
"fix_info": { "kind": "assisted", "hint": "Use crypto/sha256 or crypto/sha512 …" },
"metadata": { "cwe": ["CWE-328: Use of Weak Hash"], "owasp": ["A02:2021", "A04:2025"] },
},
}Not every finding carries a concrete extra.fix — only rules with an authored
fix:/fix-regex: template do (coverage is being widened; see ADR-0431). When
extra.fix is empty, fall back to title + message + fix_info.hint. Agents
that need to confirm a match or validate an authored fix in-sandbox can drive the
xgrep mcp server's read-only scan and
fix_verify tools rather than re-parsing output.
GitHub suggestions from a fix patch (ADR-0435)
Deterministic findings carry extra.fix_info.patch — a whole-line unified diff
already anchored to source lines, so a light-mode consumer renders a
```suggestion with no byte→line math of its own. The xgrep fix verify/apply
path emits the same tight patch (plus a wider, human-readable diff) on each
assisted (agent-authored) FixOutcome, with an explicit verified boolean
and the tier in kind.
Parse-free line ranges. Both surfaces also carry hunks — an array of
{start_line, end_line} (1-based, inclusive) giving the original lines each hunk
replaces, so you can anchor the suggestion without parsing the patch at all.
Use hunks[i] for the comment range and the patch's +/context lines for the
replacement text.
To turn one diff hunk into a suggestion:
- the range is
hunks[i](or, from the patch, the@@ -l,s +… @@header:l…l+s-1); - the replacement text is the hunk's
(context) and+lines with the one-character prefix stripped, in order (drop-lines); - anchor the review comment on that line range and emit the text verbatim inside a ```suggestion block.
A patch with exactly one hunk on one file (len(hunks) == 1) maps to a
single suggestion. More than one hunk, or a cross-file changeset
(FixOutcome.paths has >1 entry, ADR-0258), cannot be one suggestion — render
prose instead. A \ No newline at end of file marker means the replaced region
ends the file without a trailing newline; preserve that when applying.
SARIF
xgrep -f rules.yaml --sarif src/SARIF 2.1.0 output integrates with GitHub Code Scanning and other SARIF consumers. See CI integration.
Findings suppressed inline with a # nogrep / # nosemgrep directive are
omitted from SARIF by default. GitHub code scanning ignores the SARIF
result.suppressions array, so a suppressed finding would otherwise import as an
open alert — and a suppressed line that later moves can fail a pull-request check
as a "new" alert. When suppressed findings are present, xgrep prints a warning to
stderr noting they were omitted. To restore the old behavior and emit them with a
result.suppressions array (for consumers that honor it), pass
--sarif-include-suppressed. Other output formats (--json, text, --gitlab)
are unaffected: they always carry suppressed findings, marked is_ignored: true.
When a scan is narrowed by production scope, the run's
invocations[] entry carries the same file count as the JSON report, as the
property files-skipped-out-of-scope:
"invocations": [
{ "executionSuccessful": true, "properties": { "files-skipped-out-of-scope": 12 } }
]Like the JSON field, it counts files whose security/correctness rules did not
run, and it is absent when nothing was skipped. A result in a test, fixture,
example or docs path carries "scope": "test" in its properties, at its
unchanged level. The same invocations[] entry
carries a toolExecutionNotifications message per scan-level error (a parse
failure, a rule that would not load), so a partial or narrowed scan is never
indistinguishable from a clean full one.
GitLab SAST
xgrep -f rules.yaml --gitlab -o gl-sast-report.json src/GitLab's Vulnerability Report consumes its own Secure SAST format rather than
SARIF, so use --gitlab (not --sarif) for GitLab. The report maps each finding
to a GitLab vulnerability with a stable id (for cross-scan tracking), a
title-cased severity (Critical/High/Medium/Low), a line-based location, and
identifiers for the rule plus any CWE/OWASP metadata. Publish it as a
reports: sast: artifact in your GitLab CI job. See
CI integration.
CBOM (Cryptography Bill of Materials)
A CBOM is a bill of materials, so it is produced by the sbom
command rather than as a scan output format:
xgrep sbom --include cbom .This emits a CycloneDX 1.6
Cryptography Bill of Materials — a machine-readable inventory of the cryptographic
assets in your code (algorithms, key material, protocols, certificates), enriched
with OID, primitive, key size, and classical/post-quantum security levels. It is
detected by the scan engine but does not add noise to a normal xgrep scan. See
CBOM for the full guide: language/library coverage, the asset
and dependency-graph structure, and how to consume the document.
Reporting to Mondoo Platform
The formats above all write locally — to stdout or a file. xgrep additionally
uploads findings to Mondoo Platform whenever a Mondoo service account is configured
(via xgrep login
or a config file), where they attach to the scanned repository as an asset.
Reporting is automatic on the repository's default branch, additive (local output
is unchanged), and best-effort (a failed upload never fails the scan):
xgrep scan . # reports automatically when logged in (default branch only)
xgrep scan --incognito . # local only; upload nothingSee Mondoo Platform for credentials, asset/severity mapping, and CI usage.
Last updated on