sonarjs/aws-sns-unencrypted-topics
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/aws-sns-unencrypted-topics": "error",
},
},
];Amazon SNS topics should be encrypted at rest
The documentation shows no incorrect example for this rule.
import { Topic } from 'aws-cdk-lib/aws-sns';
const encryptionKey = new Key(this, 'exampleKey', {
enableKeyRotation: true,
});
new Topic(this, 'exampleTopic', {
masterKey: encryptionKey
});import { CfnTopic } from 'aws-cdk-lib/aws-sns';
const encryptionKey = new Key(this, 'exampleKey', {
enableKeyRotation: true,
});
cfnTopic = new CfnTopic(this, 'exampleCfnTopic', {
kmsMasterKeyId: encryptionKey.keyId
});Examples from the ESLint documentation.
sonarjs/aws-sns-unencrypted-topics
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/aws-sns-unencrypted-topics": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
SageMaker notebook instances should be encrypted at rest
Amazon S3 buckets should have versioning enabled
Bitwise operators should not be used in boolean contexts
Amazon S3 bucket public access should be fully blocked
Variables should be used in the blocks where they are declared