github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/bin/run_bandit (about) 1 #!/bin/bash 2 # 3 # Copyright 2017 Intel Corporation 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 # ------------------------------------------------------------------------------ 17 18 top_dir=$(cd $(dirname $(dirname $0)) && pwd) 19 20 directories=" 21 build 22 cli/build 23 cli/tests 24 consensus/poet/cli/build 25 consensus/poet/cli/tests 26 consensus/poet/common/build 27 consensus/poet/common/tests 28 consensus/poet/core/build 29 consensus/poet/core/tests 30 consensus/poet/families/build 31 consensus/poet/families/tests 32 consensus/poet/simulator/build 33 consensus/poet/simulator/tests 34 families/settings/tests 35 integration 36 rest_api/build 37 rest_api/tests 38 sdk/python/build 39 sdk/python/sawtooth_processor_test 40 signing/build 41 signing/tests 42 validator/build 43 validator/tests 44 " 45 46 if [ ! -d "$top_dir/build" ]; then 47 mkdir $top_dir/build 48 fi 49 50 for dir in $directories 51 do 52 if [ -z $ignore ] 53 then 54 ignore="$top_dir/$dir" 55 else 56 ignore="$ignore,$top_dir/$dir" 57 fi 58 done 59 60 bandit -ll -r --ignore-nosec $top_dir \ 61 --exclude $ignore \ 62 -f html \ 63 -o /project/sawtooth-core/build/bandit.html