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

Nettacker code base major refactoring #831

Closed
wants to merge 2 commits into from

Conversation

arkid15r
Copy link
Collaborator

Checklist

  • I have followed the Contributor Guidelines.
  • The code has been thoroughly tested in my local development environment with flake8 and pylint.
  • The code is Python 3 compatible.
  • The code follows the PEP8 styling guidelines with 4 spaces indentation.
  • This Pull Request relates to only one issue or only one feature
  • I have referenced the corresponding issue number in my commit message
  • I have added the relevant documentation.
  • My branch is up-to-date with the Upstream master branch.

Changes proposed in this pull request

This is a refactor of existing Nettacker code I've been working on recently.
The (incomplete) list of changes:

  • add pre-commit checks
  • apply OOP approach to the application architecture
  • consolidate common modules logic into a base class
  • extract YAML parsing logic into a separate module
  • fix some typos
  • get rid of (not all) misused try/except blocks
  • migrate to poetry, remove requirements.* files
  • re-design configuration module
  • re-design logging module
  • split application logic into classes
  • use pathlib for path related manipulations
  • use context-based naming for variables, modules, directories, etc
  • use module level imports (vs function level)
  • use the base class for specific protocol libraries

This is a refactor of existing Nettacker code I've been working on recently. The (incomplete) list of changes:

      - add pre-commit checks
      - apply OOP approach to the application architecture
      - consolidate common modules logic into a base class
      - extract YAML parsing logic into a separate module
      - fix some typos
      - get rid of (not all) misused try/except blocks
      - migrate to poetry, remove requirements.* files
      - re-design configuration module
      - re-design logging module
      - split application logic into classes
      - use `pathlib` for path related manipulations
      - use context-based naming for variables, modules, directories, etc
      - use module level imports (vs function level)
      - use the base class for specific protocol libraries
* SSL/TLS-Modules

Added the SSL/TLS modules to scan for ssl certificate vulnerabilities and to scan for old ssl/tls version or bad cipher suite.

* Refactor and reformat code

* Wrote new Tests

Wrote tests for ssl_version_scan and ssl_certificate_scan methods and also for some utility methods.

* Made the requested changes

Made all the name changes for consistency.
Made the requested changes to all asserts.
Rewrote the is_weak_cipher method in utils.

---------

Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
@arkid15r
Copy link
Collaborator Author

arkid15r commented Aug 8, 2024

Suppressed by #863

@arkid15r arkid15r closed this Aug 8, 2024
@arkid15r arkid15r deleted the major-refactoring branch August 26, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants