From 92765fee2dd444b16b4261fed912db15e6057f38 Mon Sep 17 00:00:00 2001 From: topscoder <86197446+topscoder@users.noreply.github.com> Date: Thu, 16 May 2024 15:46:25 +0200 Subject: [PATCH] refactoring --- .github/workflows/wordfence-crawler.yml | 6 +++--- src/lib/parsers/parser_interface.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 src/lib/parsers/parser_interface.py diff --git a/.github/workflows/wordfence-crawler.yml b/.github/workflows/wordfence-crawler.yml index 4d1e6e1ff1..d700485e6e 100644 --- a/.github/workflows/wordfence-crawler.yml +++ b/.github/workflows/wordfence-crawler.yml @@ -24,14 +24,14 @@ jobs: pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - # run main.py for API if there are new vulns found + # run src/main.py for API if there are new vulns found - name: Process vulnerabilities of Wordfence API source (production) run: | - python main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production + python src/main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production - name: Process vulnerabilities of Wordfence API source (scanner aka fresh/unfinished issues) run: | - python main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner + python src/main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner - name: Commit new vulnerability templates run: | diff --git a/src/lib/parsers/parser_interface.py b/src/lib/parsers/parser_interface.py new file mode 100644 index 0000000000..12e8b0275b --- /dev/null +++ b/src/lib/parsers/parser_interface.py @@ -0,0 +1,3 @@ +class ParserInterface: + def run(self, url, outputfile=None, overwrite=False, force=False, overwrite_enhanced=False) -> bool: + pass \ No newline at end of file