None, actually. The only real security threat with Java on the Mac is having Java enabled in your web browser. While Java 7 and 8 from Oracle will automatically turn Java for your browsers on when installed, Java 6 will not connect to your browsers in Mavericks or Yosemite. Its use is limited to apps which need it.
You can test that here. Note that the site shows no active Java software for my system:
I have Java 8 installed, but disabled for any web browsers in the System Preferences. And despite no visual control for Java 6, which I also have installed, the site doesn't even know it's installed. So as far as the testing site is concerned, Java is completely disabled for my browsers.
But the Terminal trick above appears to be just as good as installing Java 6. It makes the older apps happy that need 6 (or can at least be fooled into thinking it's installed), and is then one less piece of software to add to your system.