{"id":17281555,"url":"https://github.com/markusl/cdk-ecr-image-scan-handler","last_synced_at":"2025-11-07T07:03:25.528Z","repository":{"id":37280995,"uuid":"284711362","full_name":"markusl/cdk-ecr-image-scan-handler","owner":"markusl","description":"AWS CDK module to easily get alerts from ECR image scan findings.","archived":false,"fork":false,"pushed_at":"2023-07-18T23:07:31.000Z","size":8546,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T10:18:09.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markusl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-03T13:44:46.000Z","updated_at":"2024-05-15T21:46:44.000Z","dependencies_parsed_at":"2025-02-25T04:33:09.800Z","dependency_job_id":"e571c593-1c9b-4bbe-941e-24c5991e39f5","html_url":"https://github.com/markusl/cdk-ecr-image-scan-handler","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/markusl/cdk-ecr-image-scan-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusl%2Fcdk-ecr-image-scan-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusl%2Fcdk-ecr-image-scan-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusl%2Fcdk-ecr-image-scan-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusl%2Fcdk-ecr-image-scan-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markusl","download_url":"https://codeload.github.com/markusl/cdk-ecr-image-scan-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusl%2Fcdk-ecr-image-scan-handler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262437974,"owners_count":23311066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T09:46:12.700Z","updated_at":"2025-11-07T07:03:20.509Z","avatar_url":"https://github.com/markusl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/cdk-ecr-image-scan-handler.svg)](https://badge.fury.io/js/cdk-ecr-image-scan-handler)\n![Release](https://github.com/markusl/cdk-ecr-image-scan-handler/workflows/Release/badge.svg)\n\n# cdk-ecr-image-scan-handler\n\n[Amazon ECR image scanning](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) helps in identifying software vulnerabilities in your container images.\n\nWith this CDK construct you can get automated notifications from ECR images that contain security findings when the AWS ECR image scan finishes.\n\n## Usage\n\nIn your ECR repository setup, create a SNS topic:\n\n```ts\n  const onImageScanCompletedTopic = new sns.Topic(stack, 'RepositoryScanTopic', {\n    topicName: 'ecr-repository-scan-completed-topic',\n    displayName: 'Notifications about ECR Repository scans',\n  });\n```\n\nHook each ECR repository to report image scan results to the previously created topic:\n\n```ts\n  const ecrRepository = new ecr.Repository(stack, 'DemoEcrRepository', {\n    repositoryName: name,\n    imageScanOnPush: true,\n  });\n  ecrRepository.onImageScanCompleted('DemoScanCompleted', {\n    target: new targets.SnsTopic(onImageScanCompletedTopic),\n  });\n```\n\n### Microsoft Teams reporting for ECR Image scan\n\nTo get notifications using Microsoft Teams Webhook, set up the handler for the previously created topic:\n\n```ts\nimport { EcrImageScanTeamsWebhookHandler } from 'cdk-ecr-image-scan-handler';\n\nconst mockApp = new App();\nconst stack = new Stack(mockApp, 'app-stack');\n\nnew EcrImageScanTeamsWebhookHandler(stack, 'ecr-scan-result-handler', {\n  webhookUrl: 'https://outlook.office.com/webhook/xxxxx',\n  notificationTopicArn: 'arn:aws:sns:eu-central-1:112233445566:ecr-repository-scan-completed-topic',\n});\n```\n\n### Email results for ECR Image scan\n\nTo get reports via email, set up the handler for the previously created topic:\n\n```ts\nimport { EcrImageScanResultHandler } from 'cdk-ecr-image-scan-handler';\n\nconst mockApp = new App();\nconst stack = new Stack(mockApp, 'app-stack');\n\nnew EcrImageScanResultHandler(stack, 'ecr-scan-result-handler', {\n  fromAddress: 'from@address.com', // Use SES for validating the addresses\n  toAddress: 'to@address.com',\n  notificationTopicArn: 'arn:aws:sns:eu-central-1:112233445566:ecr-repository-scan-completed-topic',\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusl%2Fcdk-ecr-image-scan-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkusl%2Fcdk-ecr-image-scan-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusl%2Fcdk-ecr-image-scan-handler/lists"}