Skip to content

Commit 9b58836

Browse files
committed
Fix vulnerable library
Signed-off-by: Ales Raszka <araszka@redhat.com>
1 parent e7b59cc commit 9b58836

File tree

2 files changed

+6
-71
lines changed

2 files changed

+6
-71
lines changed

local-dev/pip-audit-parse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ def parse_vulnerabilities_json(data: Dict[str, Any]) -> bool:
4242
if vulnerable_packages:
4343
print("Vulnerable packages found:")
4444
table = Table("Package", "Version", "Vulnerability", "Fixed version")
45-
to_update = []
45+
to_update = set()
4646
for package in vulnerable_packages:
4747
table.add_row(
4848
package["name"],
4949
package["version"],
5050
package["vulnerability"],
5151
",".join(package["fix"]),
5252
)
53-
to_update.append(package["name"])
53+
to_update.add(package["name"])
5454
console = Console()
5555
console.print(table)
56-
print(f"To fix, run:\npdm update {' '.join(to_update)} --update-reuse")
56+
print(f"To fix, run:\npdm update {' '.join(to_update)} --update-reuse")
5757
return False
5858
return True
5959

pdm.lock

Lines changed: 3 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)