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

Use of the SecurityManager #1617

Open
srdo opened this issue Sep 27, 2024 · 1 comment
Open

Use of the SecurityManager #1617

srdo opened this issue Sep 27, 2024 · 1 comment

Comments

@srdo
Copy link

srdo commented Sep 27, 2024

The Worker uses the SecurityManager to prevent System.exit. The SM is deprecated for removal, and will be going away soon.

Previously, we've been punting on this issue by enabling the SM for Java 17+, but this won't continue to work.

The linked JEP contains source for a Java agent, which could be used to block System.exit (see the JEP appendix), but I'm wondering if we'd be better off just removing the SM code and not replacing it?

Do people actually have a lot of code they need to test with rules_scala, which calls System.exit, making it worth trying to block?

@srdo
Copy link
Author

srdo commented Nov 21, 2024

The Java rules have the same problem, I think we should follow their lead for how we solve this

bazelbuild/bazel#24354

So for now the solution is probably to avoid using the SM code on Java 24+

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

No branches or pull requests

1 participant