Skip to content

Commit 338e374

Browse files
committed
add org and repo to repo summary json output
1 parent 2045f3b commit 338e374

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cloudsmith_cli/cli/commands/vulnerabilities.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,16 @@ def vulnerabilities(
321321
)
322322
return
323323

324-
if utils.maybe_print_as_json(opts, repo_summary_rows):
324+
json_output = {
325+
"owner": owner,
326+
"repository": repo,
327+
"packages": [
328+
{"package": label, "vulnerabilities": counts}
329+
for label, counts in repo_summary_rows
330+
],
331+
}
332+
333+
if utils.maybe_print_as_json(opts, json_output):
325334
return
326335

327336
_print_repo_summary_table(repo_summary_rows, severity_filter)

0 commit comments

Comments
 (0)