mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
glsa-check: simplify and respect current root being tested
This commit is contained in:
parent
c7ab74a7ea
commit
c535cd3bbb
@ -2,20 +2,11 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
GLSA_WHITELIST=("201412-09")
|
GLSA_WHITELIST="201412-09"
|
||||||
|
|
||||||
glsa_image() {
|
glsa_image() {
|
||||||
VULNS=()
|
if glsa-check-$BOARD -t all | grep -v "$GLSA_WHITELIST"; then
|
||||||
GLSAS=`glsa-check-$BOARD -t all`
|
echo "The above GLSAs apply to $ROOT"
|
||||||
for GLSA in $GLSAS; do
|
|
||||||
if [[ " ${GLSA_WHITELIST[@]} " =~ " ${GLSA} " ]]; then
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
VULNS+=($GLSA)
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ ${#VULNS[@]} != 0 ]]; then
|
|
||||||
echo "The following GLSAs apply: $VULNS"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -65,7 +56,7 @@ test_image_content() {
|
|||||||
#returncode=1
|
#returncode=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! glsa_image; then
|
if ! ROOT="$root" glsa_image; then
|
||||||
returncode=1
|
returncode=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user