Skip to content

[feedback] LifeOSHooks: secondary defects from a static audit #2861

Open

Description

@tbouquet

What happened

Report upstream: LifeOSHooks: secondary defects from a static audit

Summary

Found by a static audit of the LifeOSHooks plugin in LifeOS 8.761.0; the plugin files are identical on main (checked 2026-11). Paths are relative to the plugin root. The plugin was not run. Each point below stands alone; the security-relevant ones are filed separately.

  1. Secret inventory gaps (hooks/lib/egress-shapes.ts lines 21-48, the list the plugin redacts with). No shape for GitLab tokens other than glpat- (gldt-, glrt-, glptt-, glcbt-, glft-, gloas-), Vault/OpenBao hvs. and hvb., Atlassian ATATT, xai-, pplx-, gsk_, hf_, sk_ with an underscore (the \bsk- shape needs a hyphen), AWS ASIA keys, lowercase bearer, Basic auth. These prefixes come from general knowledge, not vendor documentation. Bearer\s+[A-Za-z0-9._-]{24,} stops at +, / or =, so a token containing / keeps its tail visible, and the URL userinfo shape misses a password containing / or @. Labeled values are refused on the PUBLIC lane but never redacted by the plugin, because SECRET_ASSIGNMENT is not imported.

  2. Answered fetches skip the injection scanners (hooks/LifeOSHooks.ts lines 1355-1366 and 1597-1626). When the plugin answers a WebFetch for an X or YouTube URL itself, it returns without calling the next hook, so the PostToolUse content scanner and the "treat as data" annotation never see the text (References/ModuleGotchas.md already notes this). The YouTube text is a caption transcript anyone can upload, returned untruncated. Suggested fix: run the injection inspector and the annotation inside the bridge verb, or stop answering these fetches in the plugin; anchor the URL regexes in HookBridge itself and pass the URL after -- to fabric -y.

  3. turn-complete gets only the first 4000 characters (line 1748, answer: e.answer.slice(0, 4000)). The closer is the last line, so for a longer answer DriftReminder reports a false "no closer" and speakAnswer finds nothing to speak. Send the full answer on stdin, or head and tail. In the same path, the reason === "answer" branch is not gated on agentId (lines 1739-1748), so a subagent's answer becomes the main session's last-response cache; s.finalAnswers grows without bound and has no reader. The voice capability is claimed unconditionally while the plugin speaks only on the terminal surface, and the band capability is written and never read.

  4. Hot reload. Loaded as skills-dir, a save from any session reloads the module in every open session, and the module spawns processes on its own. Nothing protects the plugin folder, HookBridge or the modules it imports from an Edit by any agent. Setup.md could make the folder marketplace the recommended load path and name deny or ask rules for those paths.

  5. Display strings. Untrusted text is drawn, logged or toasted with no control-character filter: agent descriptions (route-label clip folds only whitespace) in $.ui.log, the ISA slug and progress in the band, other panes' titles and transcript tails (panes-view), file names in rm previews and .git alarm paths (glyph-core plainGlyphify passes ESC through). shell-view clean() already strips C0, C1 and bidi controls; applying it at every log, toast, notice and Text boundary would settle whether the engine neutralizes ESC and OSC.

  6. Smaller items:

  • The rtk rewrite also covers gh api and gh release, which can mutate, and the rewritten command is not re-checked against permission rules the way the sandbox wrap is.
  • dispatchKey keeps NUL, and the dispatch id <session>::<description> is the same for two agents with the same description.
  • bunNotNpm rewrites --save-exact to -exact.
  • On Linux the subagent git sandbox is detect-only (sandbox-exec does not exist), costs two bridge spawns per subagent Bash call and misses a delayed write; a one-time notice would help.
  • SKILL.md's bunx tsc --noEmit would resolve to a package named tsc, not typescript; TYPES_BUILD lags the installed build with no check beyond an event.

Details

  • Kind: feedback

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions