-
Notifications
You must be signed in to change notification settings - Fork 0
/
vuln_scanner.py
28 lines (20 loc) · 851 Bytes
/
vuln_scanner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import argparse
import uploader
from code_generator import strategic_iterator
from code_generator.openai_util import set_api_key
from code_generator.model.context import Context
def main():
# Change the script working directory to the main file directory
main_file_directory = os.path.dirname(os.path.abspath(__file__))
os.chdir(main_file_directory)
set_api_key() # Set the OpenAI API key from the environment variable
parser = argparse.ArgumentParser(description="Vulnerability scanner Tool")
parser.add_argument("--project_path", type=str,
help="Path to the existing project on disk")
parser.add_argument("--samples", type=int,
help="if specified, process only N source files")
args = parser.parse_args()
uploader.upload_code(args)
if __name__ == "__main__":
main()