Repository: datreeio/datree
Pull request #772 (2022-08-29 13:12:02)

feat: add failed key path and line to output


Patch:
diff --git a/go.mod b/go.mod
index 05f33d0..59adbf0 100644
--- a/go.mod
+++ b/go.mod
@@ -18,6 +18,7 @@ require (
 	github.com/stretchr/testify v1.7.0
 	github.com/xeipuuv/gojsonschema v1.2.0
 	github.com/yannh/kubeconform v0.4.14
+	gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473
 	gopkg.in/yaml.v2 v2.4.0
 	gopkg.in/yaml.v3 v3.0.1
 	k8s.io/apimachinery v0.23.5
@@ -25,8 +26,16 @@ require (
 )
 
 require (
+	github.com/a8m/envsubst v1.3.0 // indirect
+	github.com/alecthomas/participle/v2 v2.0.0-beta.5 // indirect
+	github.com/elliotchance/orderedmap v1.4.0 // indirect
+	github.com/goccy/go-json v0.9.11 // indirect
+	github.com/goccy/go-yaml v1.9.5 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/jinzhu/copier v0.3.5 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
+	golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
+	golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 )
 
@@ -37,8 +46,8 @@ require (
 	github.com/google/uuid v1.2.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
 	github.com/inconshreveable/mousetrap v1.0.0 // indirect
-	github.com/magiconair/properties v1.8.1 // indirect
-	github.com/mattn/go-colorable v0.1.9 // indirect
+	github.com/magiconair/properties v1.8.6 // indirect
+	github.com/mattn/go-colorable v0.1.12 // indirect
 	github.com/mattn/go-isatty v0.0.14 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
 	github.com/mitchellh/mapstructure v1.1.2 // indirect
@@ -55,13 +64,14 @@ require (
 	github.com/tklauser/numcpus v0.3.0 // indirect
 	github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
 	github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
-	golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
+	golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e // indirect
 	golang.org/x/text v0.3.7 // indirect
 	gopkg.in/ini.v1 v1.51.0 // indirect
 )
 
 require (
 	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
+	github.com/mikefarah/yq/v4 v4.27.3
 	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
 	github.com/shirou/gopsutil/v3 v3.22.2
 	github.com/yusufpapurcu/wmi v1.2.2 // indirect
diff --git a/go.sum b/go.sum
index 4dc755a..ffe04f9 100644
--- a/go.sum
+++ b/go.sum
@@ -44,6 +44,12 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/a8m/envsubst v1.3.0 h1:GmXKmVssap0YtlU3E230W98RWtWCyIZzjtf1apWWyAg=
+github.com/a8m/envsubst v1.3.0/go.mod h1:MVUTQNGQ3tsjOOtKCNd+fl8RzhsXcDvvAEzkhGtlsbY=
+github.com/alecthomas/assert/v2 v2.0.3 h1:WKqJODfOiQG0nEJKFKzDIG3E29CN2/4zR9XGJzKIkbg=
+github.com/alecthomas/participle/v2 v2.0.0-beta.5 h1:y6dsSYVb1G5eK6mgmy+BgI3Mw35a3WghArZ/Hbebrjo=
+github.com/alecthomas/participle/v2 v2.0.0-beta.5/go.mod h1:RC764t6n4L8D8ITAJv0qdokritYSNR3wV5cVwmIEaMM=
+github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -83,6 +89,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3
 github.com/eiannone/keyboard v0.0.0-20200508000154-caf4b762e807 h1:jdjd5e68T4R/j4PWxfZqcKY8KtT9oo8IPNVuV4bSXDQ=
 github.com/eiannone/keyboard v0.0.0-20200508000154-caf4b762e807/go.mod h1:Xoiu5VdKMvbRgHuY7+z64lhu/7lvax/22nzASF6GrO8=
 github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/elliotchance/orderedmap v1.4.0 h1:wZtfeEONCbx6in1CZyE6bELEt/vFayMvsxqI5SgsR+A=
+github.com/elliotchance/orderedmap v1.4.0/go.mod h1:wsDwEaX5jEoyhbs7x93zk2H/qv0zwuhg4inXhDkYqys=
 github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -92,6 +100,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
 github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
 github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
 github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
@@ -115,7 +124,15 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34
 github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
 github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
+github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
+github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
+github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-yaml v1.9.5 h1:Eh/+3uk9kLxG4koCX6lRMAPS1OaMSAi+FJcya0INdB0=
+github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -216,11 +233,14 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
 github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
 github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
 github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
+github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
 github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
 github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
@@ -243,18 +263,22 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/kyokomi/emoji v2.2.4+incompatible h1:np0woGKwx9LiHAQmwZx79Oc0rHpNw3o+3evou4BEPv4=
 github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA=
+github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
 github.com/lithammer/shortuuid v3.0.0+incompatible h1:NcD0xWW/MZYXEHa6ITy6kaXN5nwm/V115vj2YXfhS0w=
 github.com/lithammer/shortuuid v3.0.0+incompatible/go.mod h1:FR74pbAuElzOUuenUHTK2Tciko1/vKuIKS9dSkDrA4w=
 github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
 github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
-github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
 github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
+github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
 github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
+github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
 github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
 github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
 github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
@@ -265,6 +289,8 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/mikefarah/yq/v4 v4.27.3 h1:i07Cla0Hqzkb6yfw8D0KqfYJ0+uA0IOjSfhlzTXch/I=
+github.com/mikefarah/yq/v4 v4.27.3/go.mod h1:bUnRs1NSeM504h5rCBCTmhKwR2g8ka6dEHBLdZ/p3GI=
 github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
 github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
 github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
@@ -299,6 +325,7 @@ github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181
 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -479,6 +506,8 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
 golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
+golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -554,9 +583,10 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
-golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e h1:NHvCuwuS43lGnYhten69ZWqi2QOj/CiDNcKbVqwVoew=
+golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -628,8 +658,9 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0=
+golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
 google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
@@ -734,6 +765,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
 gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
 gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
 gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 h1:6D+BvnJ/j6e222UW8s2qTSe3wGBtvo0MbVQG/c5k8RE=
+gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog=
 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
 gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
@@ -746,7 +779,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/pkg/cliClient/evaluation.go b/pkg/cliClient/evaluation.go
index c38e9ed..d5e1f55 100644
--- a/pkg/cliClient/evaluation.go
+++ b/pkg/cliClient/evaluation.go
@@ -155,12 +155,19 @@ type FileData struct {
 	ConfigurationsCount int    `json:"configurationsCount"`
 }
 
+type FailureLocation struct {
+	SchemaPath        string `json:"schemaPath"`
+	FailedErrorLine   int    `json:"failedErrorLine"`
+	FailedErrorColumn int    `json:"failedErrorColumn"`
+}
+
 type Configuration struct {
-	Name        string `json:"metadataName"`
-	Kind        string `json:"kind"`
-	Occurrences int    `json:"occurrences"`
-	IsSkipped   bool   `json:"isSkipped"`
-	SkipMessage string `json:"skipMessage"`
+	Name             string            `json:"metadataName"`
+	Kind             string            `json:"kind"`
+	Occurrences      int               `json:"occurrences"`
+	IsSkipped        bool              `json:"isSkipped"`
+	SkipMessage      string            `json:"skipMessage"`
+	FailureLocations []FailureLocation `json:"failureLocation"`
 }
 
 type FailedRule struct {
diff --git a/pkg/evaluation/evaluator.go b/pkg/evaluation/evaluator.go
index 0edf909..acc9ea8 100644
--- a/pkg/evaluation/evaluator.go
+++ b/pkg/evaluation/evaluator.go
@@ -2,16 +2,21 @@ package evaluation
 
 import (
 	"encoding/json"
+	"os"
+	"regexp"
 	"strings"
 
-	"github.com/xeipuuv/gojsonschema"
-
 	policy_factory "github.com/datreeio/datree/bl/policy"
 	"github.com/datreeio/datree/pkg/ciContext"
 	"github.com/datreeio/datree/pkg/cliClient"
 	"github.com/datreeio/datree/pkg/extractor"
 	"github.com/datreeio/datree/pkg/jsonSchemaValidator"
 	"github.com/datreeio/datree/pkg/utils"
+	"github.com/mikefarah/yq/v4/pkg/yqlib"
+
+	"github.com/xeipuuv/gojsonschema"
+	"gopkg.in/op/go-logging.v1"
+	"gopkg.in/yaml.v3"
 )
 
 const (
@@ -26,6 +31,7 @@ type Evaluator struct {
 	cliClient           CLIClient
 	ciContext           *ciContext.CIContext
 	jsonSchemaValidator *jsonSchemaValidator.JSONSchemaValidator
+	yqlibEvaluator      yqlib.Evaluator
 }
 
 func New(c CLIClient, ciContext *ciContext.CIContext) *Evaluator {
@@ -33,9 +39,20 @@ func New(c CLIClient, ciContext *ciContext.CIContext) *Evaluator {
 		cliClient:           c,
 		ciContext:           ciContext,
 		jsonSchemaValidator: jsonSchemaValidator.New(),
+		yqlibEvaluator:      newYqEvaluator(),
 	}
 }
 
+func newYqEvaluator() yqlib.Evaluator {
+	yqEvaluator := yqlib.NewAllAtOnceEvaluator()
+	logger := yqlib.GetLogger()
+	backendLogger := logging.NewLogBackend(os.Stderr, "", 0)
+	backendLoggerLeveled := logging.AddModuleLevel(backendLogger)
+	backendLoggerLeveled.SetLevel(logging.ERROR, "")
+	logger.SetBackend(backendLoggerLeveled)
+	return yqEvaluator
+}
+
 type FileNameRuleMapper map[string]map[string]*Rule
 type FailedRulesByFiles map[string]map[string]*cliClient.FailedRule
 type EvaluationResultsSummery struct {
@@ -154,8 +171,9 @@ func (e *Evaluator) Evaluate(policyCheckData PolicyCheckData) (PolicyCheckResult
 
 func (e *Evaluator) evaluateConfiguration(failedRulesByFiles FailedRulesByFiles, policyCheckData PolicyCheckData, fileName string, configuration extractor.Configuration) error {
 	skipAnnotations := extractSkipAnnotations(configuration)
+
 	for _, rule := range policyCheckData.Policy.Rules {
-		failedRule, err := e.evaluateRule(rule, configuration.Payload, configuration.MetadataName, configuration.Kind, skipAnnotations)
+		failedRule, err := e.evaluateRule(rule, configuration.Payload, configuration.MetadataName, configuration.Kind, skipAnnotations, configuration.YamlNode)
 		if err != nil {
 			return err
 		}
@@ -163,14 +181,13 @@ func (e *Evaluator) evaluateConfiguration(failedRulesByFiles FailedRulesByFiles,
 		if failedRule == nil {
 			continue
 		}
-
 		addFailedRule(failedRulesByFiles, fileName, rule.RuleIdentifier, failedRule)
 	}
 
 	return nil
 }
 
-func (e *Evaluator) evaluateRule(rule policy_factory.RuleWithSchema, configurationJson []byte, configurationName string, configurationKind string, skipAnnotations map[string]string) (*cliClient.FailedRule, error) {
+func (e *Evaluator) evaluateRule(rule policy_factory.RuleWithSchema, configurationJson []byte, configurationName string, configurationKind string, skipAnnotations map[string]string, yamlNode yaml.Node) (*cliClient.FailedRule, error) {
 	ruleSchemaJson, err := json.Marshal(rule.Schema)
 	if err != nil {
 		return nil, err
@@ -190,11 +207,24 @@ func (e *Evaluator) evaluateRule(rule policy_factory.RuleWithSchema, configurati
 	}
 
 	configuration := cliClient.Configuration{
-		Name:        configurationName,
-		Kind:        configurationKind,
-		Occurrences: occurrences,
-		IsSkipped:   false,
-		SkipMessage: "",
+		Name:             configurationName,
+		Kind:             configurationKind,
+		Occurrences:      occurrences,
+		IsSkipped:        false,
+		SkipMessage:      "",
+		FailureLocations: []cliClient.FailureLocation{},
+	}
+
+	for _, detailedResult := range validationResult {
+		failedErrorLine, failedErrorColumn := e.getFailedRuleLineAndColumn(detailedResult.InstanceLocation, yamlNode)
+
+		failureLocation := cliClient.FailureLocation{
+			SchemaPath:        detailedResult.InstanceLocation,
+			FailedErrorLine:   failedErrorLine,
+			FailedErrorColumn: failedErrorColumn,
+		}
+
+		configuration.FailureLocations = append(configuration.FailureLocations, failureLocation)
 	}
 
 	if skipRuleExists {
@@ -281,11 +311,12 @@ func (e *Evaluator) formatEvaluationResults(evaluationResults FailedRulesByFiles
 				mapper[filePath][ruleIdentifier].OccurrencesDetails = append(
 					mapper[filePath][ruleIdentifier].OccurrencesDetails,
 					OccurrenceDetails{
-						MetadataName: configuration.Name,
-						Kind:         configuration.Kind,
-						Occurrences:  configuration.Occurrences,
-						IsSkipped:    configuration.IsSkipped,
-						SkipMessage:  configuration.SkipMessage,
+						MetadataName:     configuration.Name,
+						Kind:             configuration.Kind,
+						Occurrences:      configuration.Occurrences,
+						IsSkipped:        configuration.IsSkipped,
+						SkipMessage:      configuration.SkipMessage,
+						FailureLocations: configuration.FailureLocations,
 					},
 				)
 			}
@@ -362,3 +393,18 @@ func extractSkipAnnotations(configuration extractor.Configuration) map[string]st
 
 	return skipAnnotations
 }
+
+func (e *Evaluator) getFailedRuleLineAndColumn(schemaPath string, yamlNode yaml.Node) (failedErrorLine int, failedErrorColumn int) {
+
+	instanceLocationYqPath := strings.Replace(schemaPath, "/", ".", -1)
+	instanceLocationYqPath = regexp.MustCompile(`\d+`).ReplaceAllString(instanceLocationYqPath, `[$0]`)
+
+	nodeList, err := e.yqlibEvaluator.EvaluateNodes(instanceLocationYqPath, &yamlNode)
+	if err != nil {
+		return
+	}
+
+	candidateNode := nodeList.Back().Value.(*yqlib.CandidateNode).Node
+
+	return candidateNode.Line, candidateNode.Column
+}
diff --git a/pkg/evaluation/printer.go b/pkg/evaluation/printer.go
index 1f070a7..509686a 100644
--- a/pkg/evaluation/printer.go
+++ b/pkg/evaluation/printer.go
@@ -312,8 +312,9 @@ func parseToPrinterWarnings(results *EvaluationResults, invalidYamlFiles []*extr
 						failedRule.OccurrencesDetails = append(
 							failedRule.OccurrencesDetails,
 							printer.OccurrenceDetails{
-								MetadataName: occurrenceDetails.MetadataName,
-								Kind:         occurrenceDetails.Kind,
+								MetadataName:     occurrenceDetails.MetadataName,
+								Kind:             occurrenceDetails.Kind,
+								FailureLocations: occurrenceDetails.FailureLocations,
 							},
 						)
 					}
diff --git a/pkg/evaluation/rule.go b/pkg/evaluation/rule.go
index c450e29..8339f0c 100644
--- a/pkg/evaluation/rule.go
+++ b/pkg/evaluation/rule.go
@@ -1,5 +1,7 @@
 package evaluation
 
+import "github.com/datreeio/datree/pkg/cliClient"
+
 type Rule struct {
 	Identifier         string
 	Name               string
@@ -19,9 +21,10 @@ func (rp *Rule) GetFailedOccurrencesCount() int {
 }
 
 type OccurrenceDetails struct {
-	MetadataName string `yaml:"metadataName" json:"metadataName" xml:"metadataName"`
-	Kind         string `yaml:"kind" json:"kind" xml:"kind"`
-	SkipMessage  string `yaml:"skipMessage" json:"skipMessage" xml:"skipMessage"`
-	Occurrences  int    `yaml:"occurrences" json:"occurrences" xml:"occurrences"`
-	IsSkipped    bool   `yaml:"isSkipped" json:"isSkipped" xml:"isSkipped"`
+	MetadataName     string                      `yaml:"metadataName" json:"metadataName" xml:"metadataName"`
+	Kind             string                      `yaml:"kind" json:"kind" xml:"kind"`
+	SkipMessage      string                      `yaml:"skipMessage" json:"skipMessage" xml:"skipMessage"`
+	Occurrences      int                         `yaml:"occurrences" json:"occurrences" xml:"occurrences"`
+	IsSkipped        bool                        `yaml:"isSkipped" json:"isSkipped" xml:"isSkipped"`
+	FailureLocations []cliClient.FailureLocation `yaml:"failureLocations" json:"failureLocations" xml:"failureLocations"`
 }
diff --git a/pkg/extractor/extractor.go b/pkg/extractor/extractor.go
index 5f4f6e5..e272c8c 100644
--- a/pkg/extractor/extractor.go
+++ b/pkg/extractor/extractor.go
@@ -9,7 +9,7 @@ import (
 	"path/filepath"
 
 	"gopkg.in/yaml.v3"
-	yamlConvertor "sigs.k8s.io/yaml"
+	k8sSigsYaml "sigs.k8s.io/yaml"
 )
 
 type InvalidFile struct {
@@ -68,6 +68,7 @@ type Configuration struct {
 	ApiVersion   string
 	Annotations  map[string]interface{}
 	Payload      []byte
+	YamlNode     yaml.Node
 }
 
 type FileConfigurations struct {
@@ -91,8 +92,8 @@ func extractYamlConfigurations(content string) (*[]Configuration, error) {
 
 	var err error
 	for {
-		var anyTypeStore interface{}
-		err = yamlDecoder.Decode(&anyTypeStore)
+		var yamlNode yaml.Node
+		err = yamlDecoder.Decode(&yamlNode)
 		if err != nil {
 			if err == io.EOF {
 				break
@@ -100,24 +101,27 @@ func extractYamlConfigurations(content string) (*[]Configuration, error) {
 				return nil, err
 			}
 		}
+		var yamlByteArray bytes.Buffer
 
-		yamlByteArray, err := yamlConvertor.Marshal(anyTypeStore)
+		enc := yaml.NewEncoder(&yamlByteArray)
+		enc.SetIndent(2)
+		err = enc.Encode(&yamlNode)
 		if err != nil {
 			return nil, err
 		}
 
-		jsonByte, err := yamlConvertor.YAMLToJSON(yamlByteArray)
+		jsonByte, err := k8sSigsYaml.YAMLToJSON(yamlByteArray.Bytes())
 		if err != nil {
 			return nil, err
 		}
 
-		configurations = append(configurations, extractConfigurationK8sData(jsonByte))
+		configurations = append(configurations, extractConfigurationK8sData(jsonByte, yamlNode))
 	}
 
 	return &configurations, nil
 }
 
-func extractConfigurationK8sData(content []byte) Configuration {
+func extractConfigurationK8sData(content []byte, yamlNode yaml.Node) Configuration {
 	var configuration Configuration
 	var jsonObject map[string]interface{}
 	configuration.Payload = content
@@ -144,7 +148,7 @@ func extractConfigurationK8sData(content []byte) Configuration {
 	if kind := jsonObject["kind"]; kind != nil {
 		configuration.Kind = kind.(string)
 	}
-
+	configuration.YamlNode = yamlNode
 	return configuration
 }
 
diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go
index 1770b60..7a255e4 100644
--- a/pkg/printer/printer.go
+++ b/pkg/printer/printer.go
@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"strings"
 
+	"github.com/datreeio/datree/pkg/cliClient"
 	"github.com/santhosh-tekuri/jsonschema/v5"
 
 	"github.com/xeipuuv/gojsonschema"
@@ -34,9 +35,10 @@ type FailedRule struct {
 }
 
 type OccurrenceDetails struct {
-	MetadataName string
-	Kind         string
-	SkipMessage  string
+	MetadataName     string
+	Kind             string
+	SkipMessage      string
+	FailureLocations []cliClient.FailureLocation
 }
 
 type InvalidYamlInfo struct {
@@ -207,6 +209,12 @@ func (p *Printer) GetWarningsText(warnings []Warning) string {
 
 				for _, occurrenceDetails := range failedRule.OccurrencesDetails {
 					sb.WriteString(fmt.Sprintf("    - metadata.name: %v (kind: %v)\n", p.getStringOrNotAvailableText(occurrenceDetails.MetadataName), p.getStringOrNotAvailableText(occurrenceDetails.Kind)))
+					for _, validationResult := range occurrenceDetails.FailureLocations {
+						failurePath := fmt.Sprintf("%v (line: %d:%d)\n", strings.Replace(validationResult.SchemaPath, "/", ".", -1)[1:], validationResult.FailedErrorLine, validationResult.FailedErrorColumn)
+						sb.WriteString(fmt.Sprintf("      > key: %v", failurePath))
+					}
+					sb.WriteString("\n")
+
 				}
 				sb.WriteString(fmt.Sprintf("%v %v\n", p.Theme.Emoji.Suggestion, failedRule.Suggestion))
 


Test patch:
diff --git a/pkg/evaluation/evaluator_test.go b/pkg/evaluation/evaluator_test.go
index 64cdf7b..36b04ab 100644
--- a/pkg/evaluation/evaluator_test.go
+++ b/pkg/evaluation/evaluator_test.go
@@ -1,11 +1,15 @@
 package evaluation
 
 import (
+	"bytes"
+	_ "embed"
 	"encoding/json"
+	"io"
 	"path/filepath"
 	"testing"
 
 	"github.com/datreeio/datree/pkg/defaultRules"
+	"gopkg.in/yaml.v3"
 
 	policy_factory "github.com/datreeio/datree/bl/policy"
 	"github.com/datreeio/datree/pkg/fileReader"
@@ -163,6 +167,28 @@ func TestEvaluate(t *testing.T) {
 	}
 }
 
+//go:embed test_fixtures/FailureLocations.yaml
+var FailureLocationsStr string
+
+func TestGetFailedRuleLineAndColumn(t *testing.T) {
+	failedLocationSchemaPath := "/spec/template/spec/containers/0/image"
+	FailureLocationsByteArray := []byte(FailureLocationsStr)
+	yamlDecoder := yaml.NewDecoder(bytes.NewReader(FailureLocationsByteArray))
+	var testCaseYamlNode yaml.Node
+	err := yamlDecoder.Decode(&testCaseYamlNode)
+	if err != nil {
+		if err != io.EOF {
+			panic(err)
+		}
+	}
+	mockedCliClient := &mockCliClient{}
+	evaluator := New(mockedCliClient, nil)
+
+	line, column := evaluator.getFailedRuleLineAndColumn(failedLocationSchemaPath, testCaseYamlNode)
+	assert.Equal(t, 23, line)
+	assert.Equal(t, 18, column)
+}
+
 type evaluateArgs struct {
 	policyCheckData PolicyCheckData
 }
diff --git a/pkg/evaluation/printer_test.go b/pkg/evaluation/printer_test.go
index 89624bb..da188e9 100644
--- a/pkg/evaluation/printer_test.go
+++ b/pkg/evaluation/printer_test.go
@@ -193,6 +193,11 @@ func createFormattedOutput() FormattedOutput {
 							MetadataName: "rss-site",
 							Kind:         "Deployment",
 							Occurrences:  1,
+							FailureLocations: []cliClient.FailureLocation{{
+								SchemaPath:        "spec.template.spec.containers.0.image",
+								FailedErrorLine:   10,
+								FailedErrorColumn: 20,
+							}},
 						}},
 					},
 					{
@@ -203,6 +208,11 @@ func createFormattedOutput() FormattedOutput {
 							MetadataName: "rss-site",
 							Kind:         "Deployment",
 							Occurrences:  1,
+							FailureLocations: []cliClient.FailureLocation{{
+								SchemaPath:        "spec.template.spec.containers.0.resources.limits",
+								FailedErrorLine:   95,
+								FailedErrorColumn: 15,
+							}},
 						}},
 					},
 					{
@@ -213,6 +223,11 @@ func createFormattedOutput() FormattedOutput {
 							MetadataName: "rss-site",
 							Kind:         "Deployment",
 							Occurrences:  1,
+							FailureLocations: []cliClient.FailureLocation{{
+								SchemaPath:        "metadata.labels.owner",
+								FailedErrorLine:   7,
+								FailedErrorColumn: 12,
+							}},
 						}},
 					},
 					{
@@ -223,6 +238,11 @@ func createFormattedOutput() FormattedOutput {
 							MetadataName: "rss-site",
 							Kind:         "Deployment",
 							Occurrences:  1,
+							FailureLocations: []cliClient.FailureLocation{{
+								SchemaPath:        "spec.template.spec.containers.0",
+								FailedErrorLine:   22,
+								FailedErrorColumn: 11,
+							}},
 						}},
 					},
 				},
@@ -244,7 +264,7 @@ func createFormattedOutput() FormattedOutput {
 }
 
 func createInvalidK8sFileFormattedOutput() FormattedOutput {
-	err := errors.New("k8s schema validation error: could not find schema for Deploymentt You can skip files with missing schemas instead of failing by using the `--ignore-missing-schemas` flag ")
+	err := errors.New("k8s schema validation error: could not find schema for Deployment You can skip files with missing schemas instead of failing by using the `--ignore-missing-schemas` flag ")
 	err2 := errors.New("k8s schema validation error: For field spec.replicas: Invalid type. Expected: [integer,null], given: string ")
 	invalidK8sFile := &extractor.InvalidFile{
 		Path:             "File1",
diff --git a/pkg/evaluation/printer_test_expected_outputs/JUnit_invalid_k8s_output.xml b/pkg/evaluation/printer_test_expected_outputs/JUnit_invalid_k8s_output.xml
index 59a98ae..8f3126f 100755
--- a/pkg/evaluation/printer_test_expected_outputs/JUnit_invalid_k8s_output.xml
+++ b/pkg/evaluation/printer_test_expected_outputs/JUnit_invalid_k8s_output.xml
@@ -2,7 +2,7 @@
 <testsuites name="" tests="0" failures="0" skipped="0">
 	<testsuite name="File1">
 		<testcase name="invalid k8s file" classname="k8s validation">
-			<failure message="Invalid k8s file">k8s schema validation error: could not find schema for Deploymentt You can skip files with missing schemas instead of failing by using the `--ignore-missing-schemas` flag </failure>
+			<failure message="Invalid k8s file">k8s schema validation error: could not find schema for Deployment You can skip files with missing schemas instead of failing by using the `--ignore-missing-schemas` flag </failure>
 		</testcase>
 		<testcase name="invalid k8s file" classname="k8s validation">
 			<failure message="Invalid k8s file">k8s schema validation error: For field spec.replicas: Invalid type. Expected: [integer,null], given: string </failure>
diff --git a/pkg/evaluation/printer_test_expected_outputs/json_output.json b/pkg/evaluation/printer_test_expected_outputs/json_output.json
index 7c189da..7b70b63 100644
--- a/pkg/evaluation/printer_test_expected_outputs/json_output.json
+++ b/pkg/evaluation/printer_test_expected_outputs/json_output.json
@@ -1,1 +1,1 @@
-{"policyValidationResults":[{"fileName":"File1","ruleResults":[{"identifier":"CONTAINERS_MISSING_IMAGE_VALUE_VERSION","name":"Ensure each container image has a pinned (tag) version","messageOnFailure":"Incorrect value for key `image` - specify an image version to avoid unpleasant \"version surprises\" in the future","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false}]},{"identifier":"CONTAINERS_MISSING_MEMORY_LIMIT_KEY","name":"Ensure each container has a configured memory limit","messageOnFailure":"Missing property object `limits.memory` - value should be within the accepted boundaries recommended by the organization","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false}]},{"identifier":"WORKLOAD_INVALID_LABELS_VALUE","name":"Ensure workload has valid label values","messageOnFailure":"Incorrect value for key(s) under `labels` - the vales syntax is not valid so the Kubernetes engine will not accept it","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false}]},{"identifier":"CONTAINERS_MISSING_LIVENESSPROBE_KEY","name":"Ensure each container has a configured liveness probe","messageOnFailure":"Missing property object `livenessProbe` - add a properly configured livenessProbe to catch possible deadlocks","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false}]}]}],"policySummary":{"policyName":"Default","totalRulesInPolicy":21,"totalSkippedRules":0,"totalRulesFailed":4,"totalPassedCount":0},"evaluationSummary":{"configsCount":1,"filesCount":1,"passedYamlValidationCount":1,"k8sValidation":"1/1","passedPolicyValidationCount":0},"yamlValidationResults":null,"k8sValidationResults":null}
+{"policyValidationResults":[{"fileName":"File1","ruleResults":[{"identifier":"CONTAINERS_MISSING_IMAGE_VALUE_VERSION","name":"Ensure each container image has a pinned (tag) version","messageOnFailure":"Incorrect value for key `image` - specify an image version to avoid unpleasant \"version surprises\" in the future","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false,"failureLocations":[{"schemaPath":"spec.template.spec.containers.0.image","failedErrorLine":10,"failedErrorColumn":20}]}]},{"identifier":"CONTAINERS_MISSING_MEMORY_LIMIT_KEY","name":"Ensure each container has a configured memory limit","messageOnFailure":"Missing property object `limits.memory` - value should be within the accepted boundaries recommended by the organization","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false,"failureLocations":[{"schemaPath":"spec.template.spec.containers.0.resources.limits","failedErrorLine":95,"failedErrorColumn":15}]}]},{"identifier":"WORKLOAD_INVALID_LABELS_VALUE","name":"Ensure workload has valid label values","messageOnFailure":"Incorrect value for key(s) under `labels` - the vales syntax is not valid so the Kubernetes engine will not accept it","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false,"failureLocations":[{"schemaPath":"metadata.labels.owner","failedErrorLine":7,"failedErrorColumn":12}]}]},{"identifier":"CONTAINERS_MISSING_LIVENESSPROBE_KEY","name":"Ensure each container has a configured liveness probe","messageOnFailure":"Missing property object `livenessProbe` - add a properly configured livenessProbe to catch possible deadlocks","occurrencesDetails":[{"metadataName":"rss-site","kind":"Deployment","skipMessage":"","occurrences":1,"isSkipped":false,"failureLocations":[{"schemaPath":"spec.template.spec.containers.0","failedErrorLine":22,"failedErrorColumn":11}]}]}]}],"policySummary":{"policyName":"Default","totalRulesInPolicy":21,"totalSkippedRules":0,"totalRulesFailed":4,"totalPassedCount":0},"evaluationSummary":{"configsCount":1,"filesCount":1,"passedYamlValidationCount":1,"k8sValidation":"1/1","passedPolicyValidationCount":0},"yamlValidationResults":null,"k8sValidationResults":null}
diff --git a/pkg/evaluation/printer_test_expected_outputs/xml_output.xml b/pkg/evaluation/printer_test_expected_outputs/xml_output.xml
index 97e1910..abf8463 100644
--- a/pkg/evaluation/printer_test_expected_outputs/xml_output.xml
+++ b/pkg/evaluation/printer_test_expected_outputs/xml_output.xml
@@ -12,6 +12,11 @@
 				<skipMessage></skipMessage>
 				<occurrences>1</occurrences>
 				<isSkipped>false</isSkipped>
+				<failureLocations>
+					<SchemaPath>spec.template.spec.containers.0.image</SchemaPath>
+					<FailedErrorLine>10</FailedErrorLine>
+					<FailedErrorColumn>20</FailedErrorColumn>
+				</failureLocations>
 			</occurrencesDetails>
 		</ruleResults>
 		<ruleResults>
@@ -24,6 +29,11 @@
 				<skipMessage></skipMessage>
 				<occurrences>1</occurrences>
 				<isSkipped>false</isSkipped>
+				<failureLocations>
+					<SchemaPath>spec.template.spec.containers.0.resources.limits</SchemaPath>
+					<FailedErrorLine>95</FailedErrorLine>
+					<FailedErrorColumn>15</FailedErrorColumn>
+				</failureLocations>
 			</occurrencesDetails>
 		</ruleResults>
 		<ruleResults>
@@ -36,6 +46,11 @@
 				<skipMessage></skipMessage>
 				<occurrences>1</occurrences>
 				<isSkipped>false</isSkipped>
+				<failureLocations>
+					<SchemaPath>metadata.labels.owner</SchemaPath>
+					<FailedErrorLine>7</FailedErrorLine>
+					<FailedErrorColumn>12</FailedErrorColumn>
+				</failureLocations>
 			</occurrencesDetails>
 		</ruleResults>
 		<ruleResults>
@@ -48,6 +63,11 @@
 				<skipMessage></skipMessage>
 				<occurrences>1</occurrences>
 				<isSkipped>false</isSkipped>
+				<failureLocations>
+					<SchemaPath>spec.template.spec.containers.0</SchemaPath>
+					<FailedErrorLine>22</FailedErrorLine>
+					<FailedErrorColumn>11</FailedErrorColumn>
+				</failureLocations>
 			</occurrencesDetails>
 		</ruleResults>
 	</policyValidationResults>
diff --git a/pkg/evaluation/printer_test_expected_outputs/yaml_output.yaml b/pkg/evaluation/printer_test_expected_outputs/yaml_output.yaml
index 5601667..7e523dd 100644
--- a/pkg/evaluation/printer_test_expected_outputs/yaml_output.yaml
+++ b/pkg/evaluation/printer_test_expected_outputs/yaml_output.yaml
@@ -11,6 +11,10 @@ policyValidationResults:
       skipMessage: ""
       occurrences: 1
       isSkipped: false
+      failureLocations:
+      - schemapath: spec.template.spec.containers.0.image
+        failederrorline: 10
+        failederrorcolumn: 20
   - identifier: CONTAINERS_MISSING_MEMORY_LIMIT_KEY
     name: Ensure each container has a configured memory limit
     messageOnFailure: Missing property object `limits.memory` - value should be within
@@ -21,6 +25,10 @@ policyValidationResults:
       skipMessage: ""
       occurrences: 1
       isSkipped: false
+      failureLocations:
+      - schemapath: spec.template.spec.containers.0.resources.limits
+        failederrorline: 95
+        failederrorcolumn: 15
   - identifier: WORKLOAD_INVALID_LABELS_VALUE
     name: Ensure workload has valid label values
     messageOnFailure: Incorrect value for key(s) under `labels` - the vales syntax
@@ -31,6 +39,10 @@ policyValidationResults:
       skipMessage: ""
       occurrences: 1
       isSkipped: false
+      failureLocations:
+      - schemapath: metadata.labels.owner
+        failederrorline: 7
+        failederrorcolumn: 12
   - identifier: CONTAINERS_MISSING_LIVENESSPROBE_KEY
     name: Ensure each container has a configured liveness probe
     messageOnFailure: Missing property object `livenessProbe` - add a properly configured
@@ -41,6 +53,10 @@ policyValidationResults:
       skipMessage: ""
       occurrences: 1
       isSkipped: false
+      failureLocations:
+      - schemapath: spec.template.spec.containers.0
+        failederrorline: 22
+        failederrorcolumn: 11
 policySummary:
   policyName: Default
   totalRulesInPolicy: 21
diff --git a/pkg/evaluation/test_fixtures/FailureLocations.yaml b/pkg/evaluation/test_fixtures/FailureLocations.yaml
new file mode 100644
index 0000000..9253c37
--- /dev/null
+++ b/pkg/evaluation/test_fixtures/FailureLocations.yaml
@@ -0,0 +1,60 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: AAAA
+  namespace: test
+  labels:
+    owner: --
+    environment: prod
+    app: web
+spec:
+  replicas: 2
+  selector:
+    matchLabels:
+      app: web
+  template:
+    metadata:
+      namespace: test
+      labels:
+        app: web
+    spec:
+      containers:
+        - name: front-end
+          image: nginx:latest
+          readinessProbe:
+            tcpSocket:
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 10
+          resources:
+            requests:
+              memory: "64Mi"
+              cpu: "64m"
+            limits:
+              memory: "64Mi"
+              cpu: "500m"
+          ports:
+            - containerPort: 80
+        - name: rss-reader
+          image: nginx:latest
+          livenessProbe:
+            httpGet:
+              path: /healthz
+              port: 8080
+              httpHeaders:
+                - name: Custom-Header
+                  value: Awesome
+          readinessProbe:
+            tcpSocket:
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 10
+          resources:
+            requests:
+              cpu: "64m"
+              memory: "128Mi"
+            limits:
+              memory: "128Mi"
+              cpu: "500m"
+          ports:
+            - containerPort: 88
diff --git a/pkg/printer/printer_test.go b/pkg/printer/printer_test.go
index 396e3d5..8e9c5fd 100644
--- a/pkg/printer/printer_test.go
+++ b/pkg/printer/printer_test.go
@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"testing"
 
+	"github.com/datreeio/datree/pkg/cliClient"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -14,10 +15,18 @@ func TestGetWarningsText(t *testing.T) {
 		Title: GetFileNameText("~/.datree/k8-demo.yaml"),
 		FailedRules: []FailedRule{
 			{
-				Name:               "Caption",
-				Occurrences:        1,
-				Suggestion:         "Suggestion",
-				OccurrencesDetails: []OccurrenceDetails{{MetadataName: "yishay", Kind: "Pod"}},
+				Name:        "Caption",
+				Occurrences: 1,
+				Suggestion:  "Suggestion",
+				OccurrencesDetails: []OccurrenceDetails{{
+					MetadataName: "yishay",
+					Kind:         "Pod",
+					FailureLocations: []cliClient.FailureLocation{{
+						SchemaPath:        ".spec.template.spec.containers.0.image",
+						FailedErrorLine:   10,
+						FailedErrorColumn: 20,
+					}},
+				}},
 			},
 		},
 	},
@@ -56,6 +65,8 @@ func TestGetWarningsText(t *testing.T) {
 
 ❌  Caption  [1 occurrence]
     - metadata.name: yishay (kind: Pod)
+      > key: spec.template.spec.containers.0.image (line: 10:20)
+
 💡  Suggestion
 
 >>  File: /datree/datree/internal/fixtures/kube/yaml-validation-error.yaml
@@ -112,6 +123,8 @@ https://github.com/datreeio/helm-datree
 
 [X]  Caption  [1 occurrence]
     - metadata.name: yishay (kind: Pod)
+      > key: spec.template.spec.containers.0.image (line: 10:20)
+
 [*]  Suggestion
 
 >>  File: /datree/datree/internal/fixtures/kube/yaml-validation-error.yaml