Z612: FORBIDDEN_FRONTMATTER_KEY¶
-
Severity: Error
Penalty: 0.0 points | Category:
general -
Remediation & Opt-In
Auto-Fixable: No | Opt-In: No
Description¶
A YAML frontmatter key declared in [policies].forbidden_frontmatter_keys is present in this document.
The Policy-as-Code Engine allows project maintainers to enforce that specific metadata keys must not exist in published Markdown source files. This prevents internal draft flags, confidential tags, or deprecated metadata keys (e.g. draft, internal_notes, temp_notes) from leaking into published documentation.
Z612 is emitted once per forbidden key per file.
How to Fix¶
Remove the forbidden key from the YAML frontmatter block at the top of the file:
Before (non-compliant):
After (compliant):
Configuration¶
Z612 is opt-in and inactive by default. It is only emitted when [policies].forbidden_frontmatter_keys is declared in .zenzic.toml.
[policies]
# Markdown files must not declare these frontmatter keys.
forbidden_frontmatter_keys = ["draft", "internal_notes"]
When the list is empty or the [policies] section is absent, no Z612 findings are emitted.
Suppression¶
If a specific file intentionally carries a forbidden key (e.g. a tutorial example demonstrating draft flags), suppress the finding inline:
Or use [governance].per_file_ignores in .zenzic.toml:
Reference¶
See the Finding Codes Index for finding code details.