Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ban java deserialization #2152

Merged
merged 3 commits into from
Mar 31, 2022
Merged

Ban java deserialization #2152

merged 3 commits into from
Mar 31, 2022

Conversation

carterkozak
Copy link
Contributor

https://cwe.mitre.org/data/definitions/502.html

==COMMIT_MSG==
Ban java deserialization
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Mar 30, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Ban java deserialization

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from ferozco March 30, 2022 20:15
Copy link

@Cosmin1490 Cosmin1490 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

.named("deserialize");

private static final Matcher<ExpressionTree> DESERIALIZE =
Matchers.anyOf(OBJECT_INPUT_READ_OBJECT, LANG3_SERIALIZATION_UTILS_DESERIALIZE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also ban ObjectOutput#writeObject and the SerializationUtils#serialize permutations as well under the assumptions that if someone is writing the bytes, someone somewhere will read them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, but I'd like to make sure this doesn't cause issues with spark code that we expect to use java serialization before expanding the breadth of the check.

@bulldozer-bot bulldozer-bot bot merged commit b960263 into develop Mar 31, 2022
@bulldozer-bot bulldozer-bot bot deleted the ckozak/ban_deserialization branch March 31, 2022 12:57
@svc-autorelease
Copy link
Collaborator

Released 4.86.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Mar 31, 2022
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.85.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Throwable.getMessage is unsafe by default | palantir/gradle-baseline#2151 |


## 4.86.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Ban java deserialization | palantir/gradle-baseline#2152 |


## 4.87.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Array assignment merges safety rather than replacing it | palantir/gradle-baseline#2154 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants