Amazon ECR에서 향상된 스캐닝에 대해 전송되는 EventBridge 이벤트
Amazon ECR에서 향상된 스캐닝에 대해 전송되는 EventBridge 이벤트
향상된 스캐닝이 켜지면 저장소의 스캔 빈도가 변경될 때 Amazon ECR이 EventBridge에 이벤트를 보내요. Amazon Inspector는 초기 스캔이 완료될 때와 이미지 스캔 결과가 생성, 갱신, 또는 종결될 때 EventBridge에 이벤트를 보내요.
출처: 문서
본문
저장소 스캔 빈도 변경 이벤트
레지스트리에 대해 향상된 스캐닝이 켜져 있으면, 향상된 스캐닝이 켜진 리소스에 변경이 있을 때 Amazon ECR이 다음 이벤트를 보내요. 여기에는 새 저장소가 생성되는 경우, 저장소의 스캔 빈도가 변경되는 경우, 또는 향상된 스캐닝이 켜진 저장소에서 이미지가 생성되거나 삭제되는 경우가 포함돼요. 자세한 내용은 'Amazon ECR에서 소프트웨어 취약점을 위해 이미지 스캔하기'를 참고해요.
{
"version": "0",
"id": "0c18352a-a4d4-6853-ef53-0abEXAMPLE",
"detail-type": "ECR Scan Resource Change",
"source": "aws.ecr",
"account": "123456789012",
"time": "2021-10-14T20:53:46Z",
"region": "us-east-1",
"resources": [],
"detail": {
"action-type": "SCAN_FREQUENCY_CHANGE",
"repositories": [{
"repository-name": "repository-1",
"repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-1",
"scan-frequency": "SCAN_ON_PUSH",
"previous-scan-frequency": "MANUAL"
},
{
"repository-name": "repository-2",
"repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-2",
"scan-frequency": "CONTINUOUS_SCAN",
"previous-scan-frequency": "SCAN_ON_PUSH"
},
{
"repository-name": "repository-3",
"repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-3",
"scan-frequency": "CONTINUOUS_SCAN",
"previous-scan-frequency": "SCAN_ON_PUSH"
}
],
"resource-type": "REPOSITORY",
"scan-type": "ENHANCED"
}
}
초기 이미지 스캔 이벤트 (향상된 스캐닝)
레지스트리에 대해 향상된 스캐닝이 켜져 있으면 초기 이미지 스캔이 완료될 때 Amazon Inspector가 다음 이벤트를 보내요. finding-severity-counts 매개 변수는 심각도 수준이 존재하는 경우에만 그 수준에 대한 값을 반환해요. 예를 들어 이미지에 CRITICAL 수준의 결과가 없으면 critical 개수가 반환되지 않아요. 자세한 내용은 'Amazon ECR에서 OS 및 프로그래밍 언어 패키지 취약점을 위해 이미지 스캔하기'를 참고해요.
이벤트 패턴:
{
"source": ["aws.inspector2"],
"detail-type": ["Inspector2 Scan"]
}
예시 출력:
{
"version": "0",
"id": "739c0d3c-4f02-85c7-5a88-94a9EXAMPLE",
"detail-type": "Inspector2 Scan",
"source": "aws.inspector2",
"account": "123456789012",
"time": "2021-12-03T18:03:16Z",
"region": "us-east-2",
"resources": [
"arn:aws:ecr:us-east-2:123456789012:repository/amazon/amazon-ecs-sample"
],
"detail": {
"scan-status": "INITIAL_SCAN_COMPLETE",
"repository-name": "arn:aws:ecr:us-east-2:123456789012:repository/amazon/amazon-ecs-sample",
"finding-severity-counts": {
"CRITICAL": 7,
"HIGH": 61,
"MEDIUM": 62,
"TOTAL": 158
},
"image-digest": "sha256:36c7b282abd0186e01419f2e58743e1bf635808231049bbc9d77e5EXAMPLE",
"image-tags": [
"latest"
]
}
}
이미지 스캔 결과 갱신 이벤트 (향상된 스캐닝)
레지스트리에 대해 향상된 스캐닝이 켜져 있으면 이미지 스캔 결과가 생성, 갱신, 또는 종결될 때 Amazon Inspector가 다음 이벤트를 보내요. 자세한 내용은 'Amazon ECR에서 OS 및 프로그래밍 언어 패키지 취약점을 위해 이미지 스캔하기'를 참고해요.
이벤트 패턴:
{
"source": ["aws.inspector2"],
"detail-type": ["Inspector2 Finding"]
}
예시 출력:
{
"version": "0",
"id": "42dbea55-45ad-b2b4-87a8-afaEXAMPLE",
"detail-type": "Inspector2 Finding",
"source": "aws.inspector2",
"account": "123456789012",
"time": "2021-12-03T18:02:30Z",
"region": "us-east-2",
"resources": [
"arn:aws:ecr:us-east-2:123456789012:repository/amazon/amazon-ecs-sample/sha256:36c7b282abd0186e01419f2e58743e1bf635808231049bbc9d77eEXAMPLE"
],
"detail": {
"awsAccountId": "123456789012",
"description": "In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds check, enabling an attacker to specify an arbitrary (out-of-bounds) offset for a subsequent memory read. A crafted SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server.",
"findingArn": "arn:aws:inspector2:us-east-2:123456789012:finding/be674aaddd0f75ac632055EXAMPLE",
"firstObservedAt": "Dec 3, 2021, 6:02:30 PM",
"inspectorScore": 6.5,
"inspectorScoreDetails": {
"adjustedCvss": {
"adjustments": [],
"cvssSource": "REDHAT_CVE",
"score": 6.5,
"scoreSource": "REDHAT_CVE",
"scoringVector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
"version": "3.0"
}
},
"lastObservedAt": "Dec 3, 2021, 6:02:30 PM",
"packageVulnerabilityDetails": {
"cvss": [
{
"baseScore": 6.5,
"scoringVector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
"source": "REDHAT_CVE",
"version": "3.0"
},
{
"baseScore": 5.8,
"scoringVector": "AV:N/AC:M/Au:N/C:P/I:N/A:P",
"source": "NVD",
"version": "2.0"
},
{
"baseScore": 8.1,
"scoringVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H",
"source": "NVD",
"version": "3.1"
}
],
"referenceUrls": [
"https://access.redhat.com/errata/RHSA-2020:3915"
],
"source": "REDHAT_CVE",
"sourceUrl": "https://access.redhat.com/security/cve/CVE-2019-17498",
"vendorCreatedAt": "Oct 16, 2019, 12:00:00 AM",
"vendorSeverity": "Moderate",
"vulnerabilityId": "CVE-2019-17498",
"vulnerablePackages": [
{
"arch": "X86_64",
"epoch": 0,
"name": "libssh2",
"packageManager": "OS",
"release": "12.amzn2.2",
"sourceLayerHash": "sha256:72d97abdfae3b3c933ff41e39779cc72853d7bd9dc1e4800c5294dEXAMPLE",
"version": "1.4.3"
}
]
},
"remediation": {
"recommendation": {
"text": "Update all packages in the vulnerable packages section to their latest versions."
}
},
"resources": [
{
"details": {
"awsEcrContainerImage": {
"architecture": "amd64",
"imageHash": "sha256:36c7b282abd0186e01419f2e58743e1bf635808231049bbc9d77e5EXAMPLE",
"imageTags": [
"latest"
],
"platform": "AMAZON_LINUX_2",
"pushedAt": "Dec 3, 2021, 6:02:13 PM",
"lastInUseAt": "Dec 3, 2021, 6:02:13 PM",
"inUseCount": 1,
"registry": "123456789012",
"repositoryName": "amazon/amazon-ecs-sample"
}
},
"id": "arn:aws:ecr:us-east-2:123456789012:repository/amazon/amazon-ecs-sample/sha256:36c7b282abd0186e01419f2e58743e1bf635808231049bbc9d77EXAMPLE",
"partition": "N/A",
"region": "N/A",
"type": "AWS_ECR_CONTAINER_IMAGE"
}
],
"severity": "MEDIUM",
"status": "ACTIVE",
"title": "CVE-2019-17498 - libssh2",
"type": "PACKAGE_VULNERABILITY",
"updatedAt": "Dec 3, 2021, 6:02:30 PM"
}
}