![github-actions[bot]](/assets/img/avatar_default.png)
* Add javascript to rule S6319 * Rule.adoc update * Update web links * Props is mandatory * Declaration not used * Fix import * Apply suggestions from code review Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> Co-authored-by: pedro-oliveira-sonarsource <pedro-oliveira-sonarsource@users.noreply.github.com> Co-authored-by: pedro-oliveira-sonarsource <pedro.oliveira@sonarsource.com> Co-authored-by: pedro-oliveira-sonarsource <104737234+pedro-oliveira-sonarsource@users.noreply.github.com> Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com>
57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
include::../description.adoc[]
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
For https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnNotebookInstance.html[`aws-cdk-lib.aws-sagemaker.CfnNotebookInstance`]
|
|
|
|
[source,javascript]
|
|
----
|
|
import { CfnNotebookInstance } from 'aws-cdk-lib/aws-sagemaker';
|
|
|
|
new CfnNotebookInstance(this, 'example', {
|
|
instanceType: 'instanceType',
|
|
roleArn: 'roleArn'
|
|
}); // Sensitive
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
For https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnNotebookInstance.html[`aws-cdk-lib.aws-sagemaker.CfnNotebookInstance`]
|
|
|
|
[source,javascript]
|
|
----
|
|
import { CfnNotebookInstance } from 'aws-cdk-lib/aws-sagemaker';
|
|
|
|
const encryptionKey = new Key(this, 'example', {
|
|
enableKeyRotation: true,
|
|
});
|
|
new CfnNotebookInstance(this, 'example', {
|
|
instanceType: 'instanceType',
|
|
roleArn: 'roleArn',
|
|
kmsKeyId: encryptionKey.keyId
|
|
});
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
* Omitting `kms_key_id` disables encryption of SageMaker notebook instances. Make sure it is safe here.
|
|
|
|
=== Highlighting
|
|
|
|
* Highlight the `props` object if it does not contain the property `kmsMasterKeyId`.
|
|
* Highlight the `kmsMasterKeyId` attribute if it is set to `undefined`.
|
|
|
|
endif::env-github,rspecator-view[]
|