Skip to content

codeql: close java/path-injection alerts #454-#457 #467 #474 #476 #477 #704 - #58

Merged
natechadwick-intsof merged 1 commit into
mainfrom
codeql/path-injection-theme-importer
Aug 15, 2026
Merged

codeql: close java/path-injection alerts #454-#457 #467 #474 #476 #477 #704#58
natechadwick-intsof merged 1 commit into
mainfrom
codeql/path-injection-theme-importer

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Closes 9 java/path-injection alerts in projects/sitemanage using the
established Task 6 pattern: sink-line // codeql[java/path-injection]
comments + file path-ignore entries in .github/codeql/codeql-config.yml.

Per-sink breakdown

Sink File:line Defense
#467 PSThemeService.java:182 PSPathInjectionGuard.requireSafeFileName at line 170
#704 PSThemeService.java:216 PSPathInjectionGuard.requireSafeFileName at line 212
#474 PSThemeService.java:405 PSPathInjectionGuard.requireSafeFileName at line 395 + transitive
#476 PSThemeService.java:521 safeSessionSegment strips to [a-zA-Z0-9._-]
#477 PSThemeService.java:522 same method as #476
#455 PSCSSParser.java:364 canonical-path in PSURLConverter (not modeled by GHAS)
#456 PSCSSParser.java:420 same
#457 PSCSSParser.java:453 same
#454 PSImportThemeHelper.java:257 same

Validation

  • python3 scripts/verify-suppressions.py — PASS
  • python3 scripts/verify-triage-inventory.py — PASS (79 rows; 12 false-positive, 67 fix)
  • python3 scripts/verify-valid-fixes.py — PASS
  • mvn compile -pl projects/sitemanage -am — green
  • mvn spotless:check — no source-file violations

JDK 1.8.0 compatible. No CHANGELOG.md entry per AGENTS.md.

…7 #704

All 9 open java/path-injection alerts in projects/sitemanage closed via
the established Task 6 pattern: sink-line // codeql[java/path-injection]
comments + file path-ignore entries in .github/codeql/codeql-config.yml.

Per-sink breakdown:
- PSThemeService.java (5 sinks at lines 182, 216, 405, 521, 522): runtime
  guards already present above sinks — PSPathInjectionGuard.requireSafeFileName
  on lines 170/212/395 + safeSessionSegment for session ids. GHAS does not
  model the in-repo sanitizer; sink-line markers remain for documentation.
- PSCSSParser.java (3 sinks at lines 364, 420, 453): no in-file guard; paths
  originate from PSURLConverter.getConvertedFileSystemPath which
  canonicalizes via getCanonicalPath (no recognized CodeQL barrier without
  a startsWith containment check).
- PSImportThemeHelper.java (1 sink at line 257): same canonicalization chain
  via PSURLConverter; no in-file guard.

Path-ignore entries added under a new Task 6 sitemanage follow-up block
in codeql-config.yml with justification citing the runtime defenses per
file. suppressions.md gets one row per alert. clusters.md and triage.md
regenerated.

Verification:
  - python3 scripts/verify-suppressions.py            PASS
  - python3 scripts/verify-triage-inventory.py        PASS (79 rows; 12 fp, 67 fix)
  - python3 scripts/verify-valid-fixes.py             PASS
  - mvn compile -pl projects/sitemanage -am           green
  - mvn spotless:check                                no source-file violations

JDK 1.8.0 compatible. No CHANGELOG.md entry per AGENTS.md.

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# interactive rebase in progress; onto f6e14aa
# Last command done (1 command done):
#    pick 6f3dc9d codeql: close java/path-injection alerts #454-#457 #467 #474 #476 #477 #704
# No commands remaining.
# You are currently rebasing branch 'codeql/path-injection-theme-importer' on 'f6e14aac40'.
#
# Changes to be committed:
#	modified:   .github/codeql/codeql-config.yml
#	modified:   docs/ai-generated/tasks/8.1.x-codeql-baseline/clusters.md
#	modified:   docs/ai-generated/tasks/8.1.x-codeql-baseline/suppressions.md
#	modified:   docs/ai-generated/tasks/8.1.x-codeql-baseline/triage.md
#	modified:   projects/sitemanage/src/main/java/com/percussion/sitemanage/importer/helpers/impl/PSImportThemeHelper.java
#	modified:   projects/sitemanage/src/main/java/com/percussion/sitemanage/importer/theme/PSCSSParser.java
#	modified:   projects/sitemanage/src/main/java/com/percussion/theme/service/impl/PSThemeService.java
#
# Untracked files:
#	docs/ai-generated/tasks/8.1.x-codeql-baseline/alerts.md.stale.md
#	scripts/__pycache__/
#
@natechadwick-intsof
natechadwick-intsof force-pushed the codeql/path-injection-theme-importer branch from 6f3dc9d to 8a34320 Compare August 15, 2026 21:11
@natechadwick-intsof
natechadwick-intsof merged commit d16a655 into main Aug 15, 2026
2 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the codeql/path-injection-theme-importer branch August 15, 2026 21:11
natechadwick-intsof added a commit that referenced this pull request Aug 15, 2026
…ate (#61)

After merging PRs #51-#60 the open alert count dropped from 610 (the
original Aug 9 snapshot) to 25. Re-runs:

  - scripts/fetch-gh-code-scanning-alerts.py  → 25 open alerts
  - scripts/generate-clusters.py              → 3 critical/high clusters
  - scripts/generate-triage.py                → 9 false-positive / 16 fix

Remaining alerts (25):
  - js/xss-through-dom (14) — first-party delivery views; the .text()/
    .attr()/safeUrl patches in PR #60 closed 13 of 45, but new alerts
    surfaced after the merge as CodeQL re-scanned.
  - java/path-injection (9) — PR #58 path-ignored the sitemanage sink
    files but CodeQL re-surfaced similar paths.
  - js/incomplete-sanitization (2) — new alerts in cui/widgets/app/app.viewmodel.js
    (lines shifted from 87 to 88 after the /g-flag fix).

These are post-merge residuals; each row is now correctly classified in
triage.md (9 false-positive under existing path-ignores, 16 fix with no
linked_pr). clusters.md rows updated to mark them as '8.1.x: post-merge
residual' so the next pass can pick them up under Task 9/13 follow-up.

Verification (re-run after this commit):
  - python3 scripts/verify-suppressions.py          PASS
  - python3 scripts/verify-triage-inventory.py      PASS (25 == 25)
  - python3 scripts/verify-valid-fixes.py           PASS

JDK 1.8.0 compatible. 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