Skip to content

Commit

Permalink
Merge branch 'main' into add_github_branch_protection
Browse files Browse the repository at this point in the history
  • Loading branch information
eliecharra authored Mar 2, 2021
2 parents 7d0a28c + fcc17eb commit 1c34d86
Show file tree
Hide file tree
Showing 29 changed files with 687,776 additions and 5 deletions.
4 changes: 3 additions & 1 deletion doc/cmd/scan/supported_resources/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ As AWS documentation recommends, the below policy is granting only the permissio
"kms:ListAliases",
"kms:ListKeys",
"kms:ListResourceTags",
"lambda:GetEventSourceMapping",
"lambda:GetFunction",
"lambda:GetFunctionCodeSigningConfig",
"lambda:ListEventSourceMappings",
"lambda:ListFunctions",
"lambda:ListVersionsByFunction",
"rds:DescribeDBInstances",
Expand Down Expand Up @@ -187,7 +189,7 @@ As AWS documentation recommends, the below policy is granting only the permissio

- [x] aws_lambda_function
- [ ] aws_lambda_alias
- [ ] aws_lambda_event_source_mapping
- [x] aws_lambda_event_source_mapping
- [ ] aws_lambda_function_event_invoke_config
- [ ] aws_lambda_layer_version
- [ ] aws_lambda_permission
Expand Down
1 change: 1 addition & 0 deletions pkg/iac/deserializers.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func Deserializers() []deserializer.CTYDeserializer {
awsdeserializer.NewCloudfrontDistributionDeserializer(),
awsdeserializer.NewKMSKeyDeserializer(),
awsdeserializer.NewKMSAliasDeserializer(),
awsdeserializer.NewLambdaEventSourceMappingDeserializer(),

ghdeserializer.NewGithubRepositoryDeserializer(),
ghdeserializer.NewGithubTeamDeserializer(),
Expand Down
1 change: 1 addition & 0 deletions pkg/iac/terraform/state/terraform_state_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func TestTerraformStateReader_AWS_Resources(t *testing.T) {
{name: "Cloudfront distribution", dirName: "cloudfront_distribution", wantErr: false},
{name: "KMS key", dirName: "kms_key", wantErr: false},
{name: "KMS alias", dirName: "kms_alias", wantErr: false},
{name: "lambda event source mapping", dirName: "aws_lambda_event_source_mapping", wantErr: false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"BatchSize": 1,
"BisectBatchOnFunctionError": false,
"Enabled": true,
"EventSourceArn": "arn:aws:sqs:us-east-1:526954929923:queue1",
"FunctionArn": "arn:aws:lambda:us-east-1:526954929923:function:lambda_function_name",
"FunctionName": "arn:aws:lambda:us-east-1:526954929923:function:lambda_function_name",
"Id": "13ff66f8-37eb-4ad6-a0a8-594fea72df4f",
"LastModified": "2021-03-01T14:09:25Z",
"LastProcessingResult": "",
"MaximumBatchingWindowInSeconds": 0,
"MaximumRecordAgeInSeconds": 0,
"MaximumRetryAttempts": 0,
"ParallelizationFactor": 0,
"StartingPosition": null,
"StartingPositionTimestamp": null,
"State": "Enabled",
"StateTransitionReason": "USER_INITIATED",
"Uuid": "13ff66f8-37eb-4ad6-a0a8-594fea72df4f",
"DestinationConfig": []
},
{
"BatchSize": 1,
"BisectBatchOnFunctionError": false,
"Enabled": true,
"EventSourceArn": "arn:aws:sqs:us-east-1:526954929923:queue2",
"FunctionArn": "arn:aws:lambda:us-east-1:526954929923:function:lambda_function_name",
"FunctionName": "arn:aws:lambda:us-east-1:526954929923:function:lambda_function_name",
"Id": "4ad7e2b3-79e9-4713-9d9d-5af2c01d9058",
"LastModified": "2021-03-01T14:09:25Z",
"LastProcessingResult": "",
"MaximumBatchingWindowInSeconds": 0,
"MaximumRecordAgeInSeconds": 0,
"MaximumRetryAttempts": 0,
"ParallelizationFactor": 0,
"StartingPosition": null,
"StartingPositionTimestamp": null,
"State": "Enabled",
"StateTransitionReason": "USER_INITIATED",
"Uuid": "4ad7e2b3-79e9-4713-9d9d-5af2c01d9058",
"DestinationConfig": []
}
]
Loading

0 comments on commit 1c34d86

Please sign in to comment.