For these there's good old "perl -T" :)
As a strategy for dealing with xss, its fallen out of favour, but static taint analysis, which is the same thing but not at runtime and less accurate is still super popular in big shops as a CI step.
As an approach though its more a way to make sure you dont screw up as opposed to a way to solve the problem in general.