Skip to content

Commit

Permalink
restructuring and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
topscoder committed May 16, 2024
1 parent 62b1b4e commit 0b93ec8
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
exclude: '(README.md)'
args:
- --maxkb=120
- --enforce-all
File renamed without changes.
2 changes: 0 additions & 2 deletions lib/colors.py → src/lib/colors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
def red(skk):
return "\033[91m{}\033[00m" .format(skk)


def green(skk):
return "\033[92m{}\033[00m" .format(skk)


def yellow(skk):
return "\033[93m{}\033[00m" .format(skk)
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/logger.py → src/lib/logger.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import logging


logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
Empty file added src/lib/parsers/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
from yaml import safe_load

from lib.parsers.ParserInterface import ParserInterface
from lib.parsers.parser_interface import ParserInterface


class WordfenceAPIParser(ParserInterface):
Expand Down Expand Up @@ -281,7 +281,7 @@ def determine_severity(self, title, initial_rating, description) -> str:
score = SEVERITY_MEDIUM

if "Authenticated" in title or "authenticated" in title:
if not "Unauthenticated" in title and not "unauthenticated" in title:
if "Unauthenticated" not in title and "unauthenticated" not in title:
# Down-scale the score to Low if it's an "Authenticated" vulnerability
score = SEVERITY_LOW

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions scripts/parse.readme.py → src/scripts/parse.readme.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import glob
import re
import glob

import os

plugins = 0
themes = 0
Expand Down
File renamed without changes.

0 comments on commit 0b93ec8

Please sign in to comment.