Path: blob/main/databases/cassandra4/files/maven/build-owasp.xml
18161 views
<?xml version="1.0" encoding="UTF-8" standalone="no"?>1<!--2~ Licensed to the Apache Software Foundation (ASF) under one3~ or more contributor license agreements. See the NOTICE file4~ distributed with this work for additional information5~ regarding copyright ownership. The ASF licenses this file6~ to you under the Apache License, Version 2.0 (the7~ "License"); you may not use this file except in compliance8~ with the License. You may obtain a copy of the License at9~10~ http://www.apache.org/licenses/LICENSE-2.011~12~ Unless required by applicable law or agreed to in writing, software13~ distributed under the License is distributed on an "AS IS" BASIS,14~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15~ See the License for the specific language governing permissions and16~ limitations under the License.17-->18<project basedir="." name="apache-cassandra-owasp-tasks">19<property name="dependency-check.version" value="6.3.2"/>20<property name="dependency-check.home" value="${build.dir}/dependency-check-ant-${dependency-check.version}"/>2122<condition property="is.dependency.check.jar">23<available file="${dependency-check.home}/dependency-check-ant/dependency-check-ant.jar" type="file" />24</condition>2526<target name="dependency-check-download"27depends="build"28description="Fetch OWASP Dependency checker"29unless="is.dependency.check.jar">3031<echo>Downloading OWASP Dependency checks ...</echo>3233<mkdir dir="${dependency-check.home}"/>3435<get src="https://github.com/jeremylong/DependencyCheck/releases/download/v${dependency-check.version}/dependency-check-ant-${dependency-check.version}-release.zip"36dest="${dependency-check.home}/dependency-check-ant-${dependency-check.version}-release.zip"/>3738<unzip src="${dependency-check.home}/dependency-check-ant-${dependency-check.version}-release.zip" dest="${dependency-check.home}"/>39</target>4041<target name="dependency-check" description="Dependency-Check Analysis" depends="dependency-check-download,resolver-dist-lib">4243<path id="dependency-check.path">44<fileset dir="${dependency-check.home}/dependency-check-ant/lib">45<include name="*.jar"/>46</fileset>47</path>4849<taskdef resource="dependency-check-taskdefs.properties">50<classpath refid="dependency-check.path" />51</taskdef>5253<!--54default value for cveValidForHours is 4 after which sync is done again5556skipping using two specific caches at the end is solving (1)5758failBuildOnCVSS is by default 11 so build would never fail,59the table categorising vulnerabilities is here (2), so by setting60"failBuildOnCVSS" to 1, we will fail the build on any CVE found61if it is not suppressed already dependency-check-suppressions.xml6263If a vendor provides no details about a vulnerability,64NVD will score that vulnerability as 10.0 (the highest rating translating to critical).6566(1) https://github.com/jeremylong/DependencyCheck/issues/216667(2) https://nvd.nist.gov/vuln-metrics/cvss68-->69<dependency-check projectname="Apache Cassandra"70reportoutputdirectory="${basedir}/build"71reportformat="HTML"72prettyPrint="true"73cveValidForHours="1"74centralAnalyzerUseCache="false"75nodeAuditAnalyzerUseCache="false"76failBuildOnCVSS="1"77assemblyAnalyzerEnabled="false"78dataDirectory="${dependency-check.home}/data"79suppressionFile="${basedir}/.build/dependency-check-suppressions.xml">80<fileset dir="lib">81<include name="**/*.jar"/>82</fileset>83</dependency-check>84</target>85</project>868788