Passa al contenuto principale

Finding Codes Reference

Every issue detected by Zenzic is tagged with a finding code that identifies its category. This page is the authoritative index of all codes, their severity levels, and what they mean for your exit code.

Severity vs. exit code

Severity describes the nature of the issue; the exit code determines whether zenzic check signals failure to the shell or CI system.

SeverityExit code impact
errorExit 1 (suppressible by --exit-zero)
warningExit 1 in --strict mode only
infoNever affects exit code — use --show-info to display
security_breachExit 2 — never suppressible
security_incidentExit 3 — never suppressible

CodeSeverityCLIMeaning
FILE_NOT_FOUNDerrorcheck linksA relative link target does not exist on disk
ANCHOR_NOT_FOUNDerrorcheck linksThe #heading-anchor in a link does not exist in the target file
EXTERNAL_BROKENerrorcheck links --strictAn HTTP HEAD/GET request to an external URL returned a non-2xx/3xx status
CIRCULAR_LINKinfocheck linksThe resolved link target is part of a detected link cycle
PATH_TRAVERSALerrorcheck linksA link resolves outside the docs/ directory
PATH_TRAVERSAL_SUSPICIOUSsecurity_incidentcheck linksA link resolves to a known OS system path (/etc/, /root/, etc.) — triggers Exit 3 (Blood Sentinel)

Orphan Check

CodeSeverityCLIMeaning
ORPHANwarningcheck orphansA .md file exists on disk but is not listed in the site navigation

Snippet Check

CodeSeverityCLIMeaning
SNIPPETerrorcheck snippetsA fenced code block with a checkable language tag (python, yaml, json, toml) contains a syntax error

Placeholder Check

CodeSeverityCLIMeaning
short-contentwarningcheck placeholdersPage word count is below placeholder_max_words (default: 50)
placeholder-textwarningcheck placeholdersPage contains a pattern from placeholder_patterns (e.g. TODO, WIP, Draft)

Asset Check

CodeSeverityCLIMeaning
ASSETwarningcheck assetsAn image or media file in docs/ is not referenced by any .md page

Reference Pipeline

CodeSeverityCLIMeaning
DANGLING_REFerrorcheck referencesA [text][id] usage references an ID that has no definition in the file
DEAD_DEFwarningcheck referencesA [id]: url definition exists but is never used in the file
DUPLICATE_DEFwarningcheck referencesThe same reference ID is defined twice; the first definition wins (CommonMark §4.7)
MISSING_ALTwarningcheck referencesAn image (![](url)) has a blank or absent alt-text attribute

Shield (Credential Detection)

Shield findings always produce Exit 2. They are never suppressible.

CodePattern familyExample prefix
openai-api-keyOpenAI API keysk-…
github-tokenGitHub personal / OAuth tokengh[pousr]_…
aws-access-keyAWS IAM access key IDAKIA…
stripe-live-keyStripe live secret keysk_live_…
slack-tokenSlack bot / user / app tokenxox[baprs]-…
google-api-keyGoogle Cloud / Maps API keyAIza…
private-keyPEM private key header-----BEGIN … PRIVATE KEY-----
hex-encoded-payloadHex-encoded byte sequence\xNN\xNN\xNN… (3 or more consecutive hex escapes)
gitlab-patGitLab Personal Access Tokenglpat-…

Directory Index Integrity

CodeSeverityCLIMeaning
MISSING_DIRECTORY_INDEXinfocheck all --show-infoA directory contains Markdown source files but no engine-provided landing page — the directory URL may return a 404

What triggers this finding?

MISSING_DIRECTORY_INDEX is emitted when find_missing_directory_indices() discovers a subdirectory under docs/ that satisfies both conditions:

  1. Contains at least one .md or .mdx source file — the directory is part of the live documentation.
  2. Does not provide an index page as recognised by the active adapter's provides_index() method.

The check is engine-aware: each adapter knows what constitutes a directory landing page for its build engine:

EngineWhat counts as an index
Docusaurusindex.md, index.mdx, README.md, README.mdx, or _category_.json with "link": {"type": "generated-index"}
MkDocsindex.md or README.md
Zensicalindex.md
Vanillaindex.md

Why severity info?

A missing directory index is not always a hard error. Some sites intentionally omit a docs/ root index, or use the build engine's default category page rather than a hand-authored one. info severity means:

  • Never blocks CI — the finding does not contribute to Exit 1.
  • Never affects the quality score.
  • Visible on demand — use --show-info to see these signals during development.

How to fix

Create an appropriate index file in the reported directory:

# Docusaurus: an MDX index page at docs/my-section/index.mdx
touch docs/my-section/index.mdx

# MkDocs / Zensical: a standard index
echo "# My Section" > docs/my-section/index.md

Alternatively, for Docusaurus, add a _category_.json with a generated index:

{
"label": "My Section",
"position": 3,
"link": {
"type": "generated-index",
"description": "Overview of everything in this section."
}
}

Rule Engine (Custom Rules)

CodeSeverityCLIMeaning
User-defined rule ID (e.g. NO_DRAFT)Configured in [[custom_rules]]check allA line matched a user-defined regex pattern
Z009errorcheck allA worker process exceeded the 30-second per-file timeout — likely caused by catastrophic backtracking in a [[custom_rules]] regex pattern
RULE-ENGINE-ERRORerrorcheck allA worker process raised an unexpected exception