-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit permissions for Android images.
Remove the use of the `--privileged` flag for Android images and instead use an seccomp permissions. The provided profile is derived from the docker documentation, with slight modifications to allow `clone` and `clone3`. The documentation is [docker seccomp](https://docs.docker.com/engine/security/seccomp/#significant-syscalls-blocked-by-the-default-profile), which details the syscalls blocked by docker. The same is true for podman. We merely modified these settings to allow `personality` syscall, which then allows us to use our Android images.
- Loading branch information
1 parent
a51135f
commit 7e43e26
Showing
5 changed files
with
187 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"defaultAction": "SCMP_ACT_ALLOW", | ||
"defaultErrnoRet": 1, | ||
"syscalls": [ | ||
{ | ||
"names": [ | ||
"add_key", | ||
"get_kernel_syms", | ||
"keyctl", | ||
"move_pages", | ||
"nfsservctl", | ||
"perf_event_open", | ||
"pivot_root", | ||
"query_module", | ||
"request_key", | ||
"sysfs", | ||
"_sysctl", | ||
"uselib", | ||
"userfaultfd", | ||
"ustat" | ||
], | ||
"action": "SCMP_ACT_ERRNO" | ||
}, | ||
{ | ||
"names": [ | ||
"acct" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_PACCT" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"bpf", | ||
"lookup_dcookie", | ||
"mount", | ||
"quotactl", | ||
"quotactl_fd", | ||
"setns", | ||
"swapon", | ||
"swapoff", | ||
"umount", | ||
"umount2", | ||
"unshare", | ||
"vm86", | ||
"vm86old", | ||
"pciconfig_read", | ||
"pciconfig_write", | ||
"salinfo_log_open", | ||
"salinfo_event_open", | ||
"sys_cacheflush", | ||
"rtas" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_ADMIN" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"clock_adjtime", | ||
"clock_settime", | ||
"settimeofday", | ||
"stime" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_TIME" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"create_module", | ||
"delete_module", | ||
"finit_module", | ||
"init_module" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_MODULE" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"get_mempolicy", | ||
"mbind", | ||
"set_mempolicy" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_NICE" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"ioperm", | ||
"iopl" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_RAWIO" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"kcmp", | ||
"process_vm_readv", | ||
"process_vm_writev", | ||
"ptrace" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_PTRACE" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"kexec_file_load", | ||
"kexec_load", | ||
"reboot" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_SYS_BOOT" | ||
] | ||
} | ||
}, | ||
{ | ||
"names": [ | ||
"name_to_handle_at", | ||
"open_by_handle_at" | ||
], | ||
"action": "SCMP_ACT_ERRNO", | ||
"excludes": { | ||
"caps": [ | ||
"CAP_DAC_READ_SEARCH" | ||
] | ||
} | ||
} | ||
] | ||
} |