Description
Description
Currently if there is some unrecognized permission - we have 55K errors in concrete execution logs.
It shows indirectly that there are many permission read attempts. And this is only for one method test generation.
Permissions file is not expected to be changed during UTBot execution.
So it can be read only before test generation - to save time.
To Reproduce
Steps to reproduce the behavior:
- Open IntelliJ IDEA with installed UTBot plugin (with Security Manager turned on)
- Open/create a project with JDK 8/11
- Add the following class:
public class SecurityCheck {
public String property(String key) {
return System.getProperty(key);
}
}
- Create or put the following text into user.home}/.utbot/sandbox.policy // here "test" is invalid
grant {
permission java.util.PropertyPermission "*", "test";
};
- Generate tests for the SecurityCheck class
- Check Concrete executor logs
Expected behavior
Permissions file can be read once before test generation - to save time.
Actual behavior
There are about 55K errors "invalid permission: test" in concrete executor log.
This shows that UTBot is trying to read and recognize this permission many times during test execution.
Visual proofs (screenshots, logs, images)
Many errors with the following text:
java.security.policy: error adding Permission, java.util.PropertyPermission:
java.lang.IllegalArgumentException: invalid permission: test
Environment
Windows 10 Pro
IntelliJ IDEA 2022.1 - 2022.1.4
JDK 8 / 11
Metadata
Metadata
Assignees
Labels
Type
Projects
Status