Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
246d1bf
fix(query): fn for EFS volume with disabled transit encryption--cloud…
cx-andre-pereira Jul 22, 2025
02b9ea3
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Jul 24, 2025
6c72e3d
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Jul 25, 2025
67d326e
fix yml to yaml
cx-andre-pereira Jul 25, 2025
bc12abb
terraform equivilant query rename + extra case for cloudformation
cx-andre-pereira Jul 31, 2025
5c1cda4
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Jul 31, 2025
5cb149e
duplicate flag fix
cx-andre-pereira Jul 31, 2025
31fa0a3
test folder cleanup
cx-andre-pereira Aug 1, 2025
68bb9d7
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 1, 2025
c65a003
metadata update and e2e results update
cx-andre-pereira Aug 1, 2025
de5c2e9
Merge branch 'AST-40736--FN_EFS_Volume_With_Disabled_Transit_Encrypti…
cx-andre-pereira Aug 1, 2025
8201589
e2e fix 2 (scan paths)
cx-andre-pereira Aug 1, 2025
7f251c7
query prototype 1
cx-andre-pereira Aug 4, 2025
9a14c8e
at rest implementation new tests and logic fix
cx-andre-pereira Aug 5, 2025
74da8c2
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 5, 2025
353d4d2
smaller test files , descriptionUrl and inclusion of EC2:Instance
cx-andre-pereira Aug 5, 2025
9113e42
Merge branch 'AST-40736--FN_EFS_Volume_With_Disabled_Transit_Encrypti…
cx-andre-pereira Aug 5, 2025
26fa057
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Aug 6, 2025
6e9f38e
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Aug 8, 2025
e275bd6
restores ecs cluster not encrypted at rest to current master implemen…
cx-andre-pereira Aug 8, 2025
9e4f152
conflits favoring master
cx-andre-pereira Aug 13, 2025
a3e67e2
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 14, 2025
4e13440
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 19, 2025
b1874a3
removed test
cx-andre-pereira Aug 19, 2025
7b6126e
smaller tests and new case handling
cx-andre-pereira Aug 19, 2025
0086f25
e2e tests fix1
cx-andre-pereira Aug 19, 2025
5d98f6d
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 19, 2025
18095c1
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-artur-ribeiro Aug 19, 2025
118eecc
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 19, 2025
18e5306
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Aug 20, 2025
f12594e
rollback of ecs cluster not encrypte at rest and e2e tests associated
cx-andre-pereira Aug 20, 2025
9bc4d72
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 20, 2025
0d153c8
fixed positive tests and missing newline e2e 32
cx-andre-pereira Aug 20, 2025
c21db6e
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 20, 2025
60e3f45
Merge branch 'master' of https://github.com/Checkmarx/kics into AST-4…
cx-andre-pereira Aug 20, 2025
90ba036
e2e fix
cx-andre-pereira Aug 20, 2025
25b28cd
master merge
cx-andre-pereira Aug 21, 2025
1946477
e2e fix
cx-andre-pereira Aug 21, 2025
6bf0805
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-andre-pereira Aug 22, 2025
f8c34f9
Merge branch 'master' into AST-40736--FN_EFS_Volume_With_Disabled_Tra…
cx-artur-ribeiro Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ CxPolicy[result] {
resource := input.document[i].Resources
elem := resource[key]
elem.Type == "AWS::ECS::TaskDefinition"
efs := elem.Properties.volumes[index].efsVolumeConfiguration
efs := elem.Properties.Volumes[index].EFSVolumeConfiguration
value := efs.TransitEncryption
not value == "ENABLED"

result := {
"documentId": input.document[i].id,
"resourceType": elem.Type,
"resourceName": cf_lib.get_resource_name(elem, key),
"searchKey": sprintf("Resources.%s.Properties.volumes", [key]),
"searchKey": sprintf("Resources.%s.Properties.Volumes", [key]),
"issueType": "IncorrectValue",
"keyExpectedValue": sprintf("'Resources.%s.Properties.volumes[%d].efsVolumeConfiguration.TransitEncryption' should be set to 'ENABLED'", [key, index]),
"keyActualValue": sprintf("'Resources.%s.Properties.volumes[%d].efsVolumeConfiguration.TransitEncryption' is set to '%s'", [key, index, value]),
"searchLine": common_lib.build_search_line(["Resources",key,"Properties","volumes", index,"efsVolumeConfiguration","TransitEncryption"], []),
"keyExpectedValue": sprintf("'Resources.%s.Properties.Volumes[%d].EFSVolumeConfiguration.TransitEncryption' should be set to 'ENABLED'", [key, index]),
"keyActualValue": sprintf("'Resources.%s.Properties.Volumes[%d].EFSVolumeConfiguration.TransitEncryption' is set to '%s'", [key, index, value]),
"searchLine": common_lib.build_search_line(["Resources",key,"Properties","Volumes", index,"EFSVolumeConfiguration","TransitEncryption"], []),
}
}

