aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app
AgeCommit message (Collapse)Author
2025-08-01app: remount root readonlyOphestra
This does nothing for security, but should help avoid hiding bugs of programs developed in a hakurei container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01hst/container: mount tmpfs via magic src stringOphestra
There's often good reason to mount tmpfs in the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01app: integrate container autorootOphestra
Doing this instead of mounting directly on / because it's impossible to ensure a parent is available for every path hakurei wants to mount to. This situation is similar to autoetc hence the similar name, however a symlink mirror will not work in this case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-29hst: configurable wait delayOphestra
This is useful for programs that take a long time to clean up. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-29app: integrate interrupt forwardingOphestra
This significantly increases usability of command line tools running through hakurei. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-28app/shim: implement signal handler outcome in GoOphestra
This needs to be done from the Go side eventually anyway to integrate the signal forwarding behaviour now supported by the container package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-28app/shim: separate signal handler implementationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-03app: remove split implementationOphestra
It is completely nonsensical and highly error-prone to have multiple implementations of this in the same build. This should be switched at compile time instead therefore the split packages are pointless. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-02cmd/hakurei: move to cmdOphestra
Having it at the project root never made sense since the "ego" name was deprecated. This change finally addresses it. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-02sandbox: expose seccomp interfaceOphestra
There's no point in artificially limiting and abstracting away these options. The higher level hakurei package is responsible for providing a secure baseline and sane defaults. The sandbox package should present everything to the caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-02sandbox/seccomp: native rule slice in helpersOphestra
These helper functions took FilterPreset as input for ease of integration. This moves them to []NativeRule. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-01sandbox/seccomp: resolve rules nativelyOphestra
This enables loading syscall filter policies from external cross-platform config files. This also removes a significant amount of C code. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-26treewide: switch to hakurei.appOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-25treewide: rename to hakureiOphestra
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-08app: share runtime dirOphestra
This allows apps with the same identity to access the same runtime dir. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-13app/instance/common: optimise ops allocationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-13fst: improve configOphestra
The config struct more or less "grew" to what it is today. This change moves things around to make more sense and fixes nonsensical comments describing obsolete behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-12app/instance: wrap internal implementationOphestra
This reduces the scope of the fst package, which was growing questionably large. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-12app: rename app implementation packageOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-11sandbox: relative autoetc linksOphestra
This allows nested containers to use autoetc, and increases compatibility with other implementations. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-10sandbox: implement autoetc as setup opOphestra
This significantly reduces setup op count and the readdir call now happens in the context of the init process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-08sandbox/seccomp: rename flag type and constantsOphestra
The names are ambiguous. Rename them to make more sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-07app: install seccomp filter to shimOphestra
This does not necessarily reduce attack surface but does not affect functionality or introduce any side effects, so is nice to have. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-07app: improve shim process managementOphestra
This ensures a signal gets delivered to the process instead of relying on parent death behaviour. SIGCONT was chosen as it is the only signal an unprivileged process is allowed to send to processes with different credentials. A custom signal handler is installed because the Go runtime does not expose signal information other than which signal was received, and shim must check pid to ensure reasonable behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-01app: wayland socket in process shareOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-01app: share path setup on demandOphestra
This removes the unnecessary creation and destruction of share paths when none of the enablements making use of them are set. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-31fst: optional configured shell pathOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27app/seal: check for '=' in envvOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27app: pass through $SHELLOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-26app: create XDG_RUNTIME_DIR with perm 0700Ophestra
Many programs complain about this. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25fst/sandbox: do not create /etc in advanceOphestra
This is now handled by the setup op. This also gets rid of the hardcoded /etc path. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25sandbox/wl: move into sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25app: merge shim into app packageOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25system: optimise string formattingOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25app: run in native sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17internal/sys: wrap getuid/getgidOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: move out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: move params setup functionsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: wrap fmsg interfaceOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17seccomp: install output atomicallyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: expose extra files to directOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: rearrange initialisation argsOphestra
This improves consistency across two different helper implementations. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: clean up interfaceOphestra
The helper interface was messy due to odd context acquisition order. That has changed, so this cleans it up. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-14seccomp: move out of helperOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-14helper: embed context on creationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-13internal/app: rename init to init0Ophestra
This makes way for the new container init. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-09helper/proc: expose setup fileOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-07internal/prctl: rename prctl wrappersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26app: print comp values earlyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26cmd/fpkg: call app in-processOphestra
Wrapping fortify is slow, painful and error-prone. Start apps in-process instead. Signed-off-by: Ophestra <cat@gensokyo.uk>