-
Notifications
You must be signed in to change notification settings - Fork 7
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
Disallow student classes in trusted packages #15
Comments
As a workaround, this can also be archived by telling the Maven compiler plugin to compile only classes in certain packages, like the main package of the exercise set in Artemis for example. |
A short overview what is possible and what not:
Since 1 does not secure the build, it is not an option. 2 could be used, but would only work for maven builds, in an IDE that would have no effect. The same problem arises for 4. 3 would similar to the package restrictions of #13 only work during/before class loading and is hard to realize. For 5, I am unsure how well that could work. In my eyes, a combination of 3 and 4 would be preferred. Are there other options left? What would you prefer? I would be happy to hear more ideas. |
Currently, it is very likely it will be option 3 only. |
To some degree a workaround with |
Current recommendation: use the Maven Enforcer Plugin and check that trusted packages do not exist in student code. (Should be done after compilation). |
Improve security by disallowing students to create classes in the whitelisted packages in the SecurityManager by configuring a custom Proxy for the ClassLoader which will throw
SecurityException
s in such cases.Securing the testing process will be much simpler because we can trust classes in these packages blindly at runtime. However, this will not replace the Throwable-sanitization.
The text was updated successfully, but these errors were encountered: