Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Adds support for ClamAV #55

Merged
merged 10 commits into from Sep 16, 2022
Merged

Adds support for ClamAV #55

merged 10 commits into from Sep 16, 2022

Conversation

AntociAlin
Copy link
Member

Metadata

Proposed Changes

  • Implements the new ClamAV module for the new MutableSecurity structure.
  • Bug fixes to the already existing solutions.
  • Adds new categories: ANTIMALWARE and HOST_PROTECTION.

New Functioning

  • ClamAV is able to offer real-time protection to Ubuntu type OS.
  • It contains an easy to use and customizable crontab. It is used to run custom scans.
  • It contains a Start Scan action to run a custom scan in a given directory at will.
  • Every information and test can be easily seen and controlled.

This commit implements the refactored version of Let's Encrypt x
Certbot for the new MutableSecurity structure.

Resolves: #51

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
This commit fixes the issues flagged by George-Andrei Iosif
<georgeiosif@live.com>. There is one more issue left. The issue
represents the generation and revocation of certificates when the
user changes the domain or the email.

Resolves: #51

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
This commit implements the refactored version of ClamAV for the
new MutableSecurity structure. Furthermore, there have been a few
bug fixes to the other solutions, as well as adding new categories
for solutions. Those categories are ANTIMALWARE and HOST_PROTECTION.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
@AntociAlin AntociAlin changed the title Issue 54 Adds support for ClamAV Aug 28, 2022
Copy link
Member

@iosifache iosifache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GG, @AntociAlin!

I tested the module in an Ubuntu box. ClamAV works well!

There are some minor aspects that need to be done (beside the comments from code):

  1. Some information are deductible from clamconf's output. You can grep on it to determine the effective configuration, without marking the information as NON_DEDUCTIBLE.
  2. Please check the description to be correct (the text will appear on the website). In information, please avoid call to actions beside the actual description ("Please select" and "Please choose").
  3. The service is not used in this implementation, so you can disable it and delete the active_daemon service. clamd is used only for scanning incoming files to a socket (/var/run/clamav) or port (if the options TCPSocket and TCPAddr are set).
  4. Please verify where you use pyinfra's dedicated operations and not server.shell.
  5. I think you will need a rebase (or another Git magic). You pushed the Let's Encrypt commits too.

After these are done and pushed, we can move the module to production.

This commit fixes the description of ClamAV, the description of the
test_scan, added the freshclam and daemon description to the ClamAV
description, the typo from scan_day_of_week, added an exit code for
the scan action, deleted the tab from the files.py file for
Deepsource to not fail anymore.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
In this commit the daemon service is removed from ClamAV, the
reason behind this is the fact that it was redundant for the stage
of this implementation.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
This commit fixes two of the SET_INFORMATION functions to be able
to run everything more smoothly and without problems.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
This commit removes the Let's Encrypt commit from ClamAV to be able
to implement them separately.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
@AntociAlin
Copy link
Member Author

Fixed everything you asked. I am awaiting one more review and if everything runs smoothly, it should be ready to be pushed to main.

Apply auto-formatting and solves warnings/errors raised by Flake8 and
pylint.

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>
Changes the formatting of texts shown in user interfaces (both CLI
and documentation).

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>
Make the log retrieval command not raise errors if one of the cat-ed
files not exists.

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>
Copy link
Member

@iosifache iosifache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked the code and it seems fine. I made small changes, we can merge this branch on main!

@iosifache iosifache merged commit 7a7eb2e into main Sep 16, 2022
@iosifache iosifache deleted the issue-54 branch September 16, 2022 08:53
iosifache added a commit that referenced this pull request Sep 26, 2022
* Implements new Let's Encrypt x Certbot

This commit implements the refactored version of Let's Encrypt x
Certbot for the new MutableSecurity structure.

Resolves: #51

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Improves and fixes Let's Encrypt x Cerbot

This commit fixes the issues flagged by George-Andrei Iosif
<georgeiosif@live.com>. There is one more issue left. The issue
represents the generation and revocation of certificates when the
user changes the domain or the email.

Resolves: #51

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Implements new ClamAV

This commit implements the refactored version of ClamAV for the
new MutableSecurity structure. Furthermore, there have been a few
bug fixes to the other solutions, as well as adding new categories
for solutions. Those categories are ANTIMALWARE and HOST_PROTECTION.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Minor Fixes to ClamAV

This commit fixes the description of ClamAV, the description of the
test_scan, added the freshclam and daemon description to the ClamAV
description, the typo from scan_day_of_week, added an exit code for
the scan action, deleted the tab from the files.py file for
Deepsource to not fail anymore.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Removed the daemon service

In this commit the daemon service is removed from ClamAV, the
reason behind this is the fact that it was redundant for the stage
of this implementation.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Fixes redundant code and pyinfra functions

This commit fixes two of the SET_INFORMATION functions to be able
to run everything more smoothly and without problems.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Removes Let's Encrypt commit from ClamAV

This commit removes the Let's Encrypt commit from ClamAV to be able
to implement them separately.

Resolves: #54

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>

* Solves formatting issues

Apply auto-formatting and solves warnings/errors raised by Flake8 and
pylint.

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>

* Changes text shown in UIs

Changes the formatting of texts shown in user interfaces (both CLI
and documentation).

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>

* Make log retrieval command not rise error

Make the log retrieval command not raise errors if one of the cat-ed
files not exists.

Resolves: #54

Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>

Signed-off-by: AntociAlin <antoci.alin97@gmail.com>
Signed-off-by: George-Andrei Iosif <georgeiosif@live.com>
Co-authored-by: George-Andrei Iosif <georgeiosif@live.com>
@iosifache iosifache added the improvement Improvement label Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
improvement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants