Skip to content

Commit 0028dcf

Browse files
committed
fix update check
1 parent 2f2c303 commit 0028dcf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

helpers/helpers_emba_dependency_check.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ check_nvd_db() {
133133
local REMOTE_HASH="${1:-}"
134134
local LOCAL_HASH=""
135135
if [[ -d "${EXT_DIR}"/nvd-json-data-feeds ]] ; then
136-
LOCAL_HASH="$(head -c 8 "${EXT_DIR}"/nvd-json-data-feeds/.git/refs/heads/main)"
136+
LOCAL_HASH="$(head "${EXT_DIR}"/nvd-json-data-feeds/.git/refs/heads/main)"
137137

138138
if [[ "${REMOTE_HASH}" == "${LOCAL_HASH}" ]]; then
139139
echo -e " CVE database version - ${GREEN}ok${NC}"
@@ -147,7 +147,7 @@ check_epss_db() {
147147
local REMOTE_HASH="${1:-}"
148148
local LOCAL_HASH=""
149149
if [[ -d "${EXT_DIR}"/EPSS-data ]] ; then
150-
LOCAL_HASH="$(head -c 8 "${EXT_DIR}"/EPSS-data/.git/refs/heads/main)"
150+
LOCAL_HASH="$(head "${EXT_DIR}"/EPSS-data/.git/refs/heads/main)"
151151

152152
if [[ "${REMOTE_HASH}" == "${LOCAL_HASH}" ]]; then
153153
echo -e " EPSS database version - ${GREEN}ok${NC}"
@@ -161,7 +161,8 @@ check_git_hash() {
161161
local REMOTE_HASH="${1:-}"
162162
local LOCAL_HASH=""
163163
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 ; then
164-
LOCAL_HASH="$(git describe --always)"
164+
LOCAL_HASH="$(head .git/refs/heads/master)"
165+
# LOCAL_HASH="$(git describe --always)"
165166

166167
if [[ "${REMOTE_HASH}" == "${LOCAL_HASH}" ]]; then
167168
echo -e " EMBA github version - ${GREEN}ok${NC}"

modules/S06_distribution_identification.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ S06_distribution_identification()
4848
lSEARCH_FILE="$(safe_echo "${CONFIG}" | cut -d\; -f2)"
4949
# echo "lSEARCH_FILE: $lSEARCH_FILE"
5050
# echo "FIRMWARE_PATH: $FIRMWARE_PATH"
51-
if [[ "${lSEARCH_FILE}" == *"os_release"* ]] || [[ "${lSEARCH_FILE}" == *"lsb-release"* ]]; then
51+
if [[ "${lSEARCH_FILE}" == *"os-release"* ]] || [[ "${lSEARCH_FILE}" == *"lsb-release"* ]]; then
5252
# lets check if we have already a valid debian entry -> if so, we can skip this test
5353
# this usually happens if we have already found an os_release or lsb-release file
54+
# echo "Check for debian - os_release / lsb-release"
5455
if grep -qE "debian_linux:[0-9]+" "${S06_CSV_LOG}"; then
5556
print_output "[*] Already identified Debian Linux version -> skipping further tests now" "no_log"
5657
continue

0 commit comments

Comments
 (0)