Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scanner_py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Scanning images [████████████████░░░░] 8
```

- `✓` = Successful scans
- `✗` = Failed scans
- `✗` = Failed scans
- `🚫` = Skipped scans (unsigned images)

## Project Structure
Expand Down Expand Up @@ -275,4 +275,3 @@ This Python package is a port of the original bash scripts:
## License

MIT License - see LICENSE file for details.

1 change: 0 additions & 1 deletion scanner_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@
"AttestationExtractor",
"ChainguardVerifier",
]

1 change: 0 additions & 1 deletion scanner_py/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ def main() -> int:

if __name__ == "__main__":
sys.exit(main())

1 change: 0 additions & 1 deletion scanner_py/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ def main(argv: Optional[List[str]] = None) -> int:


__all__ = ["main", "create_main_parser"]

4 changes: 2 additions & 2 deletions scanner_py/cli/cosign_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def run_scan_image(args: argparse.Namespace) -> int:
if not args.dry_run:
spinner = Spinner("Verifying image signature...")
spinner.spin()

result = scanner.scan(args.image, dry_run=args.dry_run)

if result.success:
spinner.finish("Scan completed", success=True)
elif result.skipped:
Expand Down
10 changes: 5 additions & 5 deletions scanner_py/cli/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ def run_extract(args: argparse.Namespace) -> int:
if args.list:
spinner = Spinner("Discovering attestations...")
spinner.spin()

attestations = extractor.list_attestations(args.image)

if not attestations.attestations:
spinner.finish("No attestations found", success=False)
return 1

spinner.finish(f"Found {len(attestations.attestations)} attestation type(s)")
print()
print("━" * 50)
Expand All @@ -168,7 +168,7 @@ def run_extract(args: argparse.Namespace) -> int:
print()
print(f" {'Count':>5} {'Type':<12} URI")
print(" " + "─" * 45)

for pred_type, count in sorted(attestations.attestations.items()):
# Get friendly name
friendly_name = "unknown"
Expand Down Expand Up @@ -212,7 +212,7 @@ def run_extract(args: argparse.Namespace) -> int:

if content is None:
spinner.finish("Extraction failed", success=False)

if is_verbose():
print()
print("ℹ️ Available attestations for this image:")
Expand Down
Loading
Loading