diff --git a/.config/pmd/java/ruleset.xml b/.config/pmd/java/ruleset.xml index 88a7b5a..5f5884b 100644 --- a/.config/pmd/java/ruleset.xml +++ b/.config/pmd/java/ruleset.xml @@ -194,4 +194,52 @@ + + + + Calling setters of java.lang.System usually indicates bad design and likely causes unexpected behavior. + For example, it may break when multiple Threads are setting the value. + It may also overwrite user defined options or properties. + + Try to pass the value only to the place where it's really needed and use it there accordingly. + + 3 + + + + + + + + + + + + Nearly every known usage of (Java) Object Deserialization has resulted in [a security vulnerability](https://cloud.google.com/blog/topics/threat-intelligence/hunting-deserialization-exploits?hl=en). + Vulnerabilities are so common that there are [dedicated projects for exploit payload generation](https://github.com/frohoff/ysoserial). + + Java Object Serialization may also fail to deserialize when the underlying classes are changed. + + Use proven data interchange formats like JSON instead. + + 2 + + + + + + + + diff --git a/.gitignore b/.gitignore index 14a1fb4..464aa81 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ hs_err_pid* !.idea/saveactions_settings.xml !.idea/checkstyle-idea.xml !.idea/externalDependencies.xml +!.idea/PMDPlugin.xml !.idea/inspectionProfiles/ .idea/inspectionProfiles/* diff --git a/.idea/PMDPlugin.xml b/.idea/PMDPlugin.xml new file mode 100644 index 0000000..0936e51 --- /dev/null +++ b/.idea/PMDPlugin.xml @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/saveactions_settings.xml b/.idea/saveactions_settings.xml index 848c311..12a4f04 100644 --- a/.idea/saveactions_settings.xml +++ b/.idea/saveactions_settings.xml @@ -5,6 +5,7 @@