sonarjs/aws-iam-public-access
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/aws-iam-public-access": "error",
},
},
];AWS resource-based policies should not grant public access
The documentation shows no incorrect example for this rule.
import { aws_iam as iam } from 'aws-cdk-lib'
import { aws_s3 as s3 } from 'aws-cdk-lib'
const bucket = new s3.Bucket(this, "ExampleBucket")
bucket.addToResourcePolicy(new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ["s3:*"],
resources: [bucket.arnForObjects("*")],
principals: [new iam.AccountRootPrincipal()]
}))Examples from the ESLint documentation.
sonarjs/aws-iam-public-access
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/aws-iam-public-access": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
AWS IAM policies should limit the scope of permissions given
OpenSearch domains should have encryption at rest enabled
Amazon RDS resources should be encrypted at rest
Administration services access should be restricted to specific IP addresses