tricks/scripts/check-scan-report

23 lines
449 B
Text
Raw Normal View History

#!/usr/bin/env python
import sys
from args import argument_parse
from oras import Oras
from trivy import Trivy
def main():
args = argument_parse()
oras = Oras(args.image, args.tag)
scan_report = oras.check_scan_report()
if not scan_report:
sys.exit(1)
trivy = Trivy(args.image, args.tag)
scan = trivy.scan_to_promote(image_src="remote")
if not scan:
sys.exit(1)
if __name__ == '__main__':
main()