sonarjs/aws-ec2-rds-dms-public
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/aws-ec2-rds-dms-public": "error",
},
},
];Public network access to cloud resources should be disabled
The documentation shows no incorrect example for this rule.
import {aws_ec2 as ec2} from 'aws-cdk-lib'
new ec2.Instance(
this,
"example", {
instanceType: nanoT2,
machineImage: ec2.MachineImage.latestAmazonLinux(),
vpc: vpc,
vpcSubnets: {subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS}
})import {aws_ec2 as ec2} from 'aws-cdk-lib'
new ec2.CfnInstance(this, "example", {
instanceType: "t2.micro",
imageId: "ami-0ea0f26a6d50850c5",
networkInterfaces: [
{
deviceIndex: "0",
associatePublicIpAddress: false,
deleteOnTermination: true,
subnetId: vpc.selectSubnets({subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS}).subnetIds[0]
}
]
})import {aws_ec2 as ec2} from 'aws-cdk-lib'
new dms.CfnReplicationInstance(
this, "example", {
replicationInstanceClass: "dms.t2.micro",
allocatedStorage: 5,
publiclyAccessible: false,
replicationSubnetGroupIdentifier: subnetGroup.replicationSubnetGroupIdentifier,
vpcSecurityGroupIds: [vpc.vpcDefaultSecurityGroup]
})Examples from the ESLint documentation.
sonarjs/aws-ec2-rds-dms-public
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/aws-ec2-rds-dms-public": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
AWS API Gateway should require authentication
Nested properties of Lodash and Underscore.js clone results should not be mutated
Async test assertions should be awaited or returned