Skip to content

JS-2368 S5332: False positive on http:// URLs used as schema/namespace identifiers (CycloneDX schema, SNOMED/SOAP/XMPP/ESCO namespaces) - #7854

Open
oleksandr-selehenenko-sonarsource wants to merge 1 commit into
masterfrom
sasha/JS-2368
Open

JS-2368 S5332: False positive on http:// URLs used as schema/namespace identifiers (CycloneDX schema, SNOMED/SOAP/XMPP/ESCO namespaces)#7854
oleksandr-selehenenko-sonarsource wants to merge 1 commit into
masterfrom
sasha/JS-2368

Conversation

@oleksandr-selehenenko-sonarsource

Copy link
Copy Markdown
Contributor

Summary

  • S5332 was flagging http:// URLs used purely as spec-mandated identifiers (JSON-Schema $schema, coding-system/namespace URIs) that are never dereferenced.
  • Extends the existing NAMESPACE_URI_AUTHORITIES allowlist (from JS-1877) with cyclonedx.org, snomed.info, adlnet.gov, jabber.org, etherx.jabber.org.
  • Refactored the allowlist check from a single alternation regex to a plain string array + exact-authority helper, avoiding a regex-complexity issue on the extended list.

Test plan

  • Added CycloneDX $schema and SNOMED coding-system reproducers, confirmed red before the fix, green after
  • Added subdomain-spoofing negative tests per new host (e.g. cyclonedx.org.evil.com) to prove exact-authority anchoring
  • Full S5332 suite green

Jira: JS-2368

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Sep 2, 2026

Copy link
Copy Markdown

JS-2368

@oleksandr-selehenenko-sonarsource oleksandr-selehenenko-sonarsource changed the title JS-2368 - S5332: False positive on http:// URLs used as schema/namespace identifiers (CycloneDX schema, SNOMED/SOAP/XMPP/ESCO namespaces) JS-2368 S5332: False positive on http:// URLs used as schema/namespace identifiers (CycloneDX schema, SNOMED/SOAP/XMPP/ESCO namespaces) Sep 2, 2026
@sonarqube-next

sonarqube-next Bot commented Sep 2, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Ruling Report

No changes to ruling expected issues in this PR

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.

1 participant