Class XslSecurityService


  • public final class XslSecurityService
    extends java.lang.Object
    Service for validating XSL files against security threats. Detects dangerous constructs such as extension namespaces, script elements, document() calls, and xsl:result-document before the stylesheet reaches the XSLT processor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.String> validateXslSecurity​(byte[] baXslSource)
      Validates an XSL stylesheet for security threats.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • validateXslSecurity

        public static java.util.List<java.lang.String> validateXslSecurity​(byte[] baXslSource)
        Validates an XSL stylesheet for security threats.
        Parameters:
        baXslSource - the XSL source as a byte array
        Returns:
        a list of security violations found, empty if the stylesheet is safe