The project triggers a codebuild job which scans images using Sysdig Secure Vulnerability Agent an image when certain events occur. The project only listens for two types of events for two AWS Services - ECS & ECR.
{
"source": ["aws.ecr"],
"detail-type": ["ECR Image Action"],
"detail": {
"action-type":["PUSH"],
"result": ["SUCCESS"]
}
}
{
"source": ["aws.ecs"],
"detail-type": ["ECS Task State Change"],
"detail": {
"lastStatus":["PENDING"],
"desiredStatus":["RUNNING"]
}
}
Make sure you add the following values before building:
- AWS account ID
- AWS region
- Sysdig Secure Token
- Sysdig Secure URL
The following secrets should be setup in secrets managert SYSDIG_SECURE_TOKEN
and SYSDIG_SECURE_ENDPOINT
.
cd terraform/dev/event-scan
terraform apply
cd terraform/dev/event-scan
terraform destroy