This topic describes the Container Registry events that can be recorded by ActionTrail and published to EventBridge.
Events
The following table describes the Container Registry events that can be published to EventBridge.
Event | Value of the type parameter |
---|---|
An image is built | cr:Artifact:BuildCompleted |
A delivery chain is executed | cr:Artifact:DeliveryChainCompleted |
An image is scanned | cr:Artifact:ScanCompleted |
An image is signed | cr:Artifact:SigningCompleted |
An image is synchronized | cr:Artifact:SynchronizationCompleted |
An operation is performed on a resource | cr:ActionTrail:AliyunServiceEvent |
An API operation is called | cr:ActionTrail:ApiCall |
An operation is performed in the console | cr:ActionTrail:ConsoleOperation |
For more information about the parameters defined in the CloudEvents specification, see Overview.
An image is built
The following example shows the event that EventBridge receives when an image is built:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.cr",
"specversion": "1.0",
"subject": "acs.cr:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "cr:Artifact:BuildCompleted",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"InstanceName": "sirong-tongbu-hangzhou",
"RepoNamespaceName": "scan",
"RepoBuildType": "AUTO_BUILD",
"InstanceId": "cri-4jga79lyszik****",
"RepoName": "mix-vuls",
"BuildStatus": "SUCCESS",
"ImageUpdate": "2021-11-15 20:49:40",
"RegionId": "cn-hangzhou",
"Tag": "mix-vuls",
"RepoId": "crr-8441203b7uzi****"
}
The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
---|---|---|---|
InstanceName | String | sirong-tongbu-hangzhou | The name of the instance. |
RepoNamespaceName | String | scan | The namespace to which the image repository belongs. |
RepoBuildType | String | AUTO_BUILD | The type of the image building operation. |
InstanceId | String | cri-4jga79lyszik**** | The ID of the instance. |
RepoName | String | mix-vuls | The name of the image repository. |
BuildStatus | String | SUCCESS | The status of the image building operation. |
ImageUpdate | String | 2021-11-15 20:49:40 | The time when the image was updated. |
RegionId | String | cn-hangzhou | The ID of the region in which the image repository resides. |
Tag | String | mix-vuls | The tag of the image. |
RepoId | String | crr-8441203b7uzi**** | The ID of the image repository. |
A delivery chain is executed
The following example shows the event that EventBridge receives when a delivery chain is executed:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.cr",
"specversion": "1.0",
"subject": "acs.cr:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "cr:Artifact:DeliveryChainCompleted",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"InstanceName": "sirong-tongbu-hangzhou",
"RepoNamespaceName": "a1",
"ChainInstanceId": "EF7394D6-C2B3-1A4B-9FA0-B11B41F7****",
"EndTime": "2021-11-18 19:13:52",
"InstanceId": "cri-4jga79lyszik****",
"RepoName": "centos-7",
"RegionId": "cn-hangzhou",
"RepoId": "crr-wwgobtf1moat****",
"Result": "SUCCESS"
}
}
The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
---|---|---|---|
InstanceName | String | sirong-tongbu-hangzhou | The name of the instance. |
RepoNamespaceName | String | a1 | The namespace to which the image repository belongs. |
ChainInstanceId | String | EF7394D6-C2B3-1A4B-9FA0-B11B41F7**** | The ID of the delivery chain execution instance. |
EndTime | String | 2021-11-18 19:13:52 | The time when the delivery chain execution was finished. |
InstanceId | String | cri-4jga79lyszik**** | The ID of the instance. |
RepoName | String | centos-7 | The name of the image repository. |
RegionId | String | cn-hangzhou | The ID of the region in which the image repository resides. |
RepoId | String | crr-wwgobtf1moat**** | The ID of the image repository. |
Result | String | SUCCESS | The result of the delivery chain execution. |
An image is scanned
The following example shows the event that EventBridge receives when an image is scanned:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.cr",
"specversion": "1.0",
"subject": "acs.cr:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "cr:Artifact:ScanCompleted",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"Status": "COMPLETE",
"RepoNamespaceName": "scan",
"EndTime": "2021-11-15 19:30:25",
"InstanceId": "cri-4jga79lyszik****",
"RepoName": "ruby-2.4.0",
"HighSeverity": 950,
"UnknownSeverity": 52,
"TotalSeverity": 2355,
"InstanceName": "sirong-tongbu-hangzhou",
"LowSeverity": 35,
"MediumSeverity": 1318,
"RegionId": "cn-hangzhou",
"Tag": "ruby-2.4.0",
"RepoId": "crr-7a41mq93xymk****"
}
}
The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
---|---|---|---|
Status | String | COMPLETE | The status of the image scan operation. |
RepoNamespaceName | String | scan | The namespace to which the image repository belongs. |
EndTime | String | 2021-11-15 19:30:25 | The time at which the image scan was finished. |
InstanceId | String | cri-4jga79lyszik**** | The ID of the instance. |
RepoName | String | ruby-2.4.0 | The name of the image repository. |
HighSeverity | Int | 950 | The number of high-severity vulnerabilities. |
UnknownSeverity | Int | 52 | The number of unrated vulnerabilities. |
TotalSeverity | Int | 2355 | The total number of vulnerabilities. |
InstanceName | String | sirong-tongbu-hangzhou | The name of the instance. |
LowSeverity | Int | 35 | The number of low-severity vulnerabilities. |
MediumSeverity | Int | 1318 | The number of medium-severity vulnerabilities. |
RegionId | String | cn-hangzhou | The ID of the region in which the image repository resides. |
Tag | String | ruby-2.4.0 | The tag of the image. |
RepoId | String | crr-7a41mq93xymk**** | The ID of the image repository. |
An image is signed
The following example shows the event that EventBridge receives when an image is signed:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.cr",
"specversion": "1.0",
"subject": "acs.cr:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "cr:Artifact:SigningCompleted",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"InstanceName": "test-8-30",
"RepoNamespaceName": "scan",
"InstanceId": "cri-jhklm6d6o7cp****",
"RepoName": "for-scan-local",
"FailureMessage": "",
"RegionId": "cn-hangzhou",
"Tag": "1.0",
"RepoId": "crr-2dk58uw7gfjw****",
"Result": "SUCCESS"
}
}
The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
---|---|---|---|
InstanceName | String | test-8-30 | The name of the instance. |
RepoNamespaceName | String | scan | The namespace to which the image repository belongs. |
InstanceId | String | cri-jhklm6d6o7cp**** | The ID of the instance. |
RepoName | String | for-scan-local | The name of the image repository. |
FailureMessage | String | The failure information. | |
RegionId | String | cn-hangzhou | The ID of the region in which the image repository resides. |
Tag | String | 1.0 | The tag of the image. |
RepoId | String | crr-2dk58uw7gfjw**** | The ID of the image repository. |
Result | String | SUCCESS | The result of the image signing operation. |
An image is synchronized
The following example shows the event that EventBridge receives when an image is synchronized:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.cr",
"specversion": "1.0",
"subject": "acs.cr:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "cr:Artifact:SynchronizationCompleted",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"SyncRuleId": "crsr-goyv4w2rylmx****",
"ImageFrom": {
"RepoNamespaceName": "scan",
"ImageTag": "mix-vuls",
"InstanceId": "cri-4jga79lyszik****",
"RepoName": "mix-vuls",
"RegionId": "cn-hangzhou"
},
"EndTime": "2021-11-15 20:49:40",
"TaskTrigger": "PASSIVE",
"StartTime": "2021-11-15 20:49:40",
"ImageTo": {
"RepoNamespaceName": "scan",
"ImageTag": "mix-vuls",
"InstanceId": "cri-roa3mwdsq4nz****",
"RepoName": "mix-vuls",
"RegionId": "ap-southea****"
},
"SyncBatchTaskId": "9CC83523-0834-1B25-BEC2-4BE8AA18****",
"TaskStatus": "SUCCESS",
"SyncTaskId": "rst-uce0qfbyuaw7****"
}
}
The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
---|---|---|---|
SyncRuleId | String | crsr-goyv4w2rylmx**** | The ID of the synchronization rule. |
ImageFrom | Map | The information about the source image. | |
EndTime | String | 2021-11-15 20:49:40 | The time when the synchronization was finished. |
TaskTrigger | String | PASSIVE | The mode in which the synchronization is triggered. |
StartTime | String | 2021-11-15 20:49:40 | The time when the synchronization was started. |
ImageTo | Map | The information about the destination image. | |
RepoNamespaceName | String | scan | The namespace to which the image repository belongs. |
ImageTag | String | mix-vuls | The tag of the image. |
InstanceId | String | cri-roa3mwdsq4nz**** | The ID of the instance. |
RepoName | String | mix-vuls | The name of the image repository. |
RegionId | String | ap-southea**** | The ID of the region in which the image repository resides. |
SyncBatchTaskId | String | 9CC83523-0834-1B25-BEC2-4BE8AA18**** | The ID of the synchronization batch. |
TaskStatus | String | SUCCESS | The result of the synchronization task. |
SyncTaskId | String | rst-uce0qfbyuaw7**** | The ID of the synchronization task. |