Skip to content

test - #69

Closed
natechadwick-intsof wants to merge 1 commit into
mainfrom
bugfix/xss-through-dom-inline-sanitizers
Closed

test#69
natechadwick-intsof wants to merge 1 commit into
mainfrom
bugfix/xss-through-dom-inline-sanitizers

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

test

9 open js/xss-through-dom alerts on delivery/common/js/views/Perc*View.js
href / window.location sinks closed by inlining the URL scheme sanitizer
at the sink, instead of relying on the in-repo percSafeUrl() helper.

PRs #60 and #62 added the helper, but .github/workflows/codeql.yml
explicitly notes that GHA rejects local model-pack paths in the
workflow packs: input, so GHAS does not model the in-repo helper as a
sanitizer barrier. PR #62 acknowledged this and shipped sink-line
// codeql[rule-id] suppressions; this PR replaces the helper with an
inline /^\\s*(?:javascript|vbscript|data)\\s*:/i regex test that
GHAS recognizes as a URL prefix guard at the taint boundary.

Changes:
- delivery/common/js/views/PercBlogPostView.js: drop percSafeUrl
  helper; inline regex test before .attr("href", href) at both the
  tag (#716) and category (#717) sinks.
- delivery/common/js/views/PercArchiveListView.js: drop percSafeUrl
  helper; inline regex test before the hierarchical year (#709),
  hierarchical month (#710), and flat-list month (#711) sinks.
- delivery/common/js/views/PercCategoryListView.js: drop percSafeUrl
  helper; inline regex test (as a ternary to keep the jQuery chain
  intact) at the parseNode href sink (#712).
- delivery/common/js/views/PercRegistrationView.js: drop percSafeUrl
  helper; inline regex test on both window.location sinks
  (confirmation-page redirect #714, rvkey redirect #713); fallback
  to "/" since the original helper returned that for invalid schemes.
- delivery/common/js/views/PercTagListView.js: drop percSafeUrl
  helper; inline regex test before .attr("href", href) at the tag
  sink (#718).
- docs/ai-generated/tasks/8.1.x-codeql-baseline/suppressions.md:
  drop the 9 js/xss-through-dom rows for the alerts being fixed
  (#709-#714, #716-#718) plus 3 stale rows for the alerts PR #62
  already closed (#707, #708, #715). The corresponding
  // codeql[js/xss-through-dom] sink-line markers are gone from the
  source, so the verify-suppressions.py greps would otherwise fail.
- docs/ai-generated/tasks/8.1.x-codeql-baseline/triage.md: keep the
  9 rows (alerts are still open in alerts.md until the next GHAS
  scan dismisses them) but update notes to describe the actual code
  fix and the post-fix line numbers; row count still matches
  alerts.md so verify-triage-inventory.py stays green.
- docs/ai-generated/tasks/8.1.x-codeql-baseline/clusters.md: cluster
  row updated to point at this PR and note the inlined sanitizer
  pattern; per-alert line numbers refreshed.

Verification:
  - node --check on each modified file                syntax OK
  - python3 scripts/verify-suppressions.py            PASS
  - python3 scripts/verify-triage-inventory.py        PASS (9 == 9)
  - python3 scripts/verify-valid-fixes.py             PASS

JDK 1.8.0 compatible (JS only). No CHANGELOG.md entry per AGENTS.md.
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