Skip to content

feat(metadata): SAML metadata decoder with health checks#107

Merged
kellenmurphy merged 5 commits into
mainfrom
feat/saml-metadata
Jun 7, 2026
Merged

feat(metadata): SAML metadata decoder with health checks#107
kellenmurphy merged 5 commits into
mainfrom
feat/saml-metadata

Conversation

@kellenmurphy

@kellenmurphy kellenmurphy commented Jun 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

Add a third decode path alongside SAML messages and JWTs: paste an
EntityDescriptor (or a single entity from an EntitiesDescriptor aggregate)
and get a structured, annotated view.

- metadata.ts: pure-DOM parser for entity ID, roles (IdP/SP), certs,
  SSO/SLO/ACS endpoints, NameID formats, shibmd:Scope, requested
  attributes, MDUI, organization, contacts, registration authority, and
  entity categories. Reuses cert.ts and the attribute registry.
- metadata-checks.ts: static health checks detectable from one document —
  validUntil expiry, weak (SHA-1) signature algorithm, PEM-armored certs,
  missing signing certs, plaintext endpoints, entityID hygiene, misspelled
  category URIs, and legacy SAML 1.x. Signature presence is reported
  independently (signed/unsigned) and is explicitly NOT verified.
- Colour-coded, spec-linked entity-category badges with pattern-based
  classification for the long tail; binding labels incl. legacy bindings.
- +page.svelte: detection routing, health-checks panel, signature status
  row, and a full metadata results panel; EntityDescriptor added to the
  input placeholder and two metadata examples to the Examples menu.
- 100% test coverage across the new modules.
Read the package version at build time (kit.version.name) and show it
between the Security and Source links in the footer, linking to the
matching GitHub release tag. release-please bumps package.json on each
release, so this updates automatically with every deploy.
Comment thread src/lib/metadata.ts Fixed
CodeQL flagged the prolog/comment-skipping regex (js/redos): the
(?:<!--[\s\S]*?-->\s*)* group backtracks exponentially on inputs starting
with "<!--" and containing many "--><!--" repetitions.

Replace the single regex with a linear index-based scan that skips an
optional BOM, XML prolog, and any leading comments, then matches only the
first-element name with a simple anchored regex (no nested quantifiers).
Adds a ReDoS payload test plus BOM and unterminated-prolog/comment cases.
The pinned v6.0.0 action fails at the Codecov CLI GPG signature step
("no valid OpenPGP data found" / "Can't check signature: No public key"),
blocking the Build & Test job. Per the v7.0.0 release notes, Codecov's old
`codecovsecurity` keybase account had key-migration issues and was deleted
in favour of `codecovsecops`; v7.0.0 fetches the GPG key from the working
account. (v6.0.2 is the same commit, published as a non-major copy.)
@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy
kellenmurphy merged commit 74566bd into main Jun 7, 2026
12 checks passed
@kellenmurphy
kellenmurphy deleted the feat/saml-metadata branch June 7, 2026 18:42
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.

2 participants