diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index e3a03de799..54ef4a7cb8 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -21,8 +21,8 @@ gpu gvnic hostkeys iap -iex ilb +IMDS ingresstls iotedge linux diff --git a/go.mod b/go.mod index dfc219250a..1d97e358e3 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module go.mondoo.com/cnquery +replace go.mondoo.com/cnquery/providers/aws => ./providers/aws + go 1.20 require ( @@ -76,6 +78,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/toravir/csd v0.0.0-20200911003203-13ae77ad849c github.com/ulikunitz/xz v0.5.11 + go.mondoo.com/cnquery/providers/aws v0.0.0 go.mondoo.com/ranger-rpc v0.5.1 go.opentelemetry.io/otel v1.19.0 golang.org/x/crypto v0.13.0 @@ -105,6 +108,46 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect + github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.21.0 // indirect + github.com/aws/aws-sdk-go-v2/service/acm v1.18.5 // indirect + github.com/aws/aws-sdk-go-v2/service/apigateway v1.18.0 // indirect + github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.22.5 // indirect + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.30.6 // indirect + github.com/aws/aws-sdk-go-v2/service/backup v1.25.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudfront v1.28.5 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.29.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.23.5 // indirect + github.com/aws/aws-sdk-go-v2/service/codebuild v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/configservice v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.30.4 // indirect + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ecs v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/efs v1.21.6 // indirect + github.com/aws/aws-sdk-go-v2/service/eks v1.29.5 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticache v1.29.3 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.16.5 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.20.6 // indirect + github.com/aws/aws-sdk-go-v2/service/emr v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/service/guardduty v1.28.0 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.22.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.35 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.24.5 // indirect + github.com/aws/aws-sdk-go-v2/service/lambda v1.39.5 // indirect + github.com/aws/aws-sdk-go-v2/service/organizations v1.20.6 // indirect + github.com/aws/aws-sdk-go-v2/service/rds v1.54.0 // indirect + github.com/aws/aws-sdk-go-v2/service/redshift v1.29.5 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.38.5 // indirect + github.com/aws/aws-sdk-go-v2/service/s3control v1.33.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sagemaker v1.107.0 // indirect + github.com/aws/aws-sdk-go-v2/service/securityhub v1.36.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sns v1.21.5 // indirect github.com/ccojocar/zxcvbn-go v1.0.1 // indirect github.com/creack/pty v1.1.18 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect diff --git a/go.sum b/go.sum index 3a3169fb28..191efdf427 100644 --- a/go.sum +++ b/go.sum @@ -72,7 +72,7 @@ github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClD github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -126,6 +126,8 @@ github.com/aws/aws-sdk-go v1.45.19 h1:+4yXWhldhCVXWFOQRF99ZTJ92t4DtoHROZIbN7Ujk/ github.com/aws/aws-sdk-go v1.45.19/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= @@ -138,6 +140,36 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45lt github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.21.0 h1:KBMHwjgjyu5wUZwNrzYSyv2BBjXDgbS7axPtYxWSyt8= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.21.0/go.mod h1:zwKhX2c7u7XDz2ToVE+qunfyoy9+3AO0rZynN5TwXCc= +github.com/aws/aws-sdk-go-v2/service/acm v1.18.5 h1:P+guX2KwWLOAvofjSZ3z6Yd1RcxR3UX85GnLVLTf9wg= +github.com/aws/aws-sdk-go-v2/service/acm v1.18.5/go.mod h1:3jqJmuasOx2V/CD5tQd3TNYZb1dMmXKh1F+cl8hDlYs= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.18.0 h1:rByriM7T0xvKy7eDiNUhFyVgnGupZ7DIifReKDzfk5E= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.18.0/go.mod h1:OJmEdRP/gDTqY71Cc/eJ/anpvvGHNgf62FyNuah3X48= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.22.5 h1:kkjav/s/WVG2lGArKpDqdU+xHetu7Gg6pA4juZhyyEE= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.22.5/go.mod h1:cndybsHIkm5cmP6c8BKJXPtgH0oht01Xemuc3dRv7XA= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.30.6 h1:OuxP8FzE3++AjQ8wabMcwJxtS25inpTIblMPNzV3nB8= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.30.6/go.mod h1:iHCpld+TvQd0odwp6BiwtL9H9LbU41kPW1i9oBy3iOo= +github.com/aws/aws-sdk-go-v2/service/backup v1.25.0 h1:ihY3D6j8urXoXodyyv9MVDusAy+y3oziI5lNhJNtMkQ= +github.com/aws/aws-sdk-go-v2/service/backup v1.25.0/go.mod h1:eborlausdvowwY/7Q50KfXMKj8Zk0O7S6f6r3Qv8HTI= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.28.5 h1:Skw91L/Y1HkdYhCbdM0eiWOjrHKnpB/VNBHpg8e/8qo= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.28.5/go.mod h1:s+OI3YtisOCVORf07RWL2xjwrWgeYwvScNp7ZA2YGwI= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.29.0 h1:ojGlrHw6lCi4JsYAf6W+gTC+iKddOBnVkwGf6HreJPI= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.29.0/go.mod h1:XJCjyzVD3XB6efz0N4LkqRAM/m8yg+BfaJD0m6l9oY8= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7 h1:qULF+ElcvjjSEO1+z5x+TmKE9d4yTej7PfpJQPVvexY= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.27.7/go.mod h1:1HKxVrj5wsKy/wb2v07vzTSd+YPV1sDsWxferwPK7PA= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.23.5 h1:/rXnxd9VGnTc5fLuSFKkWCy+kDP6CxXAIMvfJQEfx8U= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.23.5/go.mod h1:5v2ZNXCSwG73rx0k3sCuB1Ju8sbEbG0iUlxCA7D8sV8= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.21.5 h1:uol+F5F9T1cNSJsBfTOo85i5+qVbxsWhB7JTx9pjFis= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.21.5/go.mod h1:a0ghZ8nA7qvVSQ69JRKUxIMqVFgXp7pEF8sGYx1ibO0= +github.com/aws/aws-sdk-go-v2/service/configservice v1.36.3 h1:a07v+hVWO2PPoFnkiV2A+l6RO/jv6YSKBqwnFWiwaec= +github.com/aws/aws-sdk-go-v2/service/configservice v1.36.3/go.mod h1:zMbXre8in+0e6LAQsFNyzNCpuSy0Mw5XwSg6mDxhg6M= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.30.4 h1:Ir8BEejwSOOrD9juzFSMdXkXPyIdj1DfkFR+FJb0kc8= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.30.4/go.mod h1:NSAyKko0rDkrZOjcdCPPvMEe+FyIw/aDDQ8X+xAIW44= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.21.5 h1:EeNQ3bDA6hlx3vifHf7LT/l9dh9w7D2XgCdaD11TRU4= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.21.5/go.mod h1:X3ThW5RPV19hi7bnQ0RMAiBjZbzxj4rZlj+qdctbMWY= github.com/aws/aws-sdk-go-v2/service/ec2 v1.122.0 h1:i+YnwvmUy51p+8nwH9eDMzn5GWVLK+Pvva6To8O4AaI= github.com/aws/aws-sdk-go-v2/service/ec2 v1.122.0/go.mod h1:0FhI2Rzcv5BNM3dNnbcCx2qa2naFZoAidJi11cQgzL0= github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect v1.17.0 h1:iomaV911EqlIgdXLSQgT4q1Ksb+iXHm4VnxGuuM8pN8= @@ -146,10 +178,58 @@ github.com/aws/aws-sdk-go-v2/service/ecr v1.20.0 h1:Qw8H7V55d2P1d/a9+cLgAcdez4Gt github.com/aws/aws-sdk-go-v2/service/ecr v1.20.0/go.mod h1:pGwmNL8hN0jpBfKfTbmu+Rl0bJkDhaGl+9PQLrZ4KLo= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.0 h1:hGoFtG9m82xWTFwLLwQxMWQlwkoTUxwvKEGs9htAqEA= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.0/go.mod h1:uRNeiRoKCWT9aVtmX8mvUlDDgq+gmHLF6pGxVS7J6SY= +github.com/aws/aws-sdk-go-v2/service/ecs v1.30.1 h1:bOS7hAfvd8+glVAG88WnvRITe5N1vopGFHh10ORe/BI= +github.com/aws/aws-sdk-go-v2/service/ecs v1.30.1/go.mod h1:cxbA26Kf4UlTb40f5FON22ZPNMyEVmMS82KUJZC1E1w= +github.com/aws/aws-sdk-go-v2/service/efs v1.21.6 h1:Hk/hIxTQ2OcLqG/rThJSwawnXwNftGUyYMNq3Dmrl0E= +github.com/aws/aws-sdk-go-v2/service/efs v1.21.6/go.mod h1:cws4IYv3vkLS4pZzStRQH6AcBISp5JlI+dgBA/seDbA= +github.com/aws/aws-sdk-go-v2/service/eks v1.29.5 h1:6eSpTHOsDixcFIvPdiAAVdyCru3k2jIVRPdIQfGzfc8= +github.com/aws/aws-sdk-go-v2/service/eks v1.29.5/go.mod h1:TwqefcyPlF31NTF+fH34tJ2VwMMR6c74IbiiUgA6kVY= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.29.3 h1:VT1Yq9MPp/sQhrfeHkC0SQf8mKGrb0epAYTExGipChg= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.29.3/go.mod h1:WTAOgZesN8YgaTo0aNJPB4ufoN/QpxAHeC2HRxKay+M= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.16.5 h1:DfvVNjrKOQpJyll4gDvHbFRkbSmQvFqcEljgR3/RSz4= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.16.5/go.mod h1:xCxinsYWeneLsHYY9O2lbIzT1ZgjzuRPMjdUFgE798I= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4 h1:hcJmu7oeocSOHQKaifUoMWaSxengFuvGriP7SvuVvTw= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.21.4/go.mod h1:CbJHS0jJJNd2dZOakkG5TBbT8OHz+T0UBzR1ClIdezI= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.20.6 h1:5n5h2hr9zdB9RdbO0vaWKur97g7153I1/RmrwZC9IcA= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.20.6/go.mod h1:L9XcF8QdOpGUDPccs9VZPlNhrpfPEKFDl/vb3C+iZbs= +github.com/aws/aws-sdk-go-v2/service/emr v1.28.6 h1:5/AJnoYwHtY/jnqPB9PqtURSur9OFY16h1SL4dN3oxU= +github.com/aws/aws-sdk-go-v2/service/emr v1.28.6/go.mod h1:zS0OkiqKPhWhUwdpe5i0pzlm6sP0A2YZzSaGzRKa+p8= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.28.0 h1:T5mPJK4PHQVKr+mTYqbKxxeEsoBxm8ykzCmB3RewKFg= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.28.0/go.mod h1:yc+B63Prgo9cISl5lMBgJ5GvqztkEEpNbSbREYTs3Rg= +github.com/aws/aws-sdk-go-v2/service/iam v1.22.5 h1:qGv+oW4uV1T3kbE9uSYEfdZbo38OqxgRxxfStfDr4BU= +github.com/aws/aws-sdk-go-v2/service/iam v1.22.5/go.mod h1:8lyPrjQczmx72ac9s82zTjf9xLqs7uuFMG9TVEZ07XU= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.35 h1:UKjpIDLVF90RfV88XurdduMoTxPqtGHZMIDYZQM7RO4= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.35/go.mod h1:B3dUg0V6eJesUTi+m27NUkj7n8hdDKYUpxj8f4+TqaQ= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= +github.com/aws/aws-sdk-go-v2/service/kms v1.24.5 h1:VNEw+EdYDUdkICYAVQ6n9WoAq8ZuZr7dXKjyaOw94/Q= +github.com/aws/aws-sdk-go-v2/service/kms v1.24.5/go.mod h1:NZEhPgq+vvmM6L9w+xl78Vf7YxqUcpVULqFdrUhHg8I= +github.com/aws/aws-sdk-go-v2/service/lambda v1.39.5 h1:uMvxJFS92hNW6BRX0Ou+5zb9DskgrJQHZ+5yT8FXK5Y= +github.com/aws/aws-sdk-go-v2/service/lambda v1.39.5/go.mod h1:ByLHcf0zbHpyLTOy1iPVRPJWmAUPCiJv5k81dt52ID8= +github.com/aws/aws-sdk-go-v2/service/organizations v1.20.6 h1:ZVk/gzn/N2Wfebn7yboiQi3SB6MhBHvsqr8nyRAtg90= +github.com/aws/aws-sdk-go-v2/service/organizations v1.20.6/go.mod h1:RIwLDY2Rna/SY+FRmhJw2DGpAtkjwxD8eK+OVZvSKgI= +github.com/aws/aws-sdk-go-v2/service/rds v1.54.0 h1:FmExQnV6PXPAwP2DT3nXlWyKtCJ30gCEQIu4MUOuESo= +github.com/aws/aws-sdk-go-v2/service/rds v1.54.0/go.mod h1:UNv1vk1fU1NJefzteykVpVLA88w4WxB05g3vp2kQhYM= +github.com/aws/aws-sdk-go-v2/service/redshift v1.29.5 h1:ufl4QI+6Vuxg6E8UOFVy+CeCtXS+gBMb00oTh2qSPco= +github.com/aws/aws-sdk-go-v2/service/redshift v1.29.5/go.mod h1:U8V+thdAH44/2weiprIA0JyDWa2XBov58TtdjCTTpc8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.38.5 h1:A42xdtStObqy7NGvzZKpnyNXvoOmm+FENobZ0/ssHWk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.38.5/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= +github.com/aws/aws-sdk-go-v2/service/s3control v1.33.0 h1:f4qHghGTcns4L4F7u8AHH6pcVLwgtTMNkNZeRJZ5xlA= +github.com/aws/aws-sdk-go-v2/service/s3control v1.33.0/go.mod h1:YSdqo9knBVm5H3JVmWDhx9Wts9828nColUJzL3OKXDk= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.107.0 h1:+9g22htDWYCmZvoriTUkteSL2EnC0NHUaB442cdRMyI= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.107.0/go.mod h1:KLdYHQCLE/gpbrs1H7G/lZ4exCdXAuhYhijB13G0tY8= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3 h1:H6ZipEknzu7RkJW3w2PP75zd8XOdR35AEY5D57YrJtA= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.3/go.mod h1:5W2cYXDPabUmwULErlC92ffLhtTuyv4ai+5HhdbhfNo= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.36.2 h1:BtNDz3VSS/FCri8qnTvvXCMUh8hRFbtAZPyHOFUQMTo= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.36.2/go.mod h1:ebEoleM/K5kbk8mn4fquflslbb/RuVTRGeJH6q3QPGI= +github.com/aws/aws-sdk-go-v2/service/sns v1.21.5 h1:KI6xffjUcP3KgpJEtKefQL8B7AXFqyAXkVw8SyvT/o8= +github.com/aws/aws-sdk-go-v2/service/sns v1.21.5/go.mod h1:eEjNDG7Y1BH7Ci9qKVH2L02se84z5GPCqXKcqEUpnXg= github.com/aws/aws-sdk-go-v2/service/ssm v1.38.0 h1:JON9MBvwUlM8HXylfB2caZuH3VXz9RxO4SMp2+TNc3Q= github.com/aws/aws-sdk-go-v2/service/ssm v1.38.0/go.mod h1:JjBzoceyKkpQY3v1GPIdg6kHqUFHRJ7SDlwtwoH0Qh8= github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= @@ -831,7 +911,7 @@ github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= -github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.1 h1:812oFiXI+G55vxsFf+8bIZ1ux30qtkdqzKbEFwyX3Tk= github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= diff --git a/providers-sdk/v1/inventory/inventory.pb.go b/providers-sdk/v1/inventory/inventory.pb.go index e24023157f..8b2fd8b78f 100644 --- a/providers-sdk/v1/inventory/inventory.pb.go +++ b/providers-sdk/v1/inventory/inventory.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc v3.21.12 // source: inventory.proto package inventory diff --git a/providers-sdk/v1/plugin/plugin.pb.go b/providers-sdk/v1/plugin/plugin.pb.go index 6667ed107e..932887a239 100644 --- a/providers-sdk/v1/plugin/plugin.pb.go +++ b/providers-sdk/v1/plugin/plugin.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc v3.21.12 // source: plugin.proto package plugin diff --git a/providers-sdk/v1/plugin/plugin_grpc.pb.go b/providers-sdk/v1/plugin/plugin_grpc.pb.go index 7c1b4abd29..36fea2038d 100644 --- a/providers-sdk/v1/plugin/plugin_grpc.pb.go +++ b/providers-sdk/v1/plugin/plugin_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.3 +// - protoc v3.21.12 // source: plugin.proto package plugin diff --git a/providers-sdk/v1/resources/resources.pb.go b/providers-sdk/v1/resources/resources.pb.go index 7aa7fedf41..7f61d638c2 100644 --- a/providers-sdk/v1/resources/resources.pb.go +++ b/providers-sdk/v1/resources/resources.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc v3.21.12 // source: resources.proto package resources diff --git a/providers-sdk/v1/vault/vault.pb.go b/providers-sdk/v1/vault/vault.pb.go index 0b667d5e2a..0e3ca86209 100644 --- a/providers-sdk/v1/vault/vault.pb.go +++ b/providers-sdk/v1/vault/vault.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc v3.21.12 // source: vault.proto package vault diff --git a/providers.yaml b/providers.yaml index 3379838386..683ae00d18 100644 --- a/providers.yaml +++ b/providers.yaml @@ -12,4 +12,4 @@ # In this case it will be pulled from your local repo # instead of using the pre-installed provider in # your OS (like ~/.mondoo/providers/os). -builtin: [] +builtin: [aws] diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index a16ab84bdf..e45544b5f8 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -1626,6 +1626,8 @@ private aws.ec2.instance @defaults("arn state") { vpc() aws.vpc // A value of optional for http tokens denotes imdsv1 server compatibility; required is imdsv2 httpTokens string + // Status of the IMDS endpoint is enabled on the instance + httpEndpoint string // Patch state information about the instance patchState() dict // State of the instance (pending, running, stopping, stopped, rebooting, or terminated) diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index dba7cf286f..41d8a2a667 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -2325,6 +2325,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.ec2.instance.httpTokens": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsEc2Instance).GetHttpTokens()).ToDataRes(types.String) }, + "aws.ec2.instance.httpEndpoint": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsEc2Instance).GetHttpEndpoint()).ToDataRes(types.String) + }, "aws.ec2.instance.patchState": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsEc2Instance).GetPatchState()).ToDataRes(types.Dict) }, @@ -5353,6 +5356,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsEc2Instance).HttpTokens, ok = plugin.RawToTValue[string](v.Value, v.Error) return }, + "aws.ec2.instance.httpEndpoint": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsEc2Instance).HttpEndpoint, ok = plugin.RawToTValue[string](v.Value, v.Error) + return + }, "aws.ec2.instance.patchState": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsEc2Instance).PatchState, ok = plugin.RawToTValue[interface{}](v.Value, v.Error) return @@ -14589,6 +14596,7 @@ type mqlAwsEc2Instance struct { Ssm plugin.TValue[interface{}] Vpc plugin.TValue[*mqlAwsVpc] HttpTokens plugin.TValue[string] + HttpEndpoint plugin.TValue[string] PatchState plugin.TValue[interface{}] State plugin.TValue[string] DeviceMappings plugin.TValue[[]interface{}] @@ -14692,6 +14700,10 @@ func (c *mqlAwsEc2Instance) GetHttpTokens() *plugin.TValue[string] { return &c.HttpTokens } +func (c *mqlAwsEc2Instance) GetHttpEndpoint() *plugin.TValue[string] { + return &c.HttpEndpoint +} + func (c *mqlAwsEc2Instance) GetPatchState() *plugin.TValue[interface{}] { return plugin.GetOrCompute[interface{}](&c.PatchState, func() (interface{}, error) { return c.patchState() diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index 4743fa5de0..6349418c4e 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -838,6 +838,8 @@ resources: detailedMonitoring: {} deviceMappings: {} ebsOptimized: {} + httpEndpoint: + min_mondoo_version: latest httpTokens: {} image: {} instanceId: {} diff --git a/providers/aws/resources/aws_ec2.go b/providers/aws/resources/aws_ec2.go index 4e4e744e9b..34564fff6c 100644 --- a/providers/aws/resources/aws_ec2.go +++ b/providers/aws/resources/aws_ec2.go @@ -714,6 +714,7 @@ func (a *mqlAwsEc2) gatherInstanceInfo(instances []ec2types.Reservation, imdsvVe "publicIp": llx.StringData(convert.ToString(instance.PublicIpAddress)), "detailedMonitoring": llx.StringData(string(instance.Monitoring.State)), "httpTokens": llx.StringData(httpTokens), + "httpEndpoint": llx.StringData(string(instance.MetadataOptions.HttpEndpoint)), "state": llx.StringData(string(instance.State.Name)), "deviceMappings": llx.ArrayData(mqlDevices, types.Resource("aws.ec2.instance.device")), "securityGroups": llx.ArrayData(sgs, types.Resource("aws.ec2.securitygroup")), diff --git a/providers/builtin_dev.go b/providers/builtin_dev.go index 4deeebda87..50976ee7a4 100644 --- a/providers/builtin_dev.go +++ b/providers/builtin_dev.go @@ -10,11 +10,16 @@ import ( _ "embed" // osconf "go.mondoo.com/cnquery/providers/os/config" // os "go.mondoo.com/cnquery/providers/os/provider" + awsconf "go.mondoo.com/cnquery/providers/aws/config" + aws "go.mondoo.com/cnquery/providers/aws/provider" ) // //go:embed os/resources/os.resources.json // var osInfo []byte +//go:embed aws.resources.json +var awsInfo []byte + func init() { // builtinProviders[osconf.Config.ID] = &builtinProvider{ // Runtime: &RunningProvider{ @@ -27,4 +32,15 @@ func init() { // Config: &osconf.Config, // } + builtinProviders[awsconf.Config.ID] = &builtinProvider{ + Runtime: &RunningProvider{ + Name: awsconf.Config.Name, + ID: awsconf.Config.ID, + Plugin: aws.Init(), + Schema: MustLoadSchema("aws", awsInfo), + isClosed: false, + }, + Config: &awsconf.Config, + } + }