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
Describe the bug
The sql column of the introspection table steampipe_control returns null when controls use query = query.<query_file_name> format for linking to the SQL query.
This issue doesn't come up if the old format of query reference is used - sql = query.<query_file_name>.sql
Steampipe version (steampipe -v)
Example: v0.19.0-rc.3
To reproduce
In the steampipe-mod-aws-compliance folder, run steampipe query
Run the query - select resource_name, SQL from steampipe_control where resource_name = 'cis_v130_2_1_2'
Expected behavior
The control should return the associated query.
Additional context
Workaround:
You could revert to an earlier version of the compliance mod - Please run git checkout v0.54 (This change was implemented in v0.55)
Running the same query -
> select resource_name, sql from steampipe_control where resource_name = 'cis_v130_2_1_2'
+----------------+---------------------------------------------------------------------------+
| resource_name | sql |
+----------------+---------------------------------------------------------------------------+
| cis_v130_2_1_2 | with ssl_ok as ( |
| | select |
| | distinct name, |
| | arn, |
| | 'ok' as status |
| | from |
| | aws_s3_bucket, |
| | jsonb_array_elements(policy_std -> 'Statement') as s, |
| | jsonb_array_elements_text(s -> 'Principal' -> 'AWS') as p, |
| | jsonb_array_elements_text(s -> 'Action') as a, |
| | jsonb_array_elements_text(s -> 'Resource') as r, |
| | jsonb_array_elements_text( |
| | s -> 'Condition' -> 'Bool' -> 'aws:securetransport' |
| | ) as ssl |
| | where |
| | p = '*' |
| | and s ->> 'Effect' = 'Deny' |
| | and ssl :: bool = false |
| | ) |
| | select |
| | -- Required Columns |
| | b.arn as resource, |
| | case |
| | when ok.status = 'ok' then 'ok' |
| | else 'alarm' |
| | end status, |
| | case |
| | when ok.status = 'ok' then b.name || ' bucket policy enforces HTTPS.' |
| | else b.name || ' bucket policy does not enforce HTTPS.' |
| | end reason, |
| | -- Additional Dimensions |
| | b.region, |
| | b.account_id |
| | from |
| | aws_s3_bucket as b |
| | left join ssl_ok as ok on ok.name = b.name; |
+----------------+---------------------------------------------------------------------------+
Describe the bug
The
sql
column of the introspection tablesteampipe_control
returns null when controls usequery = query.<query_file_name>
format for linking to the SQL query.This issue doesn't come up if the old format of query reference is used -
sql = query.<query_file_name>.sql
Steampipe version (
steampipe -v
)Example: v0.19.0-rc.3
To reproduce
select resource_name, SQL from steampipe_control where resource_name = 'cis_v130_2_1_2'
Expected behavior
The control should return the associated query.
Additional context
Workaround:
You could revert to an earlier version of the compliance mod - Please run git checkout v0.54 (This change was implemented in v0.55)
Running the same query -
Relevant slack thread - https://steampipe.slack.com/archives/C01UECB59A7/p1677219398282809
The text was updated successfully, but these errors were encountered: