cdk-validator-cfnguard icon indicating copy to clipboard operation
cdk-validator-cfnguard copied to clipboard

Support location for non-TypeScript languages (e.g. Python)

Open alexpulver opened this issue 1 year ago • 1 comments

For example, in a Python-based AWS CDK application, CfnGuardValidator doesn't show the location of the Ingress custom construct, but an AWS CDK internal module.

api_gw_v2_access_logs_enabled_check (1 occurrences)

  Occurrences:

    - Construct Path: UserManagementBackend-Service-Sandbox/Ingress/APIGatewayHTTPAPI/DefaultStage/Resource
    - Template Path: UserManagementBackend-Service-Sandbox.template.json
    - Creation Stack:
        └──  UserManagementBackend-Service-Sandbox (UserManagementBackend-Service-Sandbox)
             │ Construct: aws-cdk-lib.Stack
             │ Library Version: 2.89.0
             │ Location: KernelHost.processRequest (/private/var/folders/z2/db8bn7_s0534kt3hj2ds_82c0000gr/T/tmpm_v7p7z9/lib/program.js:11598:36)
             └──  Ingress (UserManagementBackend-Service-Sandbox/Ingress)
                  │ Construct: constructs.Construct
                  │ Library Version: 10.2.69
                  │ Location: Kernel.create (/private/var/folders/z2/db8bn7_s0534kt3hj2ds_82c0000gr/T/tmpm_v7p7z9/lib/program.js:9673:93)

alexpulver avatar Sep 23 '23 10:09 alexpulver

The Location feature uses the stack traces from the CDK app which don't work for non-TypeScript languages currently. Looks like we need https://github.com/aws/jsii/issues/47

corymhall avatar Nov 20 '23 10:11 corymhall