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

DTT1 - System command requirements #5323

Closed
3 tasks done
pro-akim opened this issue May 2, 2024 · 3 comments · Fixed by #5338
Closed
3 tasks done

DTT1 - System command requirements #5323

pro-akim opened this issue May 2, 2024 · 3 comments · Fixed by #5338
Assignees

Comments

@pro-akim
Copy link
Member

pro-akim commented May 2, 2024

Description

The modules developed use some system command in the host to execute some actions, for example, to deploy a macOS VM, it is needed to run the ssh-keygen command to generate a key pair

In the future, all of those commands will be improved with a check control to ensure that the command exists in the host where it is going to be executed, but we need to add them as dependencies in the documentation so we can have a clear insight of some requirements

This documentation is not intended to document remote commands executed in the testing instances, but on all of those hosts, like macStadium or the self-host where the module is being executed (i.e. my computer)

Note that the commands that run on the test instances are expected to be installed; If the test fails due to a missing command, then an issue should be opened, but we want to prevent the execution of the module itself from failing. Even if we don't have a control structure yet, we should document them.

We also need to specify in the modules documentation that it works and has been tested in an Ubuntu 22 system, the Python3 version used in 3.10.12 and the Python3 pip3 version is 22.0.2

Tasks

  • Create a list that must contain all commands that are executed in the host for each module, including the engine
  • Add this information in the README file of each module
  • Add OS and Python version requirements to each README file
@pro-akim pro-akim transferred this issue from wazuh/wazuh May 2, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 May 3, 2024
@mhamra
Copy link
Contributor

mhamra commented May 3, 2024

List of commands

General commands

  • python3

Linux

General

  • sed
  • systemctl
  • cat
  • rm
  • pgrep
  • ss
  • grep
  • test
  • find
  • shasum
  • bash

'rpm'

  • curl
  • rpm
  • yum

'deb'

  • wget
  • sudo
  • dpkg
  • apt-get

Opensus / Suse

  • zypper

MacOS

  • sed
  • pgrep
  • curl
  • echo
  • sudo
  • installer
  • netstat
  • stat
  • pfctl
  • grep
  • find
  • shasum
  • launchctl

Windows

  • Get-Content
  • Set-Content
  • msiexec.exe
  • Get-Process
  • Format-Table
  • netstat
  • Select-String
  • Test-Path
  • Set-NetFirewallProfile
  • Get-FileHash
  • Get-ChildItem
  • Get-Service
  • NET STOP
  • NET START

@rauldpm rauldpm changed the title DTT1 - Test Module - System command requirements DTT1 - System command requirements May 3, 2024
@mhamra
Copy link
Contributor

mhamra commented May 3, 2024

List of required host commands

This is the list of commands that each module may execute on the host.

Allocator Module

  • ssh
  • ssh-keygen
  • sshpass
  • cat
  • vagrant
  • chmod

Testing Module

  • ssh
  • scp

@mhamra mhamra linked a pull request May 3, 2024 that will close this issue
@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 May 3, 2024
@rauldpm
Copy link
Member

rauldpm commented May 3, 2024

LGTM

@rauldpm rauldpm closed this as completed May 3, 2024
@wazuhci wazuhci moved this from Pending review to Done in Release 4.9.0 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants