Keep token scan output focused on item rows
This commit is contained in:
@@ -830,20 +830,21 @@ def run_tokens_scan(config: WorkspaceConfig, args: argparse.Namespace) -> None:
|
||||
store_servers = token_data.get("servers", {})
|
||||
endpoint_names = sorted(set(repo_servers) | set(store_servers))
|
||||
|
||||
print_token_context(repo_root, config, repo_servers, store_servers, len(endpoint_names))
|
||||
print()
|
||||
print("scan")
|
||||
print("item\tvalue")
|
||||
print(f"remotes\t{report['remotes']}")
|
||||
print(f"urls\t{report['urls']}")
|
||||
print(f"scanned\t{report['scanned']}")
|
||||
print(f"auth_urls\t{report['auth_urls']}")
|
||||
print(f"plain_urls\t{report['plain_urls']}")
|
||||
print(f"unsupported_urls\t{report['unsupported_urls']}")
|
||||
print(f"found\t{report['found']}")
|
||||
print(f"added\t{report['added']}")
|
||||
print(f"servers\t{report['servers']}")
|
||||
print()
|
||||
if args.verbose:
|
||||
print_token_context(repo_root, config, repo_servers, store_servers, len(endpoint_names))
|
||||
print()
|
||||
print("scan")
|
||||
print("item\tvalue")
|
||||
print(f"remotes\t{report['remotes']}")
|
||||
print(f"urls\t{report['urls']}")
|
||||
print(f"scanned\t{report['scanned']}")
|
||||
print(f"auth_urls\t{report['auth_urls']}")
|
||||
print(f"plain_urls\t{report['plain_urls']}")
|
||||
print(f"unsupported_urls\t{report['unsupported_urls']}")
|
||||
print(f"found\t{report['found']}")
|
||||
print(f"added\t{report['added']}")
|
||||
print(f"servers\t{report['servers']}")
|
||||
print()
|
||||
print_token_item_rows(endpoint_names, repo_servers, store_servers, report["remote_rows"])
|
||||
|
||||
|
||||
@@ -1380,6 +1381,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help="Scan remote URLs in a git repo and save discovered credentials into tokens.json.",
|
||||
)
|
||||
add_repo_option(tokens_scan_parser)
|
||||
tokens_scan_parser.add_argument("--verbose", action="store_true", help="Print context and scan counters before item rows.")
|
||||
|
||||
tokens_read_parser = tokens_subparsers.add_parser(
|
||||
"read",
|
||||
|
||||
Reference in New Issue
Block a user