I am running a Java Spring MVC web application. It is also based on the Hybris platform.
Now the basic functions in terms of authentication and authorization are already implemented. This means that we have filters for sessions, a working user system, etc.
However, we currently do not have security measures for things like XSS and other types of possible attacks that are. XSS is probably the biggest problem as it is the most common attack method.
Now, I wonder ... what steps would be reasonable? I looked around and I saw that things like XSS-Filter exist. The implementation of this will be quite simple, just copy the source code and add it as in tomcats web.xml.
But I wonder if this is enough protection against such a filter?
There are even more overblown solutions, for example, I could use spring-security. However, reading the documentation, I feel that this is very bloated, and most of it implements what has already been implemented (for example, two A). I feel that it will take a lot of work to configure it to the amount of work that I need. I am wrong?
and
How would you say whether it is recommended to solve security problems, for example XSS? Do you use a specific predefined structure that meets your needs or is your security “made by hand” by following these lines: cheat sheet ?