File: bootc.yml

package info (click to toggle)
scap-security-guide 0.1.79-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 114,704 kB
  • sloc: xml: 244,677; sh: 84,647; python: 33,203; makefile: 27
file content (24 lines) | stat: -rw-r--r-- 1,371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: cpe:/a:bootc
title: Bootable containers
# Matches:
# - bootc (RHEL Image Mode) containers and container images
# - running bootc (RHEL Image Mode) systems
# Does not match:
# - classic containers and container images
# - normal bare-metal systems or VMs
# - other rpm-ostree based systems eg. Silverblue
#
# The matching platforms and non-matching platforms can be easily distinguished
# by checking for presence of the kernel, rpm-ostree, and bootc RPM packages.
# Bootable containers and running bootc systems both contain these packages.
# Normal bare-metal systems usually don't have the rpm-ostree, normal
# containers don't contain kernel.
# Also normal containers are not supposed to have the /run/ostree-booted file.
check_id: bootc
{{% if product == "fedora" or "rhel" in product %}}
{{% set kernel_package = "kernel-core" %}}
{{% else %}}
{{% set kernel_package = "kernel" %}}
{{% endif %}}
bash_conditional: "{ rpm --quiet -q {{{ kernel_package }}} ;} && { rpm --quiet -q rpm-ostree ;} && { rpm --quiet -q bootc ;} && { ! rpm --quiet -q openshift-kubelet ;} && ([ -f /run/ostree-booted ] || [ -L /ostree ])"
ansible_conditional: '"{{{ kernel_package }}}" in ansible_facts.packages and "rpm-ostree" in ansible_facts.packages and "bootc" in ansible_facts.packages and not "openshift-kubelet" in ansible_facts.packages and "ostree" in ansible_proc_cmdline'