Recommended mitigation:
Replace this dangerous code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.isIgnoringElementContentWhitespace();
DocumentBuilder builder = factory.newDocumentBuilder();| <xsl:stylesheet | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| version="2.0"> | |
| <xsl:template match="@*|node()"> | |
| <xsl:copy> | |
| <xsl:apply-templates select="@*|node()"/> | |
| </xsl:copy> | |
| </xsl:template> | |
| /** | |
| * Created by tturner on 7/22/15. | |
| */ | |
| import groovy.json.* | |
| static def parseQueryString(String string) { | |
| string.split('&').collectEntries{ param -> | |
| param.split('=', 2).collect{ URLDecoder.decode(it, 'UTF-8') } | |
| } |
| import java.util.zip.* | |
| String zipFileName = "file.zip" | |
| String inputDir = "logs" | |
| def outputDir = "zip" | |
| //Zip files | |
| ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(zipFileName)) | |
| new File(inputDir).eachFile() { file -> |
| #!/usr/bin/env bash | |
| FILENAME=${1} | |
| # expected to be defined in the environment | |
| # - AZURE_STORAGE_ACCOUNT | |
| # - AZURE_CONTAINER_NAME | |
| # - AZURE_ACCESS_KEY | |
| # inspired by |
Recommended mitigation:
Replace this dangerous code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.isIgnoringElementContentWhitespace();
DocumentBuilder builder = factory.newDocumentBuilder();