Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add FsGuard module #19

Merged
merged 9 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/vib-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: vanilla-os/vib-gh-action@v0.3.2-2
- uses: vanilla-os/vib-gh-action@v0.3.3-1
with:
recipe: 'recipe.yml'
plugins: 'Vanilla-OS/vib-fsguard:v1.0-3'

- name: Build the Docker image
run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/core:main .
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/vib-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: vanilla-os/vib-gh-action@v0.3.2-2
- uses: vanilla-os/vib-gh-action@v0.3.3-1
with:
recipe: 'recipe.yml'
plugins: 'Vanilla-OS/vib-fsguard:v1.0-3'

- name: Build the Docker image
run: docker image build -f Containerfile --tag vanillaos/core:validation .
Expand Down
43 changes: 22 additions & 21 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ modules:
- apt install -y man-db
- mandb -c

- name: fsguard
type: shell
source:
type: tar
url: https://github.com/linux-immutability-tools/FsGuard/releases/download/v0.1.2/FsGuard_0.1.2_linux_amd64.tar.gz
commands:
- apt install -y minisign
- mv /sources/FsGuard /usr/bin
- /usr/bin/gen_fsguard_filelist /usr/bin
- sed -i '\/usr\/bin\/gen_fsguard_filelist.*/d' /FsGuard/filelist
- sed -i '\/usr\/bin\/sign_filelist.*/d' /FsGuard/filelist
- /usr/bin/sign_filelist

- name: packages-modules
type: includes
includes:
Expand All @@ -54,17 +41,31 @@ modules:
- modules/140-manpages
- modules/999-replace-locale-gen

- name: cleanup
- name: cleanup1
type: shell
commands:
- apt remove -y linux-image-rt-amd64 linux-image-6.4.0-4-rt-amd64
- apt remove -y dpkg-dev build-essential
- apt autoremove -y
- apt clean
- rm -rf /var/cache/*
- rm -rf /tmp/*
- rm -rf /var/tmp/*
- rm -rf /sources
- rm /usr/bin/gen_fsguard_filelist
- rm /usr/bin/sign_filelist
- mkdir -p /var/cache/apt/archives/partial

- name: fsguard
type: fsguard
FsGuardLocation: "/usr/sbin/init"
GenerateKey: true
FilelistPaths: ["/usr/bin"]
modules:
- name: minisign
type: apt
source:
packages:
- "minisign"

- name: cleanup2
type: shell
commands:
- rm -rf /var/cache/*
- rm -rf /tmp/*
- rm -rf /var/tmp/*
- rm -rf /sources
- mkdir -p /var/cache/apt/archives/partial