Repository navigation
fix(codeql): path-injection #2039–#2044 PSConfigService config files - #4349
Closed
natechadwick-intsof wants to merge 2 commits into
Closed
natechadwick-intsof wants to merge 2 commits into
natechadwick-intsof wants to merge 2 commits into
Conversation
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.
Collaborator
Author
|
qa_deferred_quality — not assigning human QA (@vijaya-boddipudi). No QA issue created. Not a candidate (A/B/C): CodeQL Q bar:
|
1 task done
Collaborator
Author
|
Superseded by #4352 — same-file thrash absorption; do not merge this PR.
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Parent audit issue: #4348
Mitigates CodeQL java/path-injection alerts:
PSConfigServicejoinedpackageNameunderrxconfig/Packages/without rejecting traversal and then calledFile.exists/FileInputStream. Runtime nowrequireSafeFileName(packageName)andrequireUnderBase(PSServer.getRxDir(), …)viagetConfigFile/requireConfigFileUnderRxDirbefore 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 remainsnot-configured.Test plan
cd deployer && ../mvnw clean install(JDK 21)PSConfigServicePathInjectionTest(traversal rejected; child under RxDir)Evidence
cd deployer && ../mvnw clean installChecklist
PSConfigServicePathInjectionTest; deployer standalone clean install greenmvnw clean installPath.resolve/PSPathInjectionGuard.requireUnderBase; no hardcoded OS separators