mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
*: blacklist/whitelist to denylist/allowlist
Replace blacklist with denylist, and whitelist with allowlist. Use proper vocabulary in all over the code.
This commit is contained in:
parent
6d0d7ea2ba
commit
a900d579c4
@ -2,7 +2,7 @@
|
|||||||
# 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=(
|
GLSA_ALLOWLIST=(
|
||||||
201412-09 # incompatible CA certificate version numbers
|
201412-09 # incompatible CA certificate version numbers
|
||||||
201908-14 # backported both CVE fixes
|
201908-14 # backported both CVE fixes
|
||||||
201909-01 # Perl, SDK only
|
201909-01 # Perl, SDK only
|
||||||
@ -19,7 +19,7 @@ GLSA_WHITELIST=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
glsa_image() {
|
glsa_image() {
|
||||||
if glsa-check-$BOARD -t all | grep -Fvx "${GLSA_WHITELIST[@]/#/-e}"; then
|
if glsa-check-$BOARD -t all | grep -Fvx "${GLSA_ALLOWLIST[@]/#/-e}"; then
|
||||||
echo "The above GLSAs apply to $ROOT"
|
echo "The above GLSAs apply to $ROOT"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -42,15 +42,15 @@ test_image_content() {
|
|||||||
#returncode=1
|
#returncode=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local blacklist_dirs=(
|
local denylist_dirs=(
|
||||||
"$root/usr/share/locale"
|
"$root/usr/share/locale"
|
||||||
)
|
)
|
||||||
for dir in "${blacklist_dirs[@]}"; do
|
for dir in "${denylist_dirs[@]}"; do
|
||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
warn "test_image_content: Blacklisted directory found: $dir"
|
warn "test_image_content: Denied directory found: $dir"
|
||||||
# Only a warning for now, size isn't important enough to kill time
|
# Only a warning for now, size isn't important enough to kill time
|
||||||
# playing whack-a-mole on things like this this yet.
|
# playing whack-a-mole on things like this this yet.
|
||||||
#error "test_image_content: Blacklisted directory found: $dir"
|
#error "test_image_content: Denied directory found: $dir"
|
||||||
#returncode=1
|
#returncode=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -238,9 +238,9 @@ get_gclient_root() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Populate the ENVIRONMENT_WHITELIST array.
|
# Populate the ENVIRONMENT_ALLOWLIST array.
|
||||||
load_environment_whitelist() {
|
load_environment_allowlist() {
|
||||||
ENVIRONMENT_WHITELIST=(
|
ENVIRONMENT_ALLOWLIST=(
|
||||||
COREOS_OFFICIAL
|
COREOS_OFFICIAL
|
||||||
FLATCAR_BUILD_ID
|
FLATCAR_BUILD_ID
|
||||||
FORCE_STAGES
|
FORCE_STAGES
|
||||||
@ -308,7 +308,7 @@ if [[ -f "${REPO_MANIFESTS_DIR}/version.txt" ]]; then
|
|||||||
FLATCAR_DEV_BUILDS FLATCAR_DEV_BUILDS_SDK
|
FLATCAR_DEV_BUILDS FLATCAR_DEV_BUILDS_SDK
|
||||||
# Don't promote FLATCAR_BUILD_ID into an environment variable when it
|
# Don't promote FLATCAR_BUILD_ID into an environment variable when it
|
||||||
# didn't start as one, since we don't want it leaking into the SDK
|
# didn't start as one, since we don't want it leaking into the SDK
|
||||||
# chroot environment via ENVIRONMENT_WHITELIST.
|
# chroot environment via ENVIRONMENT_ALLOWLIST.
|
||||||
declare +x FLATCAR_BUILD_ID
|
declare +x FLATCAR_BUILD_ID
|
||||||
fi
|
fi
|
||||||
: ${FLATCAR_BUILD_ID:=$(date +%Y-%m-%d-%H%M)}
|
: ${FLATCAR_BUILD_ID:=$(date +%Y-%m-%d-%H%M)}
|
||||||
|
Loading…
Reference in New Issue
Block a user