turbot / powerpipe

Powerpipe: Dashboards for DevOps. Visualize cloud configurations. Assess security posture against a massive library of benchmarks. Build custom dashboards with code.
https://powerpipe.io/
GNU Affero General Public License v3.0
282 stars 20 forks source link

--search-path-prefix issue #507

Open Mysticx69 opened 3 weeks ago

Mysticx69 commented 3 weeks ago

Describe the bug When using --search-path-prefix with powerpipe, it seems that it's not working. I tried to use old steampipe check command with --search-path-prefix and this is working. Im using steampipe as data source.

Powerpipe version (powerpipe -v) Example: v0.4.4

To reproduce Have multiple connections and run : powerpipe benchmark run aws_compliance.benchmark.cis_v300 --search-path-prefix _connectionXYZ_

Expected behavior I expected to have connectionXYZ as the first argument in my search_path but it's not the case, the search_path remained unchanged.

Additional context Add any other context about the problem here.

Mysticx69 commented 3 weeks ago

To resume :

kaidaguerre commented 3 weeks ago

I'm unable to reproduce this. I ran the compliance mod with 3 AWS connections, and by setting the search path prefix the control results contained the account id for the correct connection.

I also tested it out using this simple mod, which prints the connection name of the first AWS connection in the search path. Setting the search path prefix correctly changes the output:

mod "local" {
}

benchmark "b1"{
    children = [control.c1]
}
control "c1"{
    sql = "select '' as resource, sp_connection_name as reason, 'alarm' as status  from aws_account"
}