mirror of
https://github.com/containers/udica
synced 2025-02-04 22:31:37 +01:00
742a7b448f
Add testing JSON files generated by podman and docker. Add expected output cil policies. Add tests that run udica on testing JSON files and compare the result with cil policies. The tests should be run inside the 'tests' directory using unittest: # python3 -m unittest The tests are intended to be run on Fedora machine as root. Tested on Fedora 29.
180 lines
6.5 KiB
JSON
180 lines
6.5 KiB
JSON
[
|
|
{
|
|
"Id": "f35680f1c518032516e38688654c226d09582bc8e780cf062063f91612ffff17",
|
|
"Created": "2019-03-06T13:43:14.838743431Z",
|
|
"Path": "/bin/bash",
|
|
"Args": [],
|
|
"State": {
|
|
"Status": "running",
|
|
"Running": true,
|
|
"Paused": false,
|
|
"Restarting": false,
|
|
"OOMKilled": false,
|
|
"Dead": false,
|
|
"Pid": 2866,
|
|
"ExitCode": 0,
|
|
"Error": "",
|
|
"StartedAt": "2019-03-06T13:43:15.262353177Z",
|
|
"FinishedAt": "0001-01-01T00:00:00Z"
|
|
},
|
|
"Image": "sha256:d7372e6c93c6c7b925600981b655c94829515a37cf876ff9e6d0287ff2b739d9",
|
|
"ResolvConfPath": "/var/lib/docker/containers/f35680f1c518032516e38688654c226d09582bc8e780cf062063f91612ffff17/resolv.conf",
|
|
"HostnamePath": "/var/lib/docker/containers/f35680f1c518032516e38688654c226d09582bc8e780cf062063f91612ffff17/hostname",
|
|
"HostsPath": "/var/lib/docker/containers/f35680f1c518032516e38688654c226d09582bc8e780cf062063f91612ffff17/hosts",
|
|
"LogPath": "",
|
|
"Name": "/agitated_keller",
|
|
"RestartCount": 0,
|
|
"Driver": "overlay2",
|
|
"MountLabel": "system_u:object_r:container_file_t:s0:c374,c775",
|
|
"ProcessLabel": "system_u:system_r:container_t:s0:c374,c775",
|
|
"AppArmorProfile": "",
|
|
"ExecIDs": null,
|
|
"HostConfig": {
|
|
"Binds": null,
|
|
"ContainerIDFile": "",
|
|
"LogConfig": {
|
|
"Type": "journald",
|
|
"Config": {}
|
|
},
|
|
"NetworkMode": "default",
|
|
"PortBindings": {},
|
|
"RestartPolicy": {
|
|
"Name": "no",
|
|
"MaximumRetryCount": 0
|
|
},
|
|
"AutoRemove": false,
|
|
"VolumeDriver": "",
|
|
"VolumesFrom": null,
|
|
"CapAdd": null,
|
|
"CapDrop": null,
|
|
"Dns": [],
|
|
"DnsOptions": [],
|
|
"DnsSearch": [],
|
|
"ExtraHosts": null,
|
|
"GroupAdd": null,
|
|
"IpcMode": "",
|
|
"Cgroup": "",
|
|
"Links": null,
|
|
"OomScoreAdj": 0,
|
|
"PidMode": "",
|
|
"Privileged": false,
|
|
"PublishAllPorts": false,
|
|
"ReadonlyRootfs": false,
|
|
"SecurityOpt": null,
|
|
"UTSMode": "",
|
|
"UsernsMode": "",
|
|
"ShmSize": 67108864,
|
|
"Runtime": "oci",
|
|
"ConsoleSize": [
|
|
0,
|
|
0
|
|
],
|
|
"Isolation": "",
|
|
"CpuShares": 0,
|
|
"Memory": 0,
|
|
"NanoCpus": 0,
|
|
"CgroupParent": "",
|
|
"BlkioWeight": 0,
|
|
"BlkioWeightDevice": null,
|
|
"BlkioDeviceReadBps": null,
|
|
"BlkioDeviceWriteBps": null,
|
|
"BlkioDeviceReadIOps": null,
|
|
"BlkioDeviceWriteIOps": null,
|
|
"CpuPeriod": 0,
|
|
"CpuQuota": 0,
|
|
"CpuRealtimePeriod": 0,
|
|
"CpuRealtimeRuntime": 0,
|
|
"CpusetCpus": "",
|
|
"CpusetMems": "",
|
|
"Devices": [],
|
|
"DiskQuota": 0,
|
|
"KernelMemory": 0,
|
|
"MemoryReservation": 0,
|
|
"MemorySwap": 0,
|
|
"MemorySwappiness": -1,
|
|
"OomKillDisable": false,
|
|
"PidsLimit": 0,
|
|
"Ulimits": null,
|
|
"CpuCount": 0,
|
|
"CpuPercent": 0,
|
|
"IOMaximumIOps": 0,
|
|
"IOMaximumBandwidth": 0
|
|
},
|
|
"GraphDriver": {
|
|
"Name": "overlay2",
|
|
"Data": {
|
|
"LowerDir": "/var/lib/docker/overlay2/0b383cce0b2a34ece910e582fb43b9a0fb737ca63a497315c7918f481c55836e-init/diff:/var/lib/docker/overlay2/e6634b68fb3e2ab903f94af0418aa43834c987b41c5b0c2faec92c98a6c6cbed/diff",
|
|
"MergedDir": "/var/lib/docker/overlay2/0b383cce0b2a34ece910e582fb43b9a0fb737ca63a497315c7918f481c55836e/merged",
|
|
"UpperDir": "/var/lib/docker/overlay2/0b383cce0b2a34ece910e582fb43b9a0fb737ca63a497315c7918f481c55836e/diff",
|
|
"WorkDir": "/var/lib/docker/overlay2/0b383cce0b2a34ece910e582fb43b9a0fb737ca63a497315c7918f481c55836e/work"
|
|
}
|
|
},
|
|
"Mounts": [],
|
|
"Config": {
|
|
"Hostname": "f35680f1c518",
|
|
"Domainname": "",
|
|
"User": "",
|
|
"AttachStdin": false,
|
|
"AttachStdout": false,
|
|
"AttachStderr": false,
|
|
"Tty": true,
|
|
"OpenStdin": true,
|
|
"StdinOnce": false,
|
|
"Env": [
|
|
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
|
"DISTTAG=f29container",
|
|
"FGC=f29",
|
|
"FBR=f29"
|
|
],
|
|
"Cmd": [
|
|
"/bin/bash"
|
|
],
|
|
"ArgsEscaped": true,
|
|
"Image": "fedora",
|
|
"Volumes": null,
|
|
"WorkingDir": "",
|
|
"Entrypoint": null,
|
|
"OnBuild": null,
|
|
"Labels": {
|
|
"maintainer": "Clement Verna <cverna@fedoraproject.org>"
|
|
}
|
|
},
|
|
"NetworkSettings": {
|
|
"Bridge": "",
|
|
"SandboxID": "4ea8182a58cfa68b384f26ca50cd6137d9ed9a7832f882244e9e822d1af29095",
|
|
"HairpinMode": false,
|
|
"LinkLocalIPv6Address": "",
|
|
"LinkLocalIPv6PrefixLen": 0,
|
|
"Ports": {},
|
|
"SandboxKey": "/var/run/docker/netns/4ea8182a58cf",
|
|
"SecondaryIPAddresses": null,
|
|
"SecondaryIPv6Addresses": null,
|
|
"EndpointID": "7efdef721e4aecde64e4279a20240d7cf33c15d3cb008b6f9e414ab6d77b9c4e",
|
|
"Gateway": "172.17.0.1",
|
|
"GlobalIPv6Address": "",
|
|
"GlobalIPv6PrefixLen": 0,
|
|
"IPAddress": "172.17.0.2",
|
|
"IPPrefixLen": 16,
|
|
"IPv6Gateway": "",
|
|
"MacAddress": "02:42:ac:11:00:02",
|
|
"Networks": {
|
|
"bridge": {
|
|
"IPAMConfig": null,
|
|
"Links": null,
|
|
"Aliases": null,
|
|
"NetworkID": "7bb2c1062ca330fd53fc336340bc2def615d85bb73f7cae1aba8303286ed8e03",
|
|
"EndpointID": "7efdef721e4aecde64e4279a20240d7cf33c15d3cb008b6f9e414ab6d77b9c4e",
|
|
"Gateway": "172.17.0.1",
|
|
"IPAddress": "172.17.0.2",
|
|
"IPPrefixLen": 16,
|
|
"IPv6Gateway": "",
|
|
"GlobalIPv6Address": "",
|
|
"GlobalIPv6PrefixLen": 0,
|
|
"MacAddress": "02:42:ac:11:00:02"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
|