Repository navigation
Conversation
A hardened process keeps the marker only in its saved gid, raises it around connect() and bind()+listen(), and drops it before exec'ing anything, so `mairu exec` commands never carry it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements docs/specs/003-marker-gid.md.
crate::hardening(core):Hardening::detect()classifies the process as Unhardened / Hardened / Misconfigured from its ids,AT_SECURE, themairugroup andfs.suid_dumpable, first thing inmain. A hardened process keeps the marker gid only in the saved slotwith_privileged_gidraises the marker around clientconnect()and agentbind()+listen();drop_privileged_gid_permanentlybefore the executor execs the user's command;command()drops it in every spawned childPR_SET_DUMPABLE(0)after every gid changeVerified in Docker with a
root:mairu 2755build: the agent holds the marker only as saved gid,mairu execchildren carry none, and hardened/unhardened clients and agents still interoperate. Misconfigured setups (member ofmairu, primary groupmairu, setgid to another group) warn and hold no marker.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM