Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
m-1-k-3 committed Dec 12, 2024
1 parent 2179845 commit d7ae4dc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions helpers/helpers_emba_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ set_defaults() {
# we limit the maximal file log of our SBOM -> change this in the scanning profile
export SBOM_MAX_FILE_LOG=200
export SBOM_MINIMAL=0
export SBOM_UNTRACKED_FILES=1

# we can enable/disable the s08 submodules with the following array configuration
# -> just comment the submodule that should not be used
Expand Down
2 changes: 1 addition & 1 deletion modules/F15_cyclonedx_sbom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ F15_cyclonedx_sbom() {
for lCOMP_FILE_ID in "${!lCOMP_FILES_ARR[@]}"; do
lCOMP_FILE="${lCOMP_FILES_ARR["${lCOMP_FILE_ID}"]}"

if [[ "${SBOM_UNTRACKED_FILES}" -ne 1 ]] && [[ "${lCOMP_FILE}" == *"unhandled_file_"* ]]; then
if [[ "${SBOM_UNTRACKED_FILES:-0}" -ne 1 ]] && [[ "${lCOMP_FILE}" == *"unhandled_file_"* ]]; then
# if we do not include unhandled_file entries we can skipe them here
continue
fi
Expand Down
1 change: 1 addition & 0 deletions modules/S16_ghidra_decompile_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ S16_ghidra_decompile_checks()
lBIN_TO_CHECK=$(grep "${lBIN_TO_CHECK}" "${P99_CSV_LOG}" | cut -d ';' -f1 | sort -u | head -1 || true)
fi

print_output "[*] S16 - Testing ${lBIN_TO_CHECK}"
# ensure we have not tested this binary entry
local lBIN_MD5=""
lBIN_MD5="$(md5sum "${lBIN_TO_CHECK}" | awk '{print $1}')"
Expand Down
1 change: 1 addition & 0 deletions modules/S17_cwe_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ cwe_check() {
lBIN_TO_CHECK=$(grep "${lBIN_TO_CHECK}" "${P99_CSV_LOG}" | cut -d ';' -f1 | sort -u | head -1 || true)
fi
# ensure we have not tested this binary entry
print_output "[*] S17 - Testing ${lBIN_TO_CHECK}"
local lBIN_MD5=""
lBIN_MD5="$(md5sum "${lBIN_TO_CHECK}" | awk '{print $1}')"
if [[ "${lBINS_CHECKED_ARR[*]}" == *"${lBIN_MD5}"* ]]; then
Expand Down
4 changes: 2 additions & 2 deletions modules/S24_kernel_bin_identifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ S24_kernel_bin_identifier()
lAPP_VERS=$(echo "${lSTRIPPED_VERS}" | cut -d ':' -f4-5)
# it could be that we have a version like 2.14b:* -> we remove the last field
lAPP_VERS="${lAPP_VERS/:\*}"
lPURL_IDENTIFIER=$(build_generic_purl "${lSTRIPPED_VERS}" "${lOS_IDENTIFIED}" "${lK_ELF:-NA}")
lPURL_IDENTIFIER=$(build_generic_purl "${lSTRIPPED_VERS}" "${lOS_IDENTIFIED}" "NA")

if [[ -e "${EXT_DIR}"/vmlinux-to-elf/vmlinux-to-elf ]]; then
print_output "[*] Testing possible Linux kernel file ${ORANGE}${lFILE}${NC} with ${ORANGE}vmlinux-to-elf:${NC}"
Expand All @@ -108,7 +108,7 @@ S24_kernel_bin_identifier()
lK_ARCH=$(echo "${lK_ELF}" | cut -d ':' -f2)
lK_ARCH=$(echo "${lK_ARCH}" | cut -d ',' -f2)
lK_ARCH=${lK_ARCH#\ }
lPURL_IDENTIFIER=$(build_generic_purl "${lSTRIPPED_VERS}" "${lOS_IDENTIFIED}" "${lK_ELF:-NA}")
lPURL_IDENTIFIER=$(build_generic_purl "${lSTRIPPED_VERS}" "${lOS_IDENTIFIED}" "${lK_ARCH:-NA}")

# add source file path information to our properties array:
local lPROP_ARRAY_INIT_ARR=()
Expand Down
1 change: 1 addition & 0 deletions scan-profiles/default-scan-emulation.emba
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export SHORT_PATH=1
export HTML=1
export QEMULATION=1
export FULL_EMULATION=1
# export SELECT_MODULES+=( "S05" "S21" "S22" "S23" "S24" "F20" "F50" )
export SELECT_MODULES+=( "S05" "S21" "S22" "S23" "S24" )

# enable silent mode and status bar
Expand Down

0 comments on commit d7ae4dc

Please sign in to comment.