WoTTsecurity / agent

Simple security audit for linux systems
https://wott.io/
MIT License
22 stars 12 forks source link

Implement functinality to patch system based on recommended actions #257

Open vpetersson opened 4 years ago

vpetersson commented 4 years ago

We want to make it easy for users to patch their systems by having a simple one-liner to do this. Unfortunately, this can become somewhat troublesome when you have different configurations across the fleet.

As such, we want to extend the CLI for easier patching of packages.

We want to keep this as dynamic as possible. Hence, we could do something similar to wott-agent patch $ID, where $ID is the issue from the backend. This could either be CVE or a change.

Here's an example of how I envision a run to look like:

Example of patching a service.

$ sudo wott-agent patch 222

The patch will make the following changes to /etc/ssh/sshd_config

-#PasswordAuthentication yes
+PasswordAuthentication no

After the change, we will automatically restart the SSH daemon.

Do you want to apply the changes (Y/n)?
[...]

Example of upgrading packages/patching for CVE.

$ sudo wott-agent patch 223

The following packages will be upgraded as part of CVE-XYZ:

* colordiff
* libgdbm-compat4
* libgdbm5
* libperl5.26
* netbase
* perl
* perl-modules-5.26

Please note that upgrading packages may cause them the service(s) to restart.

Do you want to apply the changes (Y/n)?
[...]

Considerations:

vpetersson commented 4 years ago

We want to demo this for an investor, so let's take some shortcuts to get the alpha version of this working. Here are some shortcuts:

Outstanding tasks for MVP after #263:

vpetersson commented 4 years ago

MVP is done Sprint 16. We've received great feedback on this. Now we need to revisit the original scope in Sprint 17.

vpetersson commented 4 years ago

We need to resume work on this. As next steps, I want to do the following:

Next sprint

rptrchv commented 4 years ago

13 complexity points

a-martynovich commented 4 years ago

20