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

未关闭
#253 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
bash, typescript
领域
cli, security

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
1
派生
1
平均合并
49 分钟
30 天内合并 PR
82

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

STRML/omp-classifier 的其他 Issue

查看 STRML/omp-classifier 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。