CxPolicy[result] {
resource := input.document[i].Resources
elem := resource[key]
elem.Type == "AWS::ECS::TaskDefinition"
efs := elem.Properties.volumes[index].efsVolumeConfiguration
efs := elem.Properties.Volumes[index].EFSVolumeConfiguration
not efs.TransitEncryption

result := {
"documentId": input.document[i].id,
"resourceType": elem.Type,
"resourceName": cf_lib.get_resource_name(elem, key),
"searchKey": sprintf("Resources.%s.Properties.volumes", [key]),
"searchKey": sprintf("Resources.%s.Properties.Volumes", [key]),
"issueType": "MissingAttribute",
"keyExpectedValue": sprintf("'Resources.%s.Properties.volumes[%d].efsVolumeConfiguration.TransitEncryption' should be set to 'ENABLED'", [key, index]),
"keyActualValue": sprintf("'Resources.%s.Properties.volumes[%d].efsVolumeConfiguration.TransitEncryption' is not set", [key, index]),
"searchLine": common_lib.build_search_line(["Resources",key,"Properties","volumes", index,"efsVolumeConfiguration"], []),
"keyExpectedValue": sprintf("'Resources.%s.Properties.Volumes[%d].EFSVolumeConfiguration.TransitEncryption' should be set to 'ENABLED'", [key, index]),
"keyActualValue": sprintf("'Resources.%s.Properties.Volumes[%d].EFSVolumeConfiguration.TransitEncryption' is not set", [key, index]),
"searchLine": common_lib.build_search_line(["Resources",key,"Properties","Volumes", index,"EFSVolumeConfiguration"], []),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"Volumes": [
{
"Name": "myEfsVolume",
"EfsVolumeConfiguration": {
"EFSVolumeConfiguration": {
"FileSystemId": "fs-1234",
"RootDirectory": "/path/to/my/data",
"TransitEncryptionPort": 10,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Resources:
taskdefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
-
Name:
Ref: "AppName"
MountPoints:
-
SourceVolume: "my-vol"
ContainerPath: "/var/www/my-vol"
Image: "amazon/amazon-ecs-sample"
Cpu: 256
PortMappings:
-
ContainerPort:
Ref: "AppContainerPort"
HostPort:
Ref: "AppHostPort"
EntryPoint:
- "/usr/sbin/apache2"
- "-D"
- "FOREGROUND"
Memory: 512
Essential: true
Environment:
-
Name: PASSWORD
-
Name: "busybox"
Image: "busybox"
Cpu: 256
EntryPoint:
- "sh"
- "-c"
Memory: 512
Command:
- "/bin/sh -c \"while true; do /bin/date > /var/www/my-vol/date; sleep 1; done\""
Essential: false
VolumesFrom:
-
SourceContainer:
Ref: "AppName"
Volumes:
-
Host:
SourcePath: "/var/lib/docker/vfs/dir/"
EFSVolumeConfiguration:
TransitEncryption: ENABLED
Name: "my-vol"
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
]
}
],
"volumes": [
"Volumes": [
{
"name": "myEfsVolume",
"efsVolumeConfiguration": {
"EFSVolumeConfiguration": {
"fileSystemId": "fs-1234",
"rootDirectory": "/path/to/my/data",
"TransitEncryptionPort": 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
]
}
],
"volumes": [
"Volumes": [
{
"Name": "myEfsVolume",
"efsVolumeConfiguration": {
"EFSVolumeConfiguration": {
"FileSystemId": "fs-1234",
"RootDirectory": "/path/to/my/data",
"TransitEncryptionPort": 10
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Resources:
taskdefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
-
Name:
Ref: "AppName"
MountPoints:
-
SourceVolume: "my-vol"
ContainerPath: "/var/www/my-vol"
Image: "amazon/amazon-ecs-sample"
Cpu: 256
PortMappings:
-
ContainerPort:
Ref: "AppContainerPort"
HostPort:
Ref: "AppHostPort"
EntryPoint:
- "/usr/sbin/apache2"
- "-D"
- "FOREGROUND"
Memory: 512
Essential: true
Environment:
-
Name: PASSWORD
-
Name: "busybox"
Image: "busybox"
Cpu: 256
EntryPoint:
- "sh"
- "-c"
Memory: 512
Command:
- "/bin/sh -c \"while true; do /bin/date > /var/www/my-vol/date; sleep 1; done\""
Essential: false
VolumesFrom:
-
SourceContainer:
Ref: "AppName"
Volumes:
-
Host:
SourcePath: "/var/lib/docker/vfs/dir/"
EFSVolumeConfiguration:
TransitEncryption: DISABLED
Name: "my-vol"
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Resources:
taskdefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
-
Name:
Ref: "AppName"
MountPoints:
-
SourceVolume: "my-vol"
ContainerPath: "/var/www/my-vol"
Image: "amazon/amazon-ecs-sample"
Cpu: 256
PortMappings:
-
ContainerPort:
Ref: "AppContainerPort"
HostPort:
Ref: "AppHostPort"
EntryPoint:
- "/usr/sbin/apache2"
- "-D"
- "FOREGROUND"
Memory: 512
Essential: true
Environment:
-
Name: PASSWORD
-
Name: "busybox"
Image: "busybox"
Cpu: 256
EntryPoint:
- "sh"
- "-c"
Memory: 512
Command:
- "/bin/sh -c \"while true; do /bin/date > /var/www/my-vol/date; sleep 1; done\""
Essential: false
VolumesFrom:
-
SourceContainer:
Ref: "AppName"
Volumes:
-
Host:
SourcePath: "/var/lib/docker/vfs/dir/"
EFSVolumeConfiguration:
Name: "my-vol"
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,17 @@
"severity": "MEDIUM",
"line": 59,
"fileName": "positive2.json"
},
{
"queryName": "EFS Volume With Disabled Transit Encryption",
"severity": "MEDIUM",
"line": 50,
"fileName": "positive3.yaml"
},
{
"queryName": "EFS Volume With Disabled Transit Encryption",
"severity": "MEDIUM",
"line": 49,
"fileName": "positive4.yaml"
}
]
Loading