Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little cleanups #683

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/trivy-container-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
docker save -o vuln-image.tar embeddedanalyzer/emba

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
with:
input: /github/workspace/vuln-image.tar
timeout: "60m"
Expand Down
1 change: 1 addition & 0 deletions config/bin_version_strings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ binutils;;gplv3;"\(GNU\ Binutils\ for\ Debian\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/
bird;;unknown;"^BIRD\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/BIRD\ version\ ([0-9](\.[0-9]+)+?)$/bird:\1/'";
blkid;;unknown;"^blkid\ [0-9](\.[0-9]+)+?\ \(.*\)$";"sed -r 's/blkid\ ([0-9](\.[0-9]+)+?)\ .*/blkid:\1/'";
blockman;;unknown;"^blockman\ [0-9](\.[0-9]+)+?\.blockman\ build-[0-9]+$";"sed -r 's/blockman\ ([0-9](\.[0-9]+)+?)\..*/blockman:\1/'";
boa;;unknown;"Boa\ HTTPd\ [0-9](\.[0-9]+)+?(rc[0-9]+)?";"sed -r 's/Boa\ HTTPd\ ([0-9](\.[0-9]+)+?(rc[0-9]+)?)/boa:boa:\1/'";
booster;;unknown;"BoosterMainFunction:305:\ Version:\ [0-9](\.[0-9])+?";"sed -r 's/BoosterMainFunction:305:\ Version:\ ([0-9](\.[0-9]+)+?).*/booster:\1/'";
bootlogd;;unknown;"\ bootlogd\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\ bootlogd\ ([0-9](\.[0-9]+)+?)\ .*/bootlogd:\1/'";
bpalogin;;gplv2;"BPALogin\ v[0-9](\.[0-9])+?\ -\ portable\ BigPond\ Broadband\ login\ client$";"sed -r 's/BPALogin\ v([0-9](\.[0-9]+)+?)\ .*/bpalogin:\1/'";
Expand Down
5 changes: 3 additions & 2 deletions modules/L22_upnp_hnap_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ L22_upnp_hnap_checks() {

export UPNP_UP=0
export HNAP_UP=0
export JNAP_UP=0

if [[ "$SYS_ONLINE" -eq 1 ]] && [[ "$TCP" == "ok" ]]; then
module_log_init "${FUNCNAME[0]}"
Expand Down Expand Up @@ -131,7 +132,7 @@ check_basic_hnap_jnap() {
curl -v -L --max-redir 0 -f -m 5 -s -X POST -H "${JNAP_ACTION}" -d "{}" https://"${IP_ADDRESS_}":"${PORT}"/JNAP/ >> "$LOG_PATH_MODULE"/jnap-discovery-check.txt || true
fi

if [[ -f "$LOG_PATH_MODULE"/hnap-discovery-check.txt ]]; then
if [[ -s "$LOG_PATH_MODULE"/hnap-discovery-check.txt ]]; then
print_ln
# tee -a "$LOG_FILE" < "$LOG_PATH_MODULE"/hnap-discovery-check.txt
sed 's/></>\n</g' "$LOG_PATH_MODULE"/hnap-discovery-check.txt | tee -a "$LOG_FILE"
Expand All @@ -140,7 +141,7 @@ check_basic_hnap_jnap() {
HNAP_UP=$(grep -c "HNAP1" "$LOG_PATH_MODULE"/hnap-discovery-check.txt || true)
fi

if [[ -f "$LOG_PATH_MODULE"/jnap-discovery-check.txt ]]; then
if [[ -s "$LOG_PATH_MODULE"/jnap-discovery-check.txt ]]; then
print_ln
tee -a "$LOG_FILE" < "$LOG_PATH_MODULE"/jnap-discovery-check.txt
print_ln
Expand Down