fix: 修改结果保存路径
Some checks failed
Vulnerability and Backdoor Detection Workflow / build (pull_request) Successful in 15s
Vulnerability and Backdoor Detection Workflow / security_check (pull_request) Failing after 12m28s
Some checks failed
Vulnerability and Backdoor Detection Workflow / build (pull_request) Successful in 15s
Vulnerability and Backdoor Detection Workflow / security_check (pull_request) Failing after 12m28s
This commit is contained in:
parent
37d5c80724
commit
4bafab90f4
@ -72,7 +72,8 @@ def output_results(
|
||||
results: Dict[str, List[Tuple[int, str]]], output_format: str, file_path: str
|
||||
):
|
||||
# Create the 'results' directory if it does not exist
|
||||
results_dir = "../results/code"
|
||||
# 这里如果集成测试的话应该设置为./
|
||||
results_dir = "./results/code"
|
||||
if not os.path.exists(results_dir):
|
||||
os.makedirs(results_dir)
|
||||
|
||||
|
@ -72,8 +72,9 @@ def check_vulnerabilities(requirements, vulnerabilities, output_format):
|
||||
results.append(f"OK: {req_name}=={req_version} is not affected.")
|
||||
else:
|
||||
results.append(f"OK: {req_name} not found in the vulnerability database.")
|
||||
# 集成测试这里应该修改为./
|
||||
output_results(
|
||||
"../results/requirements/results." + output_format, results, output_format
|
||||
"./results/requirements/results." + output_format, results, output_format
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user