fix[PPP-5720]: remove instances of unsafe deserialization by readObject#430
Merged
miguelappleton merged 5 commits intowebdetails:masterfrom Jun 27, 2025
Merged
Conversation
c57e378 to
5875d3f
Compare
Contributor
Author
|
From running a test workflow without these changes, I can see that 19 of the 24 failed tests are failing regardless of the changes in this PR. The ones that are currently failing due to this PR are the following:
(Which makes sense because they relate to the addition of the Currently working on addressing these. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6ed11ac to
6a3b74d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
befc
reviewed
Jun 26, 2025
core/src/main/java/pt/webdetails/cda/dataaccess/DenormalizedMdxDataAccess.java
Outdated
Show resolved
Hide resolved
befc
reviewed
Jun 26, 2025
core/src/main/java/pt/webdetails/cda/dataaccess/MdxDataAccess.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…InputStream + change more instances of readObject to readUTF
… SonarQube suggestions
…e some more instances of readObject to readUTF + some more SonarQube suggestions
Analysis Details0 IssuesCoverage and DuplicationsProject ID: pentaho:cda-plugin |
Note:Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system. |
✅ Build finished in 16m 11sBuild command: mvn clean verify -B -e -Daudit -Djs.no.sandbox👌 All tests passed! Tests run: 240, Failures: 0, Skipped: 0 Test Results ℹ️ This is an automatic message |
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.







My main changes involve 3 different fixes for these insecure uses of
readObject:when the object was a String, I replaced
writeObjectandreadObjectwithwriteUTFandreadUTF;when the object was a custom type, I added it to an ObjectInputFilter, which is passed into the
ObjectInputStream, to only allow those types:ObjectInputStreamdoes some stream header reading on its constructor, and you can only set anObjectInputFilterwhen the stream has not read anything, so I had to do it via this custom class, as the filter could not be set after class instantiation;for
extraCacheKeyI could not add it to the filter as is, because the object was aSerializable, and if I allow theObjectInputStreamto acceptSerializableobjects, the danger of injection attacks still remains. However I saw thatextraCacheKeywas just aCacheKeyobject that was being unnecessarily converted (or "extended") to its parent typeSerializable, so I just made it "remain" as aCacheKeythrough the whole process and then filtered that custom type, similarly to the ones on the above step.I also addressed (in a separate commit) some of the SonarQube changes suggested for the files I altered (and some other files that I had altered but ended up not altering), but I wasn't super thorough and basically only did the changes which I believed would not cause problems elsewhere.