Skip to content

Commit

Permalink
fix(pdk-nag): remove reference to deleted sns encrypted kms rule (#881)
Browse files Browse the repository at this point in the history
The SNSEncryptedKMS cdk nag rule has been removed since
[2.30.0](https://github.com/cdklabs/cdk-nag/releases/tag/v2.30.0). We remove this from the
prototyping nag pack and upgrade cdk nag to the latest version.
  • Loading branch information
cogwirrel authored Nov 1, 2024
1 parent a590627 commit f9e27c7
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 82 deletions.
2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/cdk-graph-plugin-threat-composer/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@
],
"content": "cdk-nag rule: SNSTopicSSLPublishOnly"
},
{
"id": "35eefa29-d011-4b50-a7a8-a204a2b01b34",
"numericId": 101,
"displayOrder": 101,
"tags": [
"SNS"
],
"content": "cdk-nag rule: SNSEncryptedKMS"
},
{
"id": "fff9fac4-1512-4a49-81a3-88e420f6c110",
"numericId": 100,
Expand Down Expand Up @@ -1400,10 +1391,6 @@
"mitigationId": "fff9fac4-1512-4a49-81a3-88e420f6c110",
"linkedId": "90619d5b-6450-4108-8013-2eaafc5788b5"
},
{
"mitigationId": "35eefa29-d011-4b50-a7a8-a204a2b01b34",
"linkedId": "7f17d020-6368-48ee-b934-c9272de71242"
},
{
"mitigationId": "7e9478e3-4571-4c36-bb7c-bb33acf4ec08",
"linkedId": "9d47bd52-9dbc-4eee-8e55-04a3fc8064c4"
Expand Down Expand Up @@ -1562,26 +1549,6 @@
],
"statement": "A threat actor who is in a person-in-the-middle position between the publisher and the Amazon SNS endpoint can view plaintext requests and responses, which leads to them being able manipulate view or modify the requests or responses, negatively impacting this application's data"
},
{
"id": "7f17d020-6368-48ee-b934-c9272de71242",
"numericId": 88,
"displayOrder": 88,
"tags": [
"SNS",
"SSE"
],
"threatSource": "threat actor",
"prerequisites": "with access to underlying storage used for the SNS (Simple Notification Service) topic",
"threatAction": "view the SNS messages",
"impactedGoal": [
"confidentiality",
"integrity"
],
"impactedAssets": [
"this application's data"
],
"statement": "A threat actor with access to underlying storage used for the SNS (Simple Notification Service) topic can view the SNS messages, resulting in reduced confidentiality and/or integrity of this application's data"
},
{
"id": "90619d5b-6450-4108-8013-2eaafc5788b5",
"numericId": 87,
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-graph/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/identity/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/pdk-nag/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/pdk-nag/src/packs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Total: `35`

### Warnings

Total: `74`
Total: `73`

| Rule ID | Cause | Explanation |
| ------------------ | ------------------ | ------------------ |
Expand Down Expand Up @@ -183,7 +183,6 @@ Total: `74`
| SageMakerNotebookInVPC | The SageMaker notebook instance is not provisioned inside a VPC. | Provisioning the notebook instances inside a VPC enables the notebook to access VPC-only resources such as EFS file systems. |
| SageMakerNotebookNoDirectInternetAccess | The SageMaker notebook does not disable direct internet access. | By preventing direct internet access, you can keep sensitive data from being accessed by unauthorized users. |
| SecretsManagerRotationEnabled | The secret does not have automatic rotation scheduled. | Rotating secrets on a regular schedule can shorten the period a secret is active, and potentially reduce the business impact if the secret is compromised. |
| SNSEncryptedKMS | The SNS topic does not have KMS encryption enabled. | To help protect data at rest, ensure that your Amazon Simple Notification Service (Amazon SNS) topics require encryption using AWS Key Management Service (AWS KMS). Because sensitive data can exist at rest in published messages, enable encryption at rest to help protect that data. |
| SNSTopicSSLPublishOnly | The SNS Topic does not require publishers to use SSL. | Without HTTPS (TLS), a network-based attacker can eavesdrop on network traffic or manipulate it, using an attack such as man-in-the-middle. Allow only encrypted connections over HTTPS (TLS) using the aws:SecureTransport condition and the 'sns:Publish' action in the topic policy to force publishers to use SSL. If SSE is already enabled then this control is auto enforced. |
| SQSQueueSSE | The SQS Queue does not have server-side encryption enabled. | Server side encryption adds additional protection of sensitive data delivered as messages to subscribers. |
| SQSQueueSSLRequestsOnly | The SQS queue does not require requests to use SSL. | Without HTTPS (TLS), a network-based attacker can eavesdrop on network traffic or manipulate it, using an attack such as man-in-the-middle. Allow only encrypted connections over HTTPS (TLS) using the aws:SecureTransport condition in the queue policy to force requests to use SSL. |
Expand Down
7 changes: 0 additions & 7 deletions packages/pdk-nag/src/packs/aws-prototyping-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,13 +726,6 @@ export let RuleMetadata = [
level: NagMessageLevel.WARN,
rule: rules.secretsmanager.SecretsManagerRotationEnabled,
},
{
info: "The SNS topic does not have KMS encryption enabled.",
explanation:
"To help protect data at rest, ensure that your Amazon Simple Notification Service (Amazon SNS) topics require encryption using AWS Key Management Service (AWS KMS). Because sensitive data can exist at rest in published messages, enable encryption at rest to help protect that data.",
level: NagMessageLevel.WARN,
rule: rules.sns.SNSEncryptedKMS,
},
{
info: "The SNS Topic does not require publishers to use SSL.",
explanation:
Expand Down
1 change: 0 additions & 1 deletion packages/pdk-nag/test/prototyping-nag-pack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const expectedWarnings = [
"AwsPrototyping-SageMakerNotebookInVPC",
"AwsPrototyping-SageMakerNotebookNoDirectInternetAccess",
"AwsPrototyping-SecretsManagerRotationEnabled",
"AwsPrototyping-SNSEncryptedKMS",
"AwsPrototyping-SNSTopicSSLPublishOnly",
"AwsPrototyping-SQSQueueSSE",
"AwsPrototyping-SQSQueueSSLRequestsOnly",
Expand Down
4 changes: 2 additions & 2 deletions packages/pdk/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/pipeline/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/static-website/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/type-safe-api/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9e27c7

Please sign in to comment.