AWS ECR image scanning using Python, AWS ECR tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2023
  • How to automate ECR image scanning using Python
    #ecr #scanning #aws #python #awstutorial #ecrtutorial
    Source code: github.com/CodeSam621/Demo/tr...
    AWS CLI for ECR: awscli.amazonaws.com/v2/docum...
    Setup AWS CLI: docs.aws.amazon.com/cli/lates...

ความคิดเห็น • 6

  • @Devops1986
    @Devops1986 6 หลายเดือนก่อน

    Would be possible now to check if the ECR images with some Critical vulnerabilities are in use on ECS?

    • @lovetocode4486
      @lovetocode4486  5 หลายเดือนก่อน

      Hey mate,
      I am really not sure. But this article could help on your query repost.aws/questions/QUDRMHIEVcRIS04Gq-0W_3zA/how-do-we-know-what-ecr-images-are-being-used-and-which-are-not

  • @prashantsukhadeve9642
    @prashantsukhadeve9642 ปีที่แล้ว +1

    Can we automate it via jenkins pipeline

    • @lovetocode4486
      @lovetocode4486  ปีที่แล้ว

      Hey @prashantsukhadeve9642 ,
      Sorry I am not comfortable with Jenkins. This article could help you linuxhint.com/run-python-script-from-jenkins/
      Thanks.

  • @kingstonxavier
    @kingstonxavier ปีที่แล้ว

    I'm getting an error at line 50 KeyError: 'findings'

    • @lovetocode4486
      @lovetocode4486  ปีที่แล้ว

      Hi @king,
      I believe the variable (`json_finding_result`) doesn't have this key 'findings'. Please try to print `json_finding_result` and see what is in there.
      eg:
      def finding_vulnarablity(repo_name, json_finding_result):
      print(json_finding_result) # PRINT THE json_finding_result to see
      print_to_json( json_finding_result['imageScanFindings']['findings'])
      for result in json_finding_result['imageScanFindings']['findings']:
      if(result['severity'] == "CRITICAL"):
      item = Vulnurability()
      item.repo_name = repo_name
      item.uri = result['uri']
      list_critical.append(item)
      attributes = result['attributes']