@@ -2,6 +2,7 @@ package opengovernance
22
33import (
44 "context"
5+ "encoding/json"
56 "github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
67
78 og_client "github.com/opengovern/opensecurity/pkg/cloudql/client"
@@ -22,24 +23,37 @@ func tablePlatformArtifactSboms(_ context.Context) *plugin.Table {
2223 Columns : []* plugin.Column {
2324 {
2425 Name : "image_url" ,
25- Transform : transform .FromField ("Description.imageUrl " ),
26+ Transform : transform .FromField ("Description.ImageURL " ),
2627 Type : proto .ColumnType_STRING ,
2728 },
2829 {
2930 Name : "artifact_id" ,
30- Transform : transform .FromField ("Description.artifactId " ),
31+ Transform : transform .FromField ("Description.ArtifactID " ),
3132 Type : proto .ColumnType_STRING ,
3233 },
3334 {
3435 Name : "sbom_format" ,
35- Transform : transform .FromField ("Description.sbomFormat " ),
36+ Transform : transform .FromField ("Description.SbomFormat " ),
3637 Type : proto .ColumnType_STRING ,
3738 },
3839 {
3940 Name : "sbom" ,
40- Transform : transform .FromField ("Description.sbom " ),
41+ Transform : transform .FromField ("Description.Sbom " ),
4142 Type : proto .ColumnType_JSON ,
4243 },
44+ {
45+ Name : "platform_description" ,
46+ Type : proto .ColumnType_JSON ,
47+ Description : "The full model description of the resource" ,
48+ Transform : transform .FromField ("Description" ).Transform (marshalJSON ),
49+ },
4350 },
4451 }
4552}
53+ func marshalJSON (_ context.Context , d * transform.TransformData ) (interface {}, error ) {
54+ b , err := json .Marshal (d .Value )
55+ if err != nil {
56+ return nil , err
57+ }
58+ return string (b ), nil
59+ }
0 commit comments