Skip to content

Commit

Permalink
Merge pull request #301 from luotianqi777/fix_script
Browse files Browse the repository at this point in the history
fix: json2excel
  • Loading branch information
SuperChen-CC authored Jul 10, 2024
2 parents caff3e3 + 4f37cae commit 9fd7a95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/json2excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,10 @@ def json2excel(input: str, output: str):
vuls[vuln.id] = vuln
writer = pd.ExcelWriter(output)
# 保存组件
dep_df = pd.DataFrame([d.raw() for d in deps])
dep_df.columns = Dependency.col_name()
dep_df = pd.DataFrame([d.raw() for d in deps], columns=Dependency.col_name())
dep_df.to_excel(writer, sheet_name="Dependencies", index=False)
# 保存漏洞
vul_df = pd.DataFrame([v.raw() for v in vuls.values()])
vul_df.columns = Vulnerability.col_name()
vul_df = pd.DataFrame([v.raw() for v in vuls.values()], columns=Vulnerability.col_name())
vul_df.to_excel(writer, sheet_name="Vulnerabilities", index=False)
writer.close()

Expand Down

0 comments on commit 9fd7a95

Please sign in to comment.