{"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"build":{"job":"","node":"v16.17.1","runner":""},"git":{"branch":"HEAD","commit":"a1c1a898b98f6cb2868cb485f5112b27080dd59c"},"package":{"name":"salty-dog","version":"0.9.2"},"msg":"version info","time":"2023-02-19T00:42:00.382Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"args":{"_":[],"config-path":["./docs"],"configPath":["./docs"],"config-name":"config-stderr.yml","configName":"config-stderr.yml","count":true,"c":true,"rules":["rules/kubernetes.yml"],"rule-file":["rules/kubernetes.yml"],"r":["rules/kubernetes.yml"],"rule":["rules/kubernetes.yml"],"ruleFile":["rules/kubernetes.yml"],"tag":["kubernetes"],"include-tag":["kubernetes"],"t":["kubernetes"],"includeTag":["kubernetes"],"source":"./test/examples/kubernetes-resources-some.yml","s":"./test/examples/kubernetes-resources-some.yml","dest":"-","d":"-","destination":"-","exclude-level":[],"excludeLevel":[],"exclude-name":[],"excludeName":[],"exclude-tag":[],"excludeTag":[],"format":"yaml","f":"yaml","include-level":[],"l":[],"level":[],"includeLevel":[],"include-name":[],"n":[],"name":[],"includeName":[],"reporter":"summary","report":"summary","rule-module":[],"m":[],"ruleModule":[],"rule-path":[],"p":[],"rulePath":[],"$0":"out/src/index.js"},"mode":"check","msg":"main arguments","time":"2023-02-19T00:42:00.383Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"schema":{"log-level":{"type":"string","enum":["debug","info","warn","error"]},"config-logger":{"type":"object","required":["level","name"],"properties":{"level":{"$ref":"salty-dog-meta#/definitions/log-level"},"name":{"type":"string"},"streams":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}}},"config":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["logger"],"properties":{"logger":{"$ref":"salty-dog-meta#/definitions/config-logger"}}}}},"name-safe":{"type":"string","pattern":"[-a-z0-9]+"},"name-tag":{"type":"string","pattern":"[-:a-z0-9]+"},"rule":{"type":"object","additionalProperties":false,"required":["name","desc","level","tags","check"],"properties":{"name":{"$ref":"salty-dog-meta#/definitions/name-safe"},"desc":{"type":"string","maxLength":255},"level":{"$ref":"salty-dog-meta#/definitions/log-level"},"tags":{"type":"array","items":{"$ref":"salty-dog-meta#/definitions/name-tag"}},"select":{"type":"string","default":"$","minLength":1},"filter":{"$ref":"http://json-schema.org/draft-07/schema#"},"check":{"$ref":"http://json-schema.org/draft-07/schema#"}}},"source":{"type":"object","required":["name","rules"],"properties":{"name":{"$ref":"salty-dog-meta#/definitions/name-safe"},"definitions":{"type":"object","additionalProperties":false,"patternProperties":{"[-a-z]+":{"type":"object"}}},"rules":{"type":"array","items":{"$ref":"salty-dog-meta#/definitions/rule"}}}}},"schemaName":"salty-dog-meta","msg":"adding ajv schema","time":"2023-02-19T00:42:00.422Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"schema":{"log-level":{"type":"string","enum":["debug","info","warn","error"]},"config-logger":{"type":"object","required":["level","name"],"properties":{"level":{"$ref":"salty-dog-meta#/definitions/log-level"},"name":{"type":"string"},"streams":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}}},"config":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["logger"],"properties":{"logger":{"$ref":"salty-dog-meta#/definitions/config-logger"}}}}},"name-safe":{"type":"string","pattern":"[-a-z0-9]+"},"name-tag":{"type":"string","pattern":"[-:a-z0-9]+"},"rule":{"type":"object","additionalProperties":false,"required":["name","desc","level","tags","check"],"properties":{"name":{"$ref":"salty-dog-meta#/definitions/name-safe"},"desc":{"type":"string","maxLength":255},"level":{"$ref":"salty-dog-meta#/definitions/log-level"},"tags":{"type":"array","items":{"$ref":"salty-dog-meta#/definitions/name-tag"}},"select":{"type":"string","default":"$","minLength":1},"filter":{"$ref":"http://json-schema.org/draft-07/schema#"},"check":{"$ref":"http://json-schema.org/draft-07/schema#"}}},"source":{"type":"object","required":["name","rules"],"properties":{"name":{"$ref":"salty-dog-meta#/definitions/name-safe"},"definitions":{"type":"object","additionalProperties":false,"patternProperties":{"[-a-z]+":{"type":"object"}}},"rules":{"type":"array","items":{"$ref":"salty-dog-meta#/definitions/rule"}}}}},"schemaName":"salty-dog-meta","msg":"adding ajv schema","time":"2023-02-19T00:42:00.527Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$.spec.template.spec.containers[*]","msg":"path query picked items","time":"2023-02-19T00:42:00.602Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"containers must have complete resources specified","level":"info","name":"kubernetes-resources","select":"$.spec.template.spec.containers[*]","tags":["kubernetes","resources"],"checkSchema":{"type":"object","additionalProperties":true,"required":["resources"],"properties":{"resources":{"type":"object","required":["limits","requests"],"properties":{"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}},"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.602Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.603Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-resources","msg":"rule passed","time":"2023-02-19T00:42:00.656Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}],"path":"$.spec.template.spec.containers[*].resources","msg":"path query picked items","time":"2023-02-19T00:42:00.656Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"resource limits are too low","level":"debug","name":"kubernetes-resources-minimum-cpu","select":"$.spec.template.spec.containers[*].resources","tags":["kubernetes","resources"],"checkSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]{2,}m"}]}}}}},"filterSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.656Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.658Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-resources-minimum-cpu","msg":"rule passed","time":"2023-02-19T00:42:00.662Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.662Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"deployments must specify a positive replica count","level":"info","name":"kubernetes-deployment-replicas","select":"$","tags":["kubernetes","apps","deployment"],"checkSchema":{"type":"object","properties":{"spec":{"type":"object","properties":{"replica":{"type":"number","minimum":1}}}}},"filterSchema":{"type":"object","properties":{"kind":{"type":"string","const":"Deployment"}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.663Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.664Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-deployment-replicas","msg":"rule passed","time":"2023-02-19T00:42:00.665Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.666Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all resources should have labels","level":"info","name":"kubernetes-labels","select":"$","tags":["kubernetes","important","labels"],"checkSchema":{"type":"object","required":["metadata"],"properties":{"metadata":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":false,"patternProperties":{"^[-.a-z0-9]{1,63}$":{"type":"string"}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.666Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.666Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-labels","msg":"rule passed","time":"2023-02-19T00:42:00.668Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.668Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all containers should have a pull policy","level":"info","name":"kubernetes-container-pull-policy","select":"$..containers.*","tags":["kubernetes","image","optional"],"checkSchema":{"type":"object","required":["image","imagePullPolicy"],"properties":{"image":{"type":"string"},"imagePullPolicy":{"type":"string","enum":["Always","IfNotPresent","Never"]}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.669Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.669Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-container-pull-policy","msg":"rule passed","time":"2023-02-19T00:42:00.670Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.670Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"images should never use :latest tag","level":"info","name":"kubernetes-image-latest","select":"$..containers.*","tags":["kubernetes","image","important"],"checkSchema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","not":{"pattern":":latest$"}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.670Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.670Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-image-latest","msg":"rule passed","time":"2023-02-19T00:42:00.672Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}],"path":"$.spec.template.spec.containers[*]","msg":"path query picked items","time":"2023-02-19T00:42:00.672Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"containers must have complete resources specified","level":"info","name":"kubernetes-resources","select":"$.spec.template.spec.containers[*]","tags":["kubernetes","resources"],"checkSchema":{"type":"object","additionalProperties":true,"required":["resources"],"properties":{"resources":{"type":"object","required":["limits","requests"],"properties":{"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}},"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.672Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.672Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":40,"count":1,"rule":{"desc":"containers must have complete resources specified","level":"info","name":"kubernetes-resources","select":"$.spec.template.spec.containers[*]","tags":["kubernetes","resources"],"checkSchema":{"type":"object","additionalProperties":true,"required":["resources"],"properties":{"resources":{"type":"object","required":["limits","requests"],"properties":{"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}},"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}}}}}}},"msg":"rule failed","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}],"path":"$.spec.template.spec.containers[*].resources","msg":"path query picked items","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"resource limits are too low","level":"debug","name":"kubernetes-resources-minimum-cpu","select":"$.spec.template.spec.containers[*].resources","tags":["kubernetes","resources"],"checkSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]{2,}m"}]}}}}},"filterSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-resources-minimum-cpu","msg":"rule passed","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.673Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"deployments must specify a positive replica count","level":"info","name":"kubernetes-deployment-replicas","select":"$","tags":["kubernetes","apps","deployment"],"checkSchema":{"type":"object","properties":{"spec":{"type":"object","properties":{"replica":{"type":"number","minimum":1}}}}},"filterSchema":{"type":"object","properties":{"kind":{"type":"string","const":"Deployment"}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-deployment-replicas","msg":"rule passed","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all resources should have labels","level":"info","name":"kubernetes-labels","select":"$","tags":["kubernetes","important","labels"],"checkSchema":{"type":"object","required":["metadata"],"properties":{"metadata":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":false,"patternProperties":{"^[-.a-z0-9]{1,63}$":{"type":"string"}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-labels","msg":"rule passed","time":"2023-02-19T00:42:00.674Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all containers should have a pull policy","level":"info","name":"kubernetes-container-pull-policy","select":"$..containers.*","tags":["kubernetes","image","optional"],"checkSchema":{"type":"object","required":["image","imagePullPolicy"],"properties":{"image":{"type":"string"},"imagePullPolicy":{"type":"string","enum":["Always","IfNotPresent","Never"]}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-container-pull-policy","msg":"rule passed","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"images should never use :latest tag","level":"info","name":"kubernetes-image-latest","select":"$..containers.*","tags":["kubernetes","image","important"],"checkSchema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","not":{"pattern":":latest$"}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-image-latest","msg":"rule passed","time":"2023-02-19T00:42:00.675Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$.spec.template.spec.containers[*]","msg":"path query picked items","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"containers must have complete resources specified","level":"info","name":"kubernetes-resources","select":"$.spec.template.spec.containers[*]","tags":["kubernetes","resources"],"checkSchema":{"type":"object","additionalProperties":true,"required":["resources"],"properties":{"resources":{"type":"object","required":["limits","requests"],"properties":{"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}},"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-resources","msg":"rule passed","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}],"path":"$.spec.template.spec.containers[*].resources","msg":"path query picked items","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"resource limits are too low","level":"debug","name":"kubernetes-resources-minimum-cpu","select":"$.spec.template.spec.containers[*].resources","tags":["kubernetes","resources"],"checkSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]{2,}m"}]}}}}},"filterSchema":{"type":"object","properties":{"limits":{"type":"object","properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-resources-minimum-cpu","msg":"rule passed","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"deployments must specify a positive replica count","level":"info","name":"kubernetes-deployment-replicas","select":"$","tags":["kubernetes","apps","deployment"],"checkSchema":{"type":"object","properties":{"spec":{"type":"object","properties":{"replica":{"type":"number","minimum":1}}}}},"filterSchema":{"type":"object","properties":{"kind":{"type":"string","const":"Deployment"}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.676Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-deployment-replicas","msg":"rule passed","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}}],"path":"$","msg":"path query picked items","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all resources should have labels","level":"info","name":"kubernetes-labels","select":"$","tags":["kubernetes","important","labels"],"checkSchema":{"type":"object","required":["metadata"],"properties":{"metadata":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":false,"patternProperties":{"^[-.a-z0-9]{1,63}$":{"type":"string"}}}}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":40,"count":1,"rule":{"desc":"all resources should have labels","level":"info","name":"kubernetes-labels","select":"$","tags":["kubernetes","important","labels"],"checkSchema":{"type":"object","required":["metadata"],"properties":{"metadata":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":false,"patternProperties":{"^[-.a-z0-9]{1,63}$":{"type":"string"}}}}}}}},"msg":"rule failed","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"all containers should have a pull policy","level":"info","name":"kubernetes-container-pull-policy","select":"$..containers.*","tags":["kubernetes","image","optional"],"checkSchema":{"type":"object","required":["image","imagePullPolicy"],"properties":{"image":{"type":"string"},"imagePullPolicy":{"type":"string","enum":["Always","IfNotPresent","Never"]}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.677Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-container-pull-policy","msg":"rule passed","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"items":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}],"path":"$..containers.*","msg":"path query picked items","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"rule":{"desc":"images should never use :latest tag","level":"info","name":"kubernetes-image-latest","select":"$..containers.*","tags":["kubernetes","image","important"],"checkSchema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","not":{"pattern":":latest$"}}}}},"msg":"visiting node","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":20,"item":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"msg":"checking item","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"rule":"kubernetes-image-latest","msg":"rule passed","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":30,"msg":"rule errors\nkubernetes-resources: 1\nkubernetes-labels: 1","time":"2023-02-19T00:42:00.678Z","v":0} {"name":"salty-dog","hostname":"runner-xsnpqmx-project-60-concurrent-167xdp","pid":806,"level":50,"count":2,"errors":[{"data":{"data":{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}},"document":{"data":{"metadata":{"name":"example","labels":{}},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"200m"},"requests":{"cpu":"100m"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"err":{"instancePath":"/resources/limits","schemaPath":"#/properties/resources/properties/limits/required","keyword":"required","params":{"missingProperty":"memory"},"message":"must have required property 'memory'"},"level":"error","msg":"/resources/limits must have required property 'memory' at item 0 of $.spec.template.spec.containers[*] for kubernetes-resources","rule":{"desc":"containers must have complete resources specified","level":"info","name":"kubernetes-resources","select":"$.spec.template.spec.containers[*]","tags":["kubernetes","resources"],"checkSchema":{"type":"object","additionalProperties":true,"required":["resources"],"properties":{"resources":{"type":"object","required":["limits","requests"],"properties":{"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}},"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*m"}]},"memory":{"oneOf":[{"type":"number","minimum":1},{"type":"string","pattern":"[1-9][0-9]*[KMG]i"}]}}}}}}}}},{"data":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"document":{"data":{"metadata":{"name":"example"},"spec":{"template":{"spec":{"containers":[{"name":"test","image":"foo","imagePullPolicy":"Always","resources":{"limits":{"cpu":"4000m","memory":"5Gi"},"requests":{"cpu":"4000m","memory":"5Gi"}}}]}}}},"source":{"data":"# test rules kubernetes\n# test tags kubernetes\n# test exit-status 2\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n---\n\nmetadata:\n name: example\n labels: {}\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 200m\n # missing memory\n requests:\n cpu: 100m\n # same rule\n\n---\n\nmetadata:\n name: example\n # missing labels\nspec:\n template:\n spec:\n containers:\n - name: test\n image: foo\n imagePullPolicy: Always\n resources:\n limits:\n cpu: 4000m\n memory: 5Gi\n requests:\n cpu: 4000m\n memory: 5Gi\n\n","path":"./test/examples/kubernetes-resources-some.yml"}},"index":0},"err":{"instancePath":"/metadata","schemaPath":"#/properties/metadata/required","keyword":"required","params":{"missingProperty":"labels"},"message":"must have required property 'labels'"},"level":"error","msg":"/metadata must have required property 'labels' at item 0 of $ for kubernetes-labels","rule":{"desc":"all resources should have labels","level":"info","name":"kubernetes-labels","select":"$","tags":["kubernetes","important","labels"],"checkSchema":{"type":"object","required":["metadata"],"properties":{"metadata":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":false,"patternProperties":{"^[-.a-z0-9]{1,63}$":{"type":"string"}}}}}}}}}],"msg":"some rules failed","time":"2023-02-19T00:42:00.678Z","v":0}