Skip to content

fix: accept UTF-8 BOM in SKILL.md frontmatter - #99

Merged
chrisknvidia merged 13 commits into
NVIDIA:mainfrom
mimran-khan:fix/utf8-bom-frontmatter
Sep 8, 2026
Merged

chrisknvidia merged 13 commits into
NVIDIA:mainfrom
mimran-khan:fix/utf8-bom-frontmatter

Conversation

@mimran-khan

Copy link
Copy Markdown
Contributor

Summary

A valid SKILL.md that only differs by a UTF-8 BOM failed schema with HIGH frontmatter_format, while the unicode check called that BOM benign.

I read manifests with utf-8-sig (same as plugin JSON) and allow an optional BOM before the opening ---. Fixes #91.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • Updated CHANGELOG.md

Schema read utf-8 and anchored frontmatter at ^---, so a Notepad BOM
made a valid skill fail HIGH while unicode called the same BOM benign.
Read utf-8-sig and allow an optional BOM before the opening fence.

Fixes NVIDIA#91

Signed-off-by: mimran-khan <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The focused parser/schema suites pass (46 tests), with Ruff and diff checks clean. One Tier 1 consumer still fails to parse the newly accepted BOM form, leaving inconsistent results; details are inline. The shared Gitleaks failure is unrelated branch history.

Schema already accepted a BOM-prefixed SKILL.md, but quality still
matched ^--- and skipped XML-tag checks. Read utf-8-sig and reuse the
shared FRONTMATTER_PATTERN.

Fixes NVIDIA#91

Signed-off-by: mimran-khan <[email protected]>
# Conflicts:
#	CHANGELOG.md
@mimran-khan

Copy link
Copy Markdown
Contributor Author

Merged main. BOM handling in the quality parser should be covered now. Ready for re-review.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the current head. BOM-prefixed frontmatter is now handled consistently by schema and quality parsing, so the original quality-gate mismatch is fixed. The focused frontmatter, schema, and quality suite passed (181 tests), with Ruff and diff checks clean. Approved. GitHub currently reports a CHANGELOG-only merge conflict, so the branch still needs an update before it can merge.

@mimran-khan

Copy link
Copy Markdown
Contributor Author

Pushed the security-scan BOM fix at c4e249d. Ready for re-review.

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Thanks for the update. The current DCO check is failing because these two commits do not contain Signed-off-by trailers:

  • c4e249d — fix: make security PII scan honor UTF-8 BOM frontmatter
  • 5ce9931 — docs: note security BOM handling in CHANGELOG

Please rewrite or amend both commits with your own Signed-off-by line, then force-push the updated branch using --force-with-lease. The DCO check and CI can rerun on the new head.

Read SKILL manifests with utf-8-sig and treat BOM-prefixed --- fences as valid
frontmatter so metadata.author emails are exempt in LF and CRLF files.

Signed-off-by: mimran-khan <[email protected]>
@mimran-khan
mimran-khan force-pushed the fix/utf8-bom-frontmatter branch from 5ce9931 to 1cf459b Compare September 3, 2026 10:27
@chrisknvidia
chrisknvidia merged commit 121261e into NVIDIA:main Sep 8, 2026
27 of 28 checks passed
mimran-khan added a commit to mimran-khan/SkillEvaluator that referenced this pull request Sep 9, 2026
mimran-khan added a commit to mimran-khan/SkillEvaluator that referenced this pull request Sep 9, 2026
Resolve CHANGELOG.md after merging upstream NVIDIA#99, NVIDIA#107, and NVIDIA#112.
rng1995 pushed a commit to mimran-khan/SkillEvaluator that referenced this pull request Sep 14, 2026
Resolve CHANGELOG.md after merging upstream NVIDIA#99, NVIDIA#107, and NVIDIA#112.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: UTF-8 BOM makes a valid SKILL.md fail schema while unicode calls the BOM benign

3 participants