Skip to content

Fix high-severity CodeQL alerts - #169

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:codeql-high-fixes
Sep 18, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:codeql-high-fixes

Conversation

@vharseko

Copy link
Copy Markdown
Member

Fixes four of the six open high code scanning alerts.

Alert Rule Location Change
#1 java/insufficient-key-size JwtSessionManager.java Temporary RSA key pair (used when no keystore is configured) is now generated with 2048 bits instead of 1024.
#3 java/zipslip UiAdminHttpApplication.java Extraction of openig-ui.jar moved into unpackJar(InputStream, File); an entry whose canonical path resolves outside the unpack directory now fails with IOException.
#5 java/sensitive-log TypoglycemiaDetector.java False positive on variable name: the logged value is a word from the scanned prompt, not a credential. Renamed token/tokensword/words in scan().
#7 java/sensitive-log TokenTransformationFilter.java The trace log on cache hit no longer writes the issued STS token, only its length.

Tests added:

  • JwtSessionManagerTest.shouldGenerateAtLeast2048BitKeyPairWhenNoKeystoreIsConfigured
  • UiAdminHttpApplicationTest.shouldRejectJarEntryEscapingUnpackDirectory (jar with index.html followed by ../evil.txt) and shouldUnpackRegularJarEntryIntoUnpackDirectory

Not changed in this PR, to be dismissed in the code scanning UI:

  • fix CVE-2019-10744 lodash #2 java/weak-cryptographic-algorithm in DesKeyGenHandlerWon't fix: the DES key is required for interop with OpenAM ReplayPasswd (password capture & replay), which uses SecretKeySpec(key, "DES").
  • reorganize commons build artifacts #6 java/sensitive-log in TokenTransformationFilter.java:147False positive: the logged idToken is an Expression<String> whose toString() returns the expression template, not the evaluated token.

- JwtSessionManager: generate the temporary RSA key pair with 2048 bits
  instead of 1024 (java/insufficient-key-size)
- UiAdminHttpApplication: reject jar entries that resolve outside the
  unpack directory when extracting openig-ui.jar (java/zipslip)
- TokenTransformationFilter: do not write the cached issued token to the
  trace log (java/sensitive-log)
- TypoglycemiaDetector: rename the scanned prompt word from `token` to
  `word` so it is not mistaken for a credential (java/sensitive-log)
@vharseko vharseko added security Security fixes and CVE / vulnerability updates java Pull requests that update Java code tests Adds or updates tests ai AI / LLM proxy features (openig-ai) labels Sep 18, 2026
@vharseko
vharseko merged commit 0a8b912 into OpenIdentityPlatform:master Sep 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai AI / LLM proxy features (openig-ai) java Pull requests that update Java code security Security fixes and CVE / vulnerability updates tests Adds or updates tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant