aboutsummaryrefslogtreecommitdiffhomepage
path: root/fst/template_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-06-25 03:59:52 +0900
committerOphestra <cat@gensokyo.uk>2025-06-25 04:57:41 +0900
commit87e008d56de974947ebb99c2cc40b25d3c2cf43e (patch)
tree31791911e5226d6ec04e3fac7d91b0bf53e63aa5 /fst/template_test.go
parent399207321265307bb15f37d867f9370cd51c82a8 (diff)
treewide: rename to hakurei
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'fst/template_test.go')
-rw-r--r--fst/template_test.go140
1 files changed, 0 insertions, 140 deletions
diff --git a/fst/template_test.go b/fst/template_test.go
deleted file mode 100644
index c7fd7804..00000000
--- a/fst/template_test.go
+++ /dev/null
@@ -1,140 +0,0 @@
-package fst_test
-
-import (
- "encoding/json"
- "testing"
-
- "git.gensokyo.uk/security/fortify/fst"
-)
-
-func TestTemplate(t *testing.T) {
- const want = `{
- "id": "org.chromium.Chromium",
- "path": "/run/current-system/sw/bin/chromium",
- "args": [
- "chromium",
- "--ignore-gpu-blocklist",
- "--disable-smooth-scrolling",
- "--enable-features=UseOzonePlatform",
- "--ozone-platform=wayland"
- ],
- "enablements": 13,
- "session_bus": {
- "see": null,
- "talk": [
- "org.freedesktop.Notifications",
- "org.freedesktop.FileManager1",
- "org.freedesktop.ScreenSaver",
- "org.freedesktop.secrets",
- "org.kde.kwalletd5",
- "org.kde.kwalletd6",
- "org.gnome.SessionManager"
- ],
- "own": [
- "org.chromium.Chromium.*",
- "org.mpris.MediaPlayer2.org.chromium.Chromium.*",
- "org.mpris.MediaPlayer2.chromium.*"
- ],
- "call": {
- "org.freedesktop.portal.*": "*"
- },
- "broadcast": {
- "org.freedesktop.portal.*": "@/org/freedesktop/portal/*"
- },
- "filter": true
- },
- "system_bus": {
- "see": null,
- "talk": [
- "org.bluez",
- "org.freedesktop.Avahi",
- "org.freedesktop.UPower"
- ],
- "own": null,
- "call": null,
- "broadcast": null,
- "filter": true
- },
- "username": "chronos",
- "shell": "/run/current-system/sw/bin/zsh",
- "data": "/var/lib/fortify/u0/org.chromium.Chromium",
- "dir": "/data/data/org.chromium.Chromium",
- "extra_perms": [
- {
- "ensure": true,
- "path": "/var/lib/fortify/u0",
- "x": true
- },
- {
- "path": "/var/lib/fortify/u0/org.chromium.Chromium",
- "r": true,
- "w": true,
- "x": true
- }
- ],
- "identity": 9,
- "groups": [
- "video",
- "dialout",
- "plugdev"
- ],
- "container": {
- "hostname": "localhost",
- "seccomp": 32,
- "devel": true,
- "userns": true,
- "net": true,
- "tty": true,
- "multiarch": true,
- "env": {
- "GOOGLE_API_KEY": "AIzaSyBHDrl33hwRp4rMQY0ziRbj8K9LPA6vUCY",
- "GOOGLE_DEFAULT_CLIENT_ID": "77185425430.apps.googleusercontent.com",
- "GOOGLE_DEFAULT_CLIENT_SECRET": "OTJgUOQcT7lO7GsGZq2G4IlT"
- },
- "map_real_uid": true,
- "device": true,
- "filesystem": [
- {
- "src": "/nix/store"
- },
- {
- "src": "/run/current-system"
- },
- {
- "src": "/run/opengl-driver"
- },
- {
- "src": "/var/db/nix-channels"
- },
- {
- "dst": "/data/data/org.chromium.Chromium",
- "src": "/var/lib/fortify/u0/org.chromium.Chromium",
- "write": true,
- "require": true
- },
- {
- "src": "/dev/dri",
- "dev": true
- }
- ],
- "symlink": [
- [
- "/run/user/65534",
- "/run/user/150"
- ]
- ],
- "etc": "/etc",
- "auto_etc": true,
- "cover": [
- "/var/run/nscd"
- ]
- }
-}`
-
- if p, err := json.MarshalIndent(fst.Template(), "", "\t"); err != nil {
- t.Fatalf("cannot marshal: %v", err)
- } else if s := string(p); s != want {
- t.Fatalf("Template:\n%s\nwant:\n%s",
- s, want)
- }
-}