Skip to content

Z202: PATH_TRAVERSAL

  • Severity: Error


    Penalty: 0.0 points | Category: general

  • Remediation & Opt-In


    Auto-Fixable: No | Opt-In: No


Rationale

This security rule is triggered when a relative link or asset reference uses parent directory traversal sequences (../) to escape the root boundary of the designated documentation workspace (docs_dir).


How to Fix

Inspect the flagged location in the Markdown file and update the content or configuration:

  • Failing Pattern (Triggers Z202)


    docs/example.md
    <!-- BAD: Traversal escaping the docs/ directory root -->
    Download [Internal Secret](../../../secrets/keys.json).
    
  • Passing Pattern (Resolves Z202)


    docs/example.md
    <!-- GOOD: Target file resides inside designated docs/ workspace -->
    Download [Public Keys](../assets/public-keys.json).
    

Configuration

.zenzic.toml
# Workspace boundary enforced by docs_dir setting in .zenzic.toml
docs_dir = "docs"

Reference

See the Finding Codes Index for finding code details.