Skip to content

Commit 7348ed2

Browse files
chore(aws): enhance metadata for kinesis service (#9262)
Co-authored-by: Daniel Barranquero <[email protected]>
1 parent 0b94f29 commit 7348ed2

File tree

3 files changed

+44
-26
lines changed

3 files changed

+44
-26
lines changed

prowler/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
5757
- Raise ASFF output error for non-AWS providers [(#9225)](https://github.com/prowler-cloud/prowler/pull/9225)
5858
- Update AWS ECR service metadata to new format [(#8872)](https://github.com/prowler-cloud/prowler/pull/8872)
5959
- Update AWS ECS service metadata to new format [(#8888)](https://github.com/prowler-cloud/prowler/pull/8888)
60+
- Update AWS Kinesis service metadata to new format [(#9262)](https://github.com/prowler-cloud/prowler/pull/9262)
6061
- Update AWS DocumentDB service metadata to new format [(#8862)](https://github.com/prowler-cloud/prowler/pull/8862)
6162

6263
---

prowler/providers/aws/services/kinesis/kinesis_stream_data_retention_period/kinesis_stream_data_retention_period.metadata.json

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
{
22
"Provider": "aws",
33
"CheckID": "kinesis_stream_data_retention_period",
4-
"CheckTitle": "Kinesis streams should have an adequate data retention period.",
4+
"CheckTitle": "Kinesis stream retains data for at least the required minimum hours",
55
"CheckType": [
6-
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices"
6+
"Software and Configuration Checks/AWS Security Best Practices",
7+
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices",
8+
"Effects/Data Destruction"
79
],
810
"ServiceName": "kinesis",
911
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:partition:kinesis::account-id:stream/stream-name",
12+
"ResourceIdTemplate": "",
1113
"Severity": "medium",
1214
"ResourceType": "AwsKinesisStream",
13-
"Description": "Ensure Kinesis streams have an adequate data retention period.",
14-
"Risk": "An inadequate data retention period may result in data records being deleted before they can be processed or backed up, increasing the risk of data loss. This is especially critical for applications that rely on historical data availability for analysis, monitoring, and recovery in case of failures.",
15-
"RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/kinesis-stream-backup-retention-check.html",
15+
"Description": "**Kinesis Data Streams** retention window is evaluated to confirm records are kept for at least the configured minimum duration (default `168` hours).",
16+
"Risk": "Insufficient retention causes records to expire before consumers read or reprocess them, undermining **availability** and analytics **integrity**. Backlogs or outages can create irreversible data gaps, hinder investigations and recovery, and enable denial-of-service-by-lag against event pipelines.",
17+
"RelatedUrl": "",
18+
"AdditionalURLs": [
19+
"https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html",
20+
"https://docs.aws.amazon.com/securityhub/latest/userguide/kinesis-controls.html#kinesis-3"
21+
],
1622
"Remediation": {
1723
"Code": {
18-
"CLI": "aws kinesis increase-stream-retention-period --stream-name <stream-name> --retention-period-hours <hours>",
19-
"NativeIaC": "",
20-
"Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/kinesis-controls.html#kinesis-3",
21-
"Terraform": ""
24+
"CLI": "aws kinesis increase-stream-retention-period --stream-name <example_resource_name> --retention-period-hours 168",
25+
"NativeIaC": "```yaml\n# CloudFormation: set Kinesis stream retention to minimum required hours\nResources:\n <example_resource_name>:\n Type: AWS::Kinesis::Stream\n Properties:\n ShardCount: 1\n RetentionPeriodHours: 168 # critical: sets retention to >= 168 hours to pass the check\n```",
26+
"Other": "1. Sign in to the AWS Console and open Amazon Kinesis\n2. Go to Data streams and select <example_resource_name>\n3. Click Edit\n4. Set Retention period to 168 hours (or higher, per your policy)\n5. Click Save changes",
27+
"Terraform": "```hcl\n# Kinesis stream with adequate retention period\nresource \"aws_kinesis_stream\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n shard_count = 1\n retention_period = 168 # critical: sets retention to >= 168 hours to pass the check\n}\n```"
2228
},
2329
"Recommendation": {
24-
"Text": "Configure an adequate data retention period for Kinesis streams to ensure data is available for the required timeframe. Set the retention period based on your application’s data retention requirements, and consider at least 168 hours (or customize as necessary).",
25-
"Url": "https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html"
30+
"Text": "Set the **retention period** to exceed worst-case consumer lag, replay needs, and compliance windows; use at least `168` hours by default (or customize as necessary) and raise as required. Enforce **change control** and least privilege on retention changes, monitor consumer lag, and maintain **secondary durability** (e.g., archival) for critical streams.",
31+
"Url": "https://hub.prowler.com/check/kinesis_stream_data_retention_period"
2632
}
2733
},
28-
"Categories": [],
34+
"Categories": [
35+
"resilience"
36+
],
2937
"DependsOn": [],
3038
"RelatedTo": [],
3139
"Notes": ""

prowler/providers/aws/services/kinesis/kinesis_stream_encrypted_at_rest/kinesis_stream_encrypted_at_rest.metadata.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
{
22
"Provider": "aws",
33
"CheckID": "kinesis_stream_encrypted_at_rest",
4-
"CheckTitle": "Kinesis streams should be encrypted at rest.",
4+
"CheckTitle": "Kinesis stream is encrypted at rest with KMS",
55
"CheckType": [
6+
"Software and Configuration Checks/AWS Security Best Practices",
7+
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices",
68
"Software and Configuration Checks/Industry and Regulatory Standards/NIST 800-53 Controls"
79
],
810
"ServiceName": "kinesis",
911
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:partition:kinesis::account-id:stream/stream-name",
11-
"Severity": "medium",
12+
"ResourceIdTemplate": "",
13+
"Severity": "high",
1214
"ResourceType": "AwsKinesisStream",
13-
"Description": "Ensure Kinesis streams use server-side encryption with AWS KMS keys for data protection.",
14-
"Risk": "If Kinesis streams are not encrypted at rest, sensitive data stored in the stream could be exposed to unauthorized access or breaches. This could lead to potential data theft or misuse of unencrypted data.",
15-
"RelatedUrl": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html",
15+
"Description": "**Amazon Kinesis Data Streams** with **server-side encryption** use **AWS KMS** to protect records at rest. The evaluation determines whether a stream has `SSE-KMS` configured with a KMS key; streams lacking KMS-based at rest encryption are identified.",
16+
"Risk": "Without **SSE-KMS**, records in shards may be exposed in plaintext if storage, backups, or analytics exports are accessed, undermining **confidentiality**. Absence of KMS controls also reduces **integrity** and oversight by removing key policies, rotation, and audit trails-enabling covert data exfiltration or insider misuse.",
17+
"RelatedUrl": "",
18+
"AdditionalURLs": [
19+
"https://docs.aws.amazon.com/securityhub/latest/userguide/kinesis-controls.html#kinesis-1",
20+
"https://docs.aws.amazon.com/streams/latest/dev/getting-started-with-sse.html",
21+
"https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/Kinesis/server-side-encryption.html"
22+
],
1623
"Remediation": {
1724
"Code": {
18-
"CLI": "aws kinesis start-stream-encryption --stream-name <your-stream-name> --encryption-type KMS --key-id <your-kms-key-id>",
19-
"NativeIaC": "https://docs.prowler.com/checks/aws/general-policies/bc_aws_general_22/#cloudformation",
20-
"Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/kinesis-controls.html#kinesis-1",
21-
"Terraform": "https://docs.prowler.com/checks/aws/general-policies/bc_aws_general_22/#terraform"
25+
"CLI": "aws kinesis start-stream-encryption --stream-name <KINESIS_STREAM_NAME> --encryption-type KMS --key-id alias/aws/kinesis",
26+
"NativeIaC": "```yaml\n# CloudFormation: enable KMS encryption on a Kinesis stream\nResources:\n <example_resource_name>:\n Type: AWS::Kinesis::Stream\n Properties:\n ShardCount: 1\n StreamEncryption:\n EncryptionType: KMS # Critical: enables KMS encryption at rest\n KeyId: alias/aws/kinesis # Critical: uses AWS managed Kinesis KMS key\n```",
27+
"Other": "1. Open the AWS Console and go to Amazon Kinesis > Data streams\n2. Select the stream\n3. On the Details tab, click Edit in Server-side encryption\n4. Select Enabled\n5. Choose the (Default) aws/kinesis KMS key\n6. Click Save",
28+
"Terraform": "```hcl\n# Enable KMS encryption on a Kinesis stream\nresource \"aws_kinesis_stream\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n shard_count = 1\n encryption_type = \"KMS\" # Critical: enables KMS encryption at rest\n kms_key_id = \"alias/aws/kinesis\" # Critical: uses AWS managed Kinesis KMS key\n}\n```"
2229
},
2330
"Recommendation": {
24-
"Text": "Enable server-side encryption for Kinesis streams using AWS KMS keys to ensure that all data is encrypted before it is stored, protecting data at rest and reducing the risk of unauthorized access.",
25-
"Url": "https://docs.aws.amazon.com/streams/latest/dev/getting-started-with-sse.html"
31+
"Text": "Enable **SSE-KMS** on all streams.\n- Use **customer-managed keys** for rotation and ownership\n- Enforce **least privilege** on KMS grants; limit cross-account use\n- Monitor key usage and require encryption in CI/CD",
32+
"Url": "https://hub.prowler.com/check/kinesis_stream_encrypted_at_rest"
2633
}
2734
},
28-
"Categories": [],
35+
"Categories": [
36+
"encryption"
37+
],
2938
"DependsOn": [],
3039
"RelatedTo": [],
3140
"Notes": ""

0 commit comments

Comments
 (0)