@@ -129,8 +129,8 @@ check_git_hash(){
129
129
check_docker_image (){
130
130
local LOCAL_DOCKER_HASH=" "
131
131
local REMOTE_DOCKER_HASH=" "
132
- LOCAL_DOCKER_HASH=" $( sudo docker image inspect embeddedanalyzer/emba:latest --format ' {{json .RepoDigests}}' | jq . | grep " sha" | sed -E ' s/.*sha256:([0-9|[a-z]+)"/\1/' || true) "
133
- REMOTE_DOCKER_HASH=" $( sudo docker manifest inspect embeddedanalyzer/emba:latest -v | jq . | grep " digest" | head -n1 | awk ' {print $2}' | sed -E ' s/"sha256:(.+)",/\1/' || true) "
132
+ LOCAL_DOCKER_HASH=" $( docker image inspect embeddedanalyzer/emba:latest --format ' {{json .RepoDigests}}' | jq . | grep " sha" | sed -E ' s/.*sha256:([0-9|[a-z]+)"/\1/' || true) "
133
+ REMOTE_DOCKER_HASH=" $( docker manifest inspect embeddedanalyzer/emba:latest -v | jq . | grep " digest" | head -n1 | awk ' {print $2}' | sed -E ' s/"sha256:(.+)",/\1/' || true) "
134
134
135
135
if [[ " ${LOCAL_DOCKER_HASH} " == " ${REMOTE_DOCKER_HASH} " ]]; then
136
136
echo -e " Docker image version - ${GREEN} ok${NC} "
@@ -154,22 +154,26 @@ dependency_check()
154
154
if [[ " ${CONTAINER_NUMBER} " -ne 1 ]]; then
155
155
print_output " Internet connection - \\ c" " no_log"
156
156
157
- if [[ -n " ${PROXY_SETTINGS} " ]]; then
158
- export http_proxy=" ${PROXY_SETTINGS} "
159
- export https_proxy=" ${PROXY_SETTINGS} "
160
- print_output " [*] Info: Proxy settings detected: ${ORANGE}${PROXY_SETTINGS}${NC} " " no_log"
161
- fi
162
-
163
157
LATEST_EMBA_VERSION=" $( curl --connect-timeout 5 -s -o - https://github.com/e-m-b-a/emba/blob/master/config/VERSION.txt | grep -w " rawLines" | sed -E ' s/.*"rawLines":\["([0-9]\.[0-9]\.[0-9]).*/\1/' || true) "
164
158
if [[ -z " ${LATEST_EMBA_VERSION} " ]] ; then
165
159
echo -e " ${RED} " " not ok" " ${NC} "
166
160
print_output " [-] Warning: Quest container has no internet connection!" " no_log"
167
161
else
168
162
echo -e " ${GREEN} " " ok" " ${NC} "
169
- check_emba_version " ${LATEST_EMBA_VERSION} "
170
- check_docker_image
171
- check_git_hash
163
+ # ensure this only runs on the host and not in any container
164
+ if [[ " ${IN_DOCKER} " -eq 0 ]]; then
165
+ check_emba_version " ${LATEST_EMBA_VERSION} "
166
+ check_docker_image
167
+ check_git_hash
168
+ fi
172
169
fi
170
+
171
+ if [[ -n " ${PROXY_SETTINGS} " ]]; then
172
+ export http_proxy=" ${PROXY_SETTINGS} "
173
+ export https_proxy=" ${PROXY_SETTINGS} "
174
+ print_output " [*] Info: Proxy settings detected: ${ORANGE}${PROXY_SETTINGS}${NC} " " no_log"
175
+ fi
176
+
173
177
if [[ -f " ${CONFIG_DIR} /gpt_config.env" ]]; then
174
178
if grep -v -q " #" " ${CONFIG_DIR} /gpt_config.env" ; then
175
179
# readin gpt_config.env
@@ -517,7 +521,11 @@ dependency_check()
517
521
check_dep_file " Binarly FwHunt analyzer" " ${EXT_DIR} " " /fwhunt-scan/fwhunt_scan_analyzer.py"
518
522
519
523
if function_exists F20_vul_aggregator; then
520
- check_dep_file " NVD CVE database" " ${EXT_DIR} " " /nvd-json-data-feeds/README.md"
524
+ # ensure this check is not running as github action:
525
+ # "${CONFIG_DIR}"/gh_action is created from the installer
526
+ if ! [[ -f " ${CONFIG_DIR} " /gh_action ]]; then
527
+ check_dep_file " NVD CVE database" " ${EXT_DIR} " " /nvd-json-data-feeds/README.md"
528
+ fi
521
529
# CVE searchsploit
522
530
check_dep_tool " CVE Searchsploit" " cve_searchsploit"
523
531
0 commit comments