github.com/google/osv-scalibr@v0.4.1/extractor/filesystem/containers/k8simage/testdata/comprehensive-test.yaml (about) 1 # Minimal K8s test file focusing on unique structural paths to container images 2 # Only includes truly different YAML path structures 3 4 # Pod - Direct spec paths 5 apiVersion: v1 6 kind: Pod 7 metadata: 8 name: test-pod 9 spec: 10 initContainers: 11 - name: init-container 12 image: tag1@sha256:b692a91e4e531d2a9cd8e8c3b1e6d5c7f9d2e5a3b1c8d7f4e6a9b2c5d8f1e4a7 13 containers: 14 - name: main-container 15 image: tag2:2.0.0 16 17 --- 18 # Deployment - Template-based spec paths (covers Deployment, StatefulSet, ReplicaSet, DaemonSet) 19 apiVersion: apps/v1 20 kind: Deployment 21 metadata: 22 name: test-deployment 23 spec: 24 replicas: 1 25 selector: 26 matchLabels: 27 app: test-deployment 28 template: 29 metadata: 30 labels: 31 app: test-deployment 32 spec: 33 initContainers: 34 - name: template-init 35 image: tag3:3.0.0 36 containers: 37 - name: template-container 38 image: tag4.io/prometheus/node-exporter:v4.0.0 39 40 --- 41 # CronJob - JobTemplate-based spec paths 42 apiVersion: batch/v1 43 kind: CronJob 44 metadata: 45 name: test-cronjob 46 spec: 47 schedule: "0 2 * * *" 48 jobTemplate: 49 spec: 50 template: 51 spec: 52 initContainers: 53 - name: cron-init 54 image: tag5:5.0.0 55 containers: 56 - name: cron-container 57 image: tag6:6.0.0 58 restartPolicy: OnFailure 59 60 --- 61 # Edge cases pod with various image formats 62 apiVersion: v1 63 kind: Pod 64 metadata: 65 name: edge-cases-pod 66 spec: 67 containers: 68 # Registry with port 69 - name: registry-port 70 image: tag7:5000/my-app:dev 71 # No tag (defaults to latest) 72 - name: no-tag 73 image: centos