Stage-1 SAFE runs on a session whose shell moved PATH

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bash, typescript
Domain
cli, security

Research direction

Start with index.ts, especially the stage-1 SAFE branch and the stage-2 stageTwo latch, then read docs/plans/2026-11-04-stage-2-latch-scope.md. Determine how the host reports shell-state drift and how often sessions drift before deciding how the new refusal should apply. Done means a SAFE bare-name command in a drifted session is blocked consistently with a reviewer allow, with the drift measurement informing the added refusals.

Written by the indexing model from the issue text.

Description

A stage-1 SAFE auto-runs on a session whose shell an earlier call changed. https://github.com/STRML/omp-classifier/pull/225 only stops the stage 2 reviewer once a session moves PATH, adds an alias or defines a function. Jev's own SAFE never checks.

call 1:  export PATH=$PWD/.bin:$PATH        (gate judges it, runs)
call 2:  git status                          Jev SAFE ─▶ runs .bin/git
Path Checks shell state?
stage 1 SAFE, branch 3 (index.ts if (judgement.verdict === "SAFE")) no
stage 2 reviewer allow yes (latch, index.ts stageTwo)

The latch covers the weaker path only. Jev reads the command text, and git status is SAFE text whatever git resolves to.

The fix rides on the shell-state check planned in docs/plans/2026-11-04-stage-2-latch-scope.md: once the host reports drift against the session's baseline, a SAFE on a bare name in a drifted session should block the same way a reviewer allow does. That adds refusals, so it wants a measurement of how often sessions drift first.

Found by the auditor seat during plan review for the latch fix.

Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
49m
Merged PRs (30d)
82

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STRML/omp-classifier

All issues in STRML/omp-classifier

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.