mirror of
https://github.com/ben-grande/qusal.git
synced 2025-04-28 11:06:08 -04:00
fix: vm kernel only applies to developers
Fixes: https://github.com/ben-grande/qusal/issues/3
This commit is contained in:
parent
8f076d2441
commit
56ecc25352
@ -32,6 +32,8 @@ qubesctl state.apply kicksecure-minimal.prefs
|
|||||||
```
|
```
|
||||||
<!-- pkg:end:post-install -->
|
<!-- pkg:end:post-install -->
|
||||||
|
|
||||||
|
### Kicksecure Developers Installation
|
||||||
|
|
||||||
If you want to help improve Kicksecure integration on Qubes, install packages
|
If you want to help improve Kicksecure integration on Qubes, install packages
|
||||||
that are known to be broken on Qubes and can break the boot of the Kicksecure
|
that are known to be broken on Qubes and can break the boot of the Kicksecure
|
||||||
Qube, to report bugs upstream (get a terminal with `qvm-console-dispvm`):
|
Qube, to report bugs upstream (get a terminal with `qvm-console-dispvm`):
|
||||||
@ -39,11 +41,28 @@ Qube, to report bugs upstream (get a terminal with `qvm-console-dispvm`):
|
|||||||
qubesctl --skip-dom0 --targets=kicksecure-17-minimal state.apply kicksecure-minimal.install-developers
|
qubesctl --skip-dom0 --targets=kicksecure-17-minimal state.apply kicksecure-minimal.install-developers
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Choose the `kernel` according to the `virt_mode` you want for the template:
|
||||||
|
|
||||||
|
- `hvm`:
|
||||||
|
```sh
|
||||||
|
qubesctl state.apply kicksecure-minimal.kernel-hvm
|
||||||
|
```
|
||||||
|
|
||||||
|
- `pvh`:
|
||||||
|
```sh
|
||||||
|
qubesctl state.apply kicksecure-minimal.kernel-pv
|
||||||
|
```
|
||||||
|
|
||||||
|
- Dom0 provided kernel (resets `virt_mode` to `pvh`):
|
||||||
|
```sh
|
||||||
|
qubesctl state.apply kicksecure-minimal.kernel-default
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
AppVMs and StandaloneVMs can be based on this template.
|
AppVMs and StandaloneVMs can be based on this template.
|
||||||
|
|
||||||
### Kicksecure Developers
|
### Kicksecure Developers Usage
|
||||||
|
|
||||||
This is intended for Kicksecure Developers to test known to be broken
|
This is intended for Kicksecure Developers to test known to be broken
|
||||||
hardening measures. It is not intended for other developers or users.
|
hardening measures. It is not intended for other developers or users.
|
||||||
|
@ -11,18 +11,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
include:
|
include:
|
||||||
- .clone
|
- .clone
|
||||||
|
|
||||||
"{{ slsdotpath }}-updated":
|
|
||||||
pkg.uptodate:
|
|
||||||
- refresh: True
|
|
||||||
|
|
||||||
"{{ slsdotpath }}-installed":
|
|
||||||
pkg.installed:
|
|
||||||
- refresh: True
|
|
||||||
- install_recommends: False
|
|
||||||
- skip_suggestions: True
|
|
||||||
- pkgs:
|
|
||||||
- grub2-xen-pvh
|
|
||||||
|
|
||||||
{% load_yaml as defaults -%}
|
{% load_yaml as defaults -%}
|
||||||
name: {{ template.template }}
|
name: {{ template.template }}
|
||||||
force: True
|
force: True
|
||||||
|
@ -3,7 +3,14 @@ SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.co
|
|||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
Most likely the GUI agent will break, use qvm-console-dispvm to get a terminal.
|
The GUI agent will break, use qvm-console-dispvm to get a terminal.
|
||||||
|
|
||||||
|
https://www.kicksecure.com/wiki/Security-misc
|
||||||
|
https://www.kicksecure.com/wiki/Hardened-kernel
|
||||||
|
https://www.kicksecure.com/wiki/Hardened_Malloc
|
||||||
|
https://www.kicksecure.com/wiki/Operating_System_Hardening
|
||||||
|
https://www.kicksecure.com/wiki/Linux_Kernel_Runtime_Guard_LKRG
|
||||||
|
https://www.qubes-os.org/doc/managing-vm-kernels/#distribution-kernel
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% if grains['nodename'] != 'dom0' -%}
|
{% if grains['nodename'] != 'dom0' -%}
|
||||||
@ -21,6 +28,10 @@ include:
|
|||||||
- install_recommends: False
|
- install_recommends: False
|
||||||
- skip_suggestions: True
|
- skip_suggestions: True
|
||||||
- pkgs:
|
- pkgs:
|
||||||
|
- qubes-kernel-vm-support
|
||||||
|
- linux-image-amd64
|
||||||
|
- linux-headers-amd64
|
||||||
|
- grub2
|
||||||
- lkrg
|
- lkrg
|
||||||
- tirdad
|
- tirdad
|
||||||
|
|
||||||
@ -92,4 +103,11 @@ include:
|
|||||||
- name: update-grub
|
- name: update-grub
|
||||||
- runas: root
|
- runas: root
|
||||||
|
|
||||||
|
"{{ slsdotpath }}-distribution-kernel":
|
||||||
|
cmd.run:
|
||||||
|
- require:
|
||||||
|
- pkg: "{{ slsdotpath }}-installed"
|
||||||
|
- name: grub-install /dev/xvda
|
||||||
|
- runas: root
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -4,12 +4,6 @@ SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.co
|
|||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
https://www.kicksecure.com/wiki/Debian
|
https://www.kicksecure.com/wiki/Debian
|
||||||
https://www.kicksecure.com/wiki/Security-misc
|
|
||||||
https://www.kicksecure.com/wiki/Hardened-kernel
|
|
||||||
https://www.kicksecure.com/wiki/Hardened_Malloc
|
|
||||||
https://www.kicksecure.com/wiki/Operating_System_Hardening
|
|
||||||
https://www.kicksecure.com/wiki/Linux_Kernel_Runtime_Guard_LKRG
|
|
||||||
https://www.qubes-os.org/doc/managing-vm-kernels/#distribution-kernel
|
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% if grains['nodename'] != 'dom0' -%}
|
{% if grains['nodename'] != 'dom0' -%}
|
||||||
@ -30,10 +24,6 @@ include:
|
|||||||
- skip_suggestions: True
|
- skip_suggestions: True
|
||||||
- pkgs:
|
- pkgs:
|
||||||
- kicksecure-qubes-cli
|
- kicksecure-qubes-cli
|
||||||
- linux-image-amd64
|
|
||||||
- linux-headers-amd64
|
|
||||||
- grub2
|
|
||||||
- qubes-kernel-vm-support
|
|
||||||
|
|
||||||
"{{ slsdotpath }}-remove-debian-default-sources.list":
|
"{{ slsdotpath }}-remove-debian-default-sources.list":
|
||||||
file.comment:
|
file.comment:
|
||||||
@ -43,11 +33,4 @@ include:
|
|||||||
- regex: "^\s*deb"
|
- regex: "^\s*deb"
|
||||||
- ignore_missing: True
|
- ignore_missing: True
|
||||||
|
|
||||||
"{{ slsdotpath }}-distribution-kernel":
|
|
||||||
cmd.run:
|
|
||||||
- require:
|
|
||||||
- pkg: "{{ slsdotpath }}-installed"
|
|
||||||
- name: grub-install /dev/xvda
|
|
||||||
- runas: root
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
23
salt/kicksecure-minimal/kernel-default.sls
Normal file
23
salt/kicksecure-minimal/kernel-default.sls
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
{%- from "qvm/template.jinja" import load -%}
|
||||||
|
|
||||||
|
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .clone
|
||||||
|
|
||||||
|
{% load_yaml as defaults -%}
|
||||||
|
name: {{ template.template }}
|
||||||
|
force: True
|
||||||
|
require:
|
||||||
|
- sls: {{ slsdotpath }}.clone
|
||||||
|
prefs:
|
||||||
|
- virt_mode: pvh
|
||||||
|
- kernel: "*default*"
|
||||||
|
{%- endload %}
|
||||||
|
{{ load(defaults) }}
|
10
salt/kicksecure-minimal/kernel-default.top
Normal file
10
salt/kicksecure-minimal/kernel-default.top
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
base:
|
||||||
|
'dom0':
|
||||||
|
- match: nodegroup
|
||||||
|
- kicksecure-minimal.kernel-default
|
23
salt/kicksecure-minimal/kernel-hvm.sls
Normal file
23
salt/kicksecure-minimal/kernel-hvm.sls
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
{%- from "qvm/template.jinja" import load -%}
|
||||||
|
|
||||||
|
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .clone
|
||||||
|
|
||||||
|
{% load_yaml as defaults -%}
|
||||||
|
name: {{ template.template }}
|
||||||
|
force: True
|
||||||
|
require:
|
||||||
|
- sls: {{ slsdotpath }}.clone
|
||||||
|
prefs:
|
||||||
|
- virt_mode: hvm
|
||||||
|
- kernel: ""
|
||||||
|
{%- endload %}
|
||||||
|
{{ load(defaults) }}
|
10
salt/kicksecure-minimal/kernel-hvm.top
Normal file
10
salt/kicksecure-minimal/kernel-hvm.top
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
base:
|
||||||
|
'dom0':
|
||||||
|
- match: nodegroup
|
||||||
|
- kicksecure-minimal.kernel-hvm
|
35
salt/kicksecure-minimal/kernel-pv.sls
Normal file
35
salt/kicksecure-minimal/kernel-pv.sls
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
{%- from "qvm/template.jinja" import load -%}
|
||||||
|
|
||||||
|
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .clone
|
||||||
|
|
||||||
|
"{{ slsdotpath }}-updated":
|
||||||
|
pkg.uptodate:
|
||||||
|
- refresh: True
|
||||||
|
|
||||||
|
"{{ slsdotpath }}-installed":
|
||||||
|
pkg.installed:
|
||||||
|
- refresh: True
|
||||||
|
- install_recommends: False
|
||||||
|
- skip_suggestions: True
|
||||||
|
- pkgs:
|
||||||
|
- grub2-xen-pvh
|
||||||
|
|
||||||
|
{% load_yaml as defaults -%}
|
||||||
|
name: {{ template.template }}
|
||||||
|
force: True
|
||||||
|
require:
|
||||||
|
- sls: {{ slsdotpath }}.clone
|
||||||
|
prefs:
|
||||||
|
- virt_mode: pv
|
||||||
|
- kernel: pvgrub2-pvh
|
||||||
|
{%- endload %}
|
||||||
|
{{ load(defaults) }}
|
10
salt/kicksecure-minimal/kernel-pv.top
Normal file
10
salt/kicksecure-minimal/kernel-pv.top
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
base:
|
||||||
|
'dom0':
|
||||||
|
- match: nodegroup
|
||||||
|
- kicksecure-minimal.kernel-pv
|
Loading…
x
Reference in New Issue
Block a user