Skip to content

fix(codeql): path-injection #2039–#2044 PSConfigService config files - #4349

Closed
natechadwick-intsof wants to merge 2 commits into
mainfrom
fix/codeql-alert-2039-path-injection
Closed

natechadwick-intsof wants to merge 2 commits into
mainfrom
fix/codeql-alert-2039-path-injection

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Parent audit issue: #4348

Mitigates CodeQL java/path-injection alerts:

PSConfigService joined packageName under rxconfig/Packages/ without rejecting traversal and then called File.exists / FileInputStream. Runtime now requireSafeFileName(packageName) and requireUnderBase(PSServer.getRxDir(), …) via getConfigFile / requireConfigFileUnderRxDir before those sinks.

Disposition ladder: steps 1–4 (runtime + test, model pack barrier, sink-line // codeql[java/path-injection], path query-filter). Not dismiss-only. Analyzer of record: CodeQL Advanced. Default setup remains not-configured.

Test plan

  1. cd deployer && ../mvnw clean install (JDK 21)
  2. Confirm PSConfigServicePathInjectionTest (traversal rejected; child under RxDir)

Evidence

  • Command: cd deployer && ../mvnw clean install
  • BUILD SUCCESS
  • Tests run: 313, Failures: 0, Errors: 0, Skipped: 19
  • No new warnings attributable to this change (pre-existing raw-type / dependency:analyze noise only)

Checklist

  • Product documentation — N/A (not product-facing): internal path-injection hardening; no operator/UI/REST contract change
  • Unit / module tests — PSConfigServicePathInjectionTest; deployer standalone clean install green
  • WebUI + Playwright — N/A (no WebUI product screen change)
  • Build gates — deployer standalone mvnw clean install
  • Cross-platform — Path.resolve / PSPathInjectionGuard.requireUnderBase; no hardcoded OS separators

Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-security.

Contain package config files under RxDir via requireSafeFileName and
requireUnderBase before File.exists / FileInputStream. Parent audit #4348.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-security.
@natechadwick-intsof natechadwick-intsof added operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow model:grok-4.6 Session model grok-4.6 labels Sep 5, 2026
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

qa_deferred_quality — not assigning human QA (@vijaya-boddipudi). No QA issue created.

Not a candidate (A/B/C): CodeQL java/path-injection hardening in PSConfigService (alerts #2039–#2044). Internal security; no operator/UI/installer surface.

Q bar:

  • Q1: PASS (MERGEABLE, not draft)
  • Q2: FAIL — no independent APPROVE
  • Q3: FAIL — Analyze (java-kotlin) IN_PROGRESS; Kilo Code Review QUEUED
  • Q4: PASS (C1 deployer clean install in PR body)
  • Q5: N/A
  • Q6: N/A (not a UAT slice)
  • Q7: PASS
  • Q8: PASS (cycle verify passed)

Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-human-qa.

Comment thread deployer/src/main/java/com/percussion/rx/config/impl/PSConfigService.java Dismissed
Comment thread deployer/src/main/java/com/percussion/rx/config/impl/PSConfigService.java Dismissed
Comment thread deployer/src/main/java/com/percussion/rx/config/impl/PSConfigService.java Dismissed
PR #4349 already has runtime requireUnderBase, sink-line annotations,
query-filters, and tests. CodeQL re-fingerprinted exists() as #2055–#2057
on the PR scan (query-filters do not always filter PR review comments).

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

Superseded by #4352 — same-file thrash absorption; do not merge this PR.

Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-cluster.

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

Closed as fully absorbed into cluster PR #4352.

natechadwick-intsof added a commit that referenced this pull request Sep 6, 2026
* fix(codeql): path-injection #2039–#2044 PSConfigService config files

Contain package config files under RxDir via requireSafeFileName and
requireUnderBase before File.exists / FileInputStream. Parent audit #4348.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-security.

* fix(codeql): path-injection #2045 IOTools.getFileContent

Reject NUL paths, open the canonical file, and add getFileContentUnderBase
with requireUnderBase. Parent audit #4348.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-security.

* fix(codeql): path-injection #2046–#2050 object-store save files

Contain application save paths under RxDir via requireFileUnderRxDir
before exists/isFile/mkdirs. Parent audit #4348.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs-security.

* docs(codeql): record path-injection residual alerts #2055–#2057

PR #4349 already has runtime requireUnderBase, sink-line annotations,
query-filters, and tests. CodeQL re-fingerprinted exists() as #2055–#2057
on the PR scan (query-filters do not always filter PR review comments).

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs.

* docs(codeql): record path-injection residual alert #2054

PR #4350 already has NUL reject + getCanonicalFile, getFileContentUnderBase,
sink-line annotations, query-filters, and tests. CodeQL re-fingerprinted
FileInputStream as #2054 on the PR scan.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs.

* docs(codeql): record path-injection residual alerts #2058–#2062

PR #4351 already has requireFileUnderRxDir, sink-line annotations,
query-filters, and tests. CodeQL re-fingerprinted save File API as
#2058–#2062 on the PR scan.

> Co-Authored by Grok Build 1.0.13 using grok-4.6 with agent night-issue-prs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.6 Session model grok-4.6 operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants