You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Example prompt: "A typescript pulumi policy to stop security groups having ssh open to the internet"
Would generate something like:
import*asawsfrom"@pulumi/aws";import{PolicyPack,validateResourceOfType}from"@pulumi/policy";newPolicyPack("lambda",{policies: [{name: "security-group-policy",description: "Stop security group being open on port 22 to the internet",enforcementLevel: "mandatory",validateResource: validateResourceOfType(aws.ec2.SecurityGroup,(securitygroup,args,reportViolation)=>{if(securitygroup.ingress!==undefined&&securitygroup.ingress?.length>0){if(securitygroup.ingress.find(x=>x.fromPort==22)&&securitygroup.ingress.find(x=>x.toPort==22)&&securitygroup.ingress.find(x=>x.cidrBlocks?.indexOf("0.0.0.0/0")!==-1)){reportViolation("Security groups must not have port 22 open to the internet")}}})}],});
No idea where you'd get the data to train this on, but I had a conversation about this today and it sounded like a good idea.
Affected area/feature
The text was updated successfully, but these errors were encountered:
Hello!
Issue details
Example prompt: "A typescript pulumi policy to stop security groups having ssh open to the internet"
Would generate something like:
No idea where you'd get the data to train this on, but I had a conversation about this today and it sounded like a good idea.
Affected area/feature
The text was updated successfully, but these errors were encountered: