aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2021-09-01 09:34:46 +0000
committerGerrit Code Review <gerrit@onap.org>2021-09-01 09:34:46 +0000
commit1ebb610a0aec94adfab6e4db88ed1c21a3014f46 (patch)
tree8ca863cf01358d1eae1be66dcf90b06d1c96d3c8
parent1ee65ab7801cd0d209ce31f96b9daa063bc7b6b3 (diff)
parent978b2e5a8a00e2d9439afd65ab9c487b50a6357b (diff)
Merge "[WAIVERS] Update regex to exclude DCAE temp dockers"
-rwxr-xr-xsecurity/scripts/check_security_root.sh2
-rw-r--r--security/scripts/check_unlimitted_pods.sh22
2 files changed, 12 insertions, 12 deletions
diff --git a/security/scripts/check_security_root.sh b/security/scripts/check_security_root.sh
index 5b614d4..ed6f534 100755
--- a/security/scripts/check_security_root.sh
+++ b/security/scripts/check_security_root.sh
@@ -68,7 +68,7 @@ while IFS= read -r line; do
sed -i "/$line/d" $FILTERED_PODS_LIST
fi
# tmp ugly workaround to exlude dep (temporary dcae dockers)
- if grep -e dep-$wl_name <<< "$line" > /dev/null ;then
+ if grep -e "^dep.*dcae-tcagen2" <<< "$line" > /dev/null ;then
sed -i "/$line/d" $FILTERED_PODS_LIST
fi
done < $WL_RAW_FILE_PATH
diff --git a/security/scripts/check_unlimitted_pods.sh b/security/scripts/check_unlimitted_pods.sh
index ced1530..2456766 100644
--- a/security/scripts/check_unlimitted_pods.sh
+++ b/security/scripts/check_unlimitted_pods.sh
@@ -62,24 +62,24 @@ while IFS= read -r line; do
# for each line we test if it is in the white list with a regular expression
while IFS= read -r wl_line; do
wl_name=$(echo $wl_line | awk {'print $1'})
- if grep -e $K8S_NAMESPACE-$wl_name <<< "$line" > /dev/null ;then
- # Found in white list, exclude it
- sed -i "/$line/d" $FILTERED_PODS_LIST
- fi
+ if grep -e $K8S_NAMESPACE-$wl_name <<< "$line" > /dev/null ;then
+ # Found in white list, exclude it
+ sed -i "/$line/d" $FILTERED_PODS_LIST
+ fi
# tmp ugly workaround to exlude dep (temporary dcae dockers)
- if grep -e dep-$wl_name <<< "$line" > /dev/null ;then
- sed -i "/$line/d" $FILTERED_PODS_LIST
- fi
+ if grep -e "^dep.*dcae-tcagen2" <<< "$line" > /dev/null ;then
+ sed -i "/$line/d" $FILTERED_PODS_LIST
+ fi
done < $WL_RAW_FILE_PATH
done < $FILTERED_PODS_LIST
if [ -s $FILTERED_PODS_LIST ]
then
- code=1
- nb_errors=`cat $FILTERED_PODS_LIST | wc -l`
- echo "Test FAIL: $nb_errors pod(s) launched without limit"
- cat $FILTERED_PODS_LIST
+ code=1
+ nb_errors=`cat $FILTERED_PODS_LIST | wc -l`
+ echo "Test FAIL: $nb_errors pod(s) launched without limit"
+ cat $FILTERED_PODS_LIST
else
echo "Test PASS: No pod launched without limit"
fi