All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.codemods.UnsafeReflectionRemediationCodemod.description.md Maven / Gradle / Ivy

There is a newer version: 0.97.3
Show newest version
This change fixes Sonar's [Classes should not be loaded dynamically](https://rules.sonarsource.com/java/RSPEC-2658/) issue by replacing the unsafe class load with a hardened alternative.

The hardened alternative blocks the loading of classes that are well-known to be used by attackers to exploit the application.

Our changes look something like this:

```diff
- Class clazz = Class.forName(untrustedInput);
+ Class clazz = Reflection.loadAndVerify(untrustedInput);
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy