Skip to main content

Python wrapper for Grype

Project description

PyGrype

A python wrapper for Grype

PyPI PyPI - Python Version PyPI - License

Status

Supported commands

  • completion
  • db
    • check
    • delete
    • diff
    • import
    • list
    • status
    • update
  • help
  • scan
  • version

Installation

install using pip

pip install pygrype

Usage

from pygrype.grype import Grype

image = 'alpine:3.12'
grype = Grype('/opt/grype')

version = grype.version()
print('Using Grype version {version}'.format(version=version['version']))

print('Updating DB...')
grype.db.update()

scan = grype.scan(image)
print('Image {image} has {matches} vlunerabilities'.format(
    image=image,
    matches=len(scan['matches'])))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygrype-0.1.3.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

pygrype-0.1.3-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page