github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/aws/ecr/ecr.go (about)

     1  package ecr
     2  
     3  import (
     4  	"github.com/khulnasoft-lab/defsec/pkg/providers/aws/iam"
     5  	defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types"
     6  )
     7  
     8  type ECR struct {
     9  	Repositories []Repository
    10  }
    11  
    12  type Repository struct {
    13  	Metadata           defsecTypes.Metadata
    14  	ImageScanning      ImageScanning
    15  	ImageTagsImmutable defsecTypes.BoolValue
    16  	Policies           []iam.Policy
    17  	Encryption         Encryption
    18  }
    19  
    20  type ImageScanning struct {
    21  	Metadata   defsecTypes.Metadata
    22  	ScanOnPush defsecTypes.BoolValue
    23  }
    24  
    25  const (
    26  	EncryptionTypeKMS    = "KMS"
    27  	EncryptionTypeAES256 = "AES256"
    28  )
    29  
    30  type Encryption struct {
    31  	Metadata defsecTypes.Metadata
    32  	Type     defsecTypes.StringValue
    33  	KMSKeyID defsecTypes.StringValue
    34  }