Skip to content

False positive: Codex/Zsh env snapshot blocked as analysis_incomplete for [[ and alias -L #235

Description

@loadingalias

Environment

  • OS: macOS 26.6.2 (M1)
  • Shell: zsh
  • tirith version (tirith --version): 0.4.1
  • Install method (cargo/brew/deb/manual): Homebrew

Doctor output

  tirith 0.4.1
  binary:       /opt/homebrew/bin/tirith
  shell:        zsh
  interactive:  false
  hook dir:     ~/.local/share/tirith/shell
  materialized: true
  profile:      ~/.zshrc
  hook status:  configured
  policies:     (none found)
  data dir:     ~/.local/share/tirith
  log path:     ~/.local/share/tirith/log.jsonl
  last trigger: ~/.local/share/tirith/last_trigger.json
  cloaking:     available
  webhooks:     available
  threat DB:    ~/.local/share/tirith/tirith-threatdb.dat (19h old, 241792 entries, signature ok)
  anomaly base: off (opt-in — enable with 'tirith baseline learn')
  capsule:      backend 'seatbelt' — containment NOT fully enforceable on this host; enforcing surfaces fail closed
                domain-egress enforceable: false

What happened

Codex's non-interactive Zsh env snapshot is blocked with two HIGH analysis_incomplete findings. The failure reduces to either of these benign Zsh constructs independently:

  • [[ -e /tmp/example ]]
  • alias -L

This occurs with no Tirith policy configured.

What you expected

Tirith should recognize exact [[ conditionals and Zsh's read-only alias -L listing operation as statically understood constructs, allowing them when their contents are otherwise safe.

Unresolved dynamic execution, such as variable-selected commands, eval, or dynamic sh -c, should remain fail-closed.

Command

tirith check --non-interactive --no-daemon --shell posix -- '[[ -e /tmp/example ]] && printf yes'
tirith check --non-interactive --no-daemon --shell posix -- 'alias -L'

tirith output

Both commands produce:

  tirith: BLOCKED
  [HIGH] analysis_incomplete — Nested executable body could not be resolved
  [HIGH] analysis_incomplete — nested command analysis was incomplete

For comparison, the equivalent test -e /tmp/example and alias -p forms are allowed.

Category

  • False positive (benign command flagged)
  • False negative (malicious command not flagged)
  • Latency issue
  • Shell integration issue
  • Policy issue
  • Other

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