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

build: Added configurations to apply constraints to dependencies resolves #134 #159

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Thedrogon
Copy link

Added configurations to apply constraints to the build.gradle dependencies to prevent gestalt pulling in dependencies with known CVEs, directly or transitively through things like Reflections. Added some suppressions in various files and as well removed some unnecessary imports

…ent `gestalt` pulling in dependencies with known CVEs, directly or transitively through things like Reflections. Added some suppressions in various files and as well removed some unnecessary imports
@Thedrogon Thedrogon changed the title build: Added configurations to apply constraints to dependencies build: Added configurations to apply constraints to dependencies Jan 26, 2025
@Thedrogon Thedrogon changed the title build: Added configurations to apply constraints to dependencies build: Added configurations to apply constraints to dependencies resolves #134 Jan 26, 2025
Copy link
Contributor

@BenjaminAmos BenjaminAmos left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Constraining the dependencies is a useful adjustment but I would rather it was not bundled with other wide-sweeping changes. Suppressing warnings is a last resort as well, since usually we want to see warnings.

… to prevent `gestalt` pulling in dependencies with known CVEs, directly or transitively through things like Reflections. Added some suppressions in various files and as well removed some unnecessary imports"

This reverts commit 43923eb.
Copy link
Author

@Thedrogon Thedrogon left a comment

Choose a reason for hiding this comment

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

reverted the changes .

Sayanjit Mukherjee added 2 commits January 30, 2025 01:18
…s of (deprecated)access-controller so that it can be removed without errors
@soloturn
Copy link
Contributor

@BenjaminAmos does this look good to you now? apart from commented stuff which imo should be better removed ...

Copy link
Contributor

@BenjaminAmos BenjaminAmos left a comment

Choose a reason for hiding this comment

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

I appreciate you trying to make changes for the better but not all warnings are actionable here for reasons that I have tried to explain.

If you could constrain the changes to that tiny but beneficial gradle constraint improvement then this would be much easier to take in. Removing logic in the code without understanding why it is there (this library is quite a central piece of our games) just makes this pull request unviable as-is, I'm afraid.

@@ -328,16 +330,16 @@ Optional<T> createInstance(Asset<U> asset) {
Optional<? extends Asset<U>> result = asset.createCopy(asset.getUrn().getInstanceUrn());
if (!result.isPresent()) {
try {
return AccessController.doPrivileged((PrivilegedExceptionAction<Optional<T>>) () -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Despite being deprecated, I'm afraid that for the time being we do still need to use the AccessController APIs. Gestalt sandboxes modules using SecurityManager as an additional precaution and until it's completely unusable I'd rather have that safety net than not. The AccessController.doPrivileged calls are needed when running with a SecurityManager active.

Copy link
Author

Choose a reason for hiding this comment

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

Then for the requirement I will revert them in the PR.

@@ -131,7 +133,7 @@ public synchronized void close() {
/**
* Disposes any assets queued for disposal. This occurs if an asset is no longer referenced by anything.
*/
@SuppressWarnings("unchecked")
//@SuppressWarnings("unchecked")
Copy link
Contributor

Choose a reason for hiding this comment

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

You can either remove those suppressions or leave them be but commenting them out like that in committed code is rather messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants