Skip to content

Bug: MacOS automation framework uses unavailable packages  #284

@chryzsh

Description

@chryzsh

Describe the bug
When using the automation framework with ARM it is trying to gather target system data with commands not available on MacOS like ip route and sha1sum. You get an error in the console, the IP variable is never set.
image

The automation appears to run fine after that, but when uploading the JSON file so this is a minor issue where only the target field won't be populated as far as I can tell.
This is the code in the automation script that breaks it.

###########################
# Gather target system data


###########################
ip=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
user=$(whoami)
target=$(printf "$template_target" "$PWD" "$HOSTNAME" "$ip" "$PATH" "$user")

# Generate an execution ID
random_string=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 10)
start_time=$(timestamp)
exeid="test.sh$start_time$random_string"
exeid=$(echo $exeid | sha1sum | base64)

To Reproduce
Steps to reproduce the behavior:

  1. Generate a test case with any kind of automation
  2. Build an automation script
  3. Execute script

Expected behavior
That MacOS uses commands available by default on MacOS to get this data. Something like
ipconfig getifaddr $(route get default | awk '/interface: / {print $2}') and shasum.

Screenshots
If applicable, add screenshots to help explain your problem.

User Platform(please complete the following information):

  • OS: MacOS Arm64
  • Browser n/a
  • Version: 13

VECTR Host(please complete the following information):

  • Linux Distro: Ubuntu
  • Linux Version: 22.04
  • VECTR Version: 9.3.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions