forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security] Add configuration for running OWASP Dependency Check for a…
…ll modules (apache#10288) * Add owasp dependency check config Example report: mvn -Pskip-all,core-modules,owasp-dependency-check -pl distribution/server verify * Make it possible to skip shading * Make it possible to skip nar file creation * Skip license and rat checks in skip-all profile * Skip Docker too * Skip tests completely * Skip requirement of tar.gz dependency in presto-distribution * Add bash function for running the dependency check * Remove leftover from experiment
- Loading branch information
Showing
13 changed files
with
199 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
# shell function library for Pulsar CI builds | ||
|
||
# lists all available functions in this tool | ||
function ci_list_functions() { | ||
declare -F | awk '{print $NF}' | sort | egrep '^ci_' | sed 's/^ci_//' | ||
} | ||
|
||
# prints thread dumps for all running JVMs | ||
# used in CI when a job gets cancelled because of a job timeout | ||
function ci_print_thread_dumps() { | ||
for java_pid in $(jps -q -J-XX:+PerfDisableSharedMem); do | ||
echo "----------------------- pid $java_pid -----------------------" | ||
cat /proc/$java_pid/cmdline | xargs -0 echo | ||
jcmd $java_pid Thread.print -l | ||
jcmd $java_pid GC.heap_info | ||
done | ||
return 0 | ||
} | ||
|
||
function _ci_mvn() { | ||
mvn -B -ntp "$@" | ||
} | ||
|
||
# runs OWASP Dependency Check for all projects | ||
function ci_dependency_check() { | ||
_ci_mvn -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -pl '!pulsar-client-tools-test' "$@" | ||
} | ||
|
||
|
||
if [ -z "$1" ]; then | ||
echo "usage: $0 [ci_tool_function_name]" | ||
echo "Available ci tool functions:" | ||
ci_list_functions | ||
exit 1 | ||
fi | ||
ci_function_name="ci_$1" | ||
shift | ||
|
||
if [[ "$(LC_ALL=C type -t $ci_function_name)" == "function" ]]; then | ||
eval "$ci_function_name" "$@" | ||
else | ||
echo "Invalid ci tool function" | ||
echo "Available ci tool functions:" | ||
ci_list_functions | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters