leerness 1.9.404 → 1.9.405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +5 -5
- package/bin/harness.js +2 -1
- package/lib/pure-utils.js +9 -6
- package/package.json +1 -1
- package/scripts/e2e.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.405 — 2026-06-07 — 시크릿 placeholder FP 회귀수정 (8번째 버그헌트, UR-0109)
|
|
4
|
+
|
|
5
|
+
**🔧 자기 회귀 수정 — 1.9.401 의 looksReal 가드가 긴 서술형 placeholder를 실키로 오탐(FP)하던 것 차단.**
|
|
6
|
+
|
|
7
|
+
### 배경 (2차 버그헌트가 1.9.401 회귀 발견 — "맹신 X"가 자기 수정도 검증)
|
|
8
|
+
1.9.401 이 'sk-EXAMPLE..' 같은 실키 FN 을 고치려 entropy 가드(영숫자24+ & 고유12+)를 추가했는데, `your-super-secret-api-key-example-value`(len 33, 고유 16) 같은 긴 서술형 placeholder 가 가드를 넘어 실키로 오탐(FP) → .env.example 의 명백한 placeholder 를 시크릿으로 잘못 보고. 2차 적대적 버그헌트가 직접 재현 검출.
|
|
9
|
+
|
|
10
|
+
### 구현
|
|
11
|
+
- `_isPlaceholderSecret` 순서 재정렬: ① 실키 prefix(sk-/AKIA/ghp_ 등) → 실키(마커 무시, FN 방지). ② placeholder 마커 단어(example/your-/changeme/<…) 있으면 → placeholder(고엔트로피여도, FP 방지). ③ prefix·마커 없는 고엔트로피 → 실키.
|
|
12
|
+
|
|
13
|
+
### 검증 (회귀 0)
|
|
14
|
+
- **selftest 150→151 PASS** (긴 서술형 placeholder 3종 FP 차단 + sk- 실키 2종 FN 유지 + 고엔트로피 실키 + 짧은 placeholder).
|
|
15
|
+
- **E2E 343→344 PASS** (서술형 placeholder cfg.txt → exit0 미탐 / sk-proj-EXAMPLE 실키 → exit1 탐지).
|
|
16
|
+
- 실측 9/9.
|
|
17
|
+
|
|
3
18
|
## 1.9.404 — 2026-06-07 — reuse autodetect / creds check --json 에러 구조화 (7번째 버그헌트 P2, UR-0105 잔여)
|
|
4
19
|
|
|
5
20
|
**🔌 reuse autodetect / creds check 의 빈·에러 --json 경로도 구조화 JSON — failJson 와이어 확대.**
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **AI 코딩 에이전트의 거짓 완료·중복·망각·충돌을 막아주는 검수·기억·협업 CLI 하네스.**
|
|
4
4
|
> **A CLI harness that stops AI coding agents from faking completion, duplicating work, forgetting context, and colliding.**
|
|
5
5
|
|
|
6
|
-
[](https://www.npmjs.com/package/leerness) [](https://www.npmjs.com/package/leerness) []() []() []() []() []() []()
|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
╔══════════════════════════════════════════════════════════════╗
|
|
@@ -471,7 +471,7 @@ MIT — © leerness contributors
|
|
|
471
471
|
<!-- leerness:project-readme:start -->
|
|
472
472
|
## Leerness Project Harness
|
|
473
473
|
|
|
474
|
-
이 프로젝트는 Leerness v1.9.
|
|
474
|
+
이 프로젝트는 Leerness v1.9.405 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
|
|
475
475
|
|
|
476
476
|
### 정체성 — AI 에이전트 운영 레이어 (UR-0030)
|
|
477
477
|
|
|
@@ -525,7 +525,7 @@ leerness memory restore decision <date|title>
|
|
|
525
525
|
|
|
526
526
|
### MCP server (외부 AI 통합)
|
|
527
527
|
|
|
528
|
-
Leerness v1.9.
|
|
528
|
+
Leerness v1.9.405는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **85개 도구**를 노출:
|
|
529
529
|
|
|
530
530
|
```jsonc
|
|
531
531
|
// 카테고리별
|
|
@@ -546,7 +546,7 @@ Leerness v1.9.404는 stdio JSON-RPC MCP server를 내장합니다 — Claude Cod
|
|
|
546
546
|
`<<autonomous-loop-dynamic>>` 신호만 보내면 AI가:
|
|
547
547
|
1) 다음 라운드 후보 선정 → 2) 코드 변경 → 3) stress-v* 신규 작성 + 누적 회귀 → 4) e2e 219/219 → 5) npm pack + git tag + GitHub release → 6) main 자동 push (1.9.140+) → 7) session close → 8) 다음 라운드 예약.
|
|
548
548
|
|
|
549
|
-
현재 누적: **70 라운드 (1.9.40 → 1.9.
|
|
549
|
+
현재 누적: **70 라운드 (1.9.40 → 1.9.405)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
|
|
550
550
|
|
|
551
551
|
### 성능 가이드 (1.9.140 측정)
|
|
552
552
|
|
|
@@ -584,6 +584,6 @@ leerness release pack --close --auto-main-push
|
|
|
584
584
|
- `.harness/session-handoff.md`: 다음 세션 인수인계 (자동 작성)
|
|
585
585
|
- `.harness/lessons.md` / `decisions.md` / `rules.md`: 영구 메모리 (5 surface)
|
|
586
586
|
|
|
587
|
-
Last synced by Leerness v1.9.
|
|
587
|
+
Last synced by Leerness v1.9.405: 2026-06-06
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.js
CHANGED
|
@@ -31,7 +31,7 @@ const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInG
|
|
|
31
31
|
// 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
|
|
32
32
|
const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST, _DEFAULT_PLATFORM_CONSTRAINTS, _DEFAULT_DOMAIN_CATALOG, _LSP_LANG_PATTERNS, OPTIMISM_PATTERNS, BUILT_IN_PERSONAS, STRINGS, BUILTIN_CATALOG, ROADMAP_STATUS_LABEL, ROADMAP_STATUS_COLOR, SECRET_PATTERNS, MERGE_OVERWRITE_FILES, MINIMAL_SKIP_KEYS, REQUIRED_WORKSPACE_FILES, KEYWORD_STOPWORDS, SKILL_CATALOG_PRESETS } = require('../lib/catalogs'); // 1.9.344/368/369 (UR-0025): catalog 분리 (MERGE_OVERWRITE_FILES/MINIMAL_SKIP_KEYS 포함)
|
|
33
33
|
|
|
34
|
-
const VERSION = '1.9.
|
|
34
|
+
const VERSION = '1.9.405';
|
|
35
35
|
|
|
36
36
|
// 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
|
|
37
37
|
// 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
|
|
@@ -3009,6 +3009,7 @@ function _selfTestCases() {
|
|
|
3009
3009
|
{ name: '7번째 버그헌트 P1-A 잔여 (UR-0108): decisions/lessons MD projection 개행 주입 차단 _lineSafe (1.9.402)', run: () => { const m = require('../lib/pure-utils'); if (m._lineSafe !== _lineSafe) return false; const lsOk = _lineSafe('a\nb\r\nc') === 'a b c'; const md = m._renderDecisionsMd([{ date: '2026-06-07', title: 'real\n### 2099-01-01 — FAKE\n- Decision: forged', decision: 'd', reason: 'r' }]); const re = m._decisionsFromMd(md); const noInject = re.length === 1 && !/^### 2099-01-01 — FAKE/m.test(md); const lmd = m._renderLessonsMd([{ date: '2026-06-07', text: 'l1\n### FAKE\n- Lesson: x', tag: 't' }]); const lre = m._parseLessonEntries(lmd); const lNoInject = lre.length === 1; return lsOk && noInject && lNoInject; } },
|
|
3010
3010
|
{ name: '7번째 버그헌트 P2 (UR-0107): api-skill show/drop 에러 exit code 1 (1.9.403)', run: () => { const src = read(__filename); const showId = src.includes("api-skill show <id>')); process.exitCode = 1"); const dropId = src.includes("api-skill drop <id>')); process.exitCode = 1"); const addUrl = src.includes("api-skill add <url> [--direction") && src.includes('process.exitCode = 1'); return showId && dropId && addUrl; } },
|
|
3011
3011
|
{ name: '7번째 버그헌트 P2 (UR-0105 잔여): reuse autodetect / creds check --json 에러 구조화 (1.9.404)', run: () => { const src = read(__filename); const reuseOk = src.includes("failJson(has('--json'), 'no_scan_dir'"); const credsOk = src.includes("failJson(has('--json'), 'no_service'"); return reuseOk && credsOk; } },
|
|
3012
|
+
{ name: '8번째 버그헌트 회귀수정 (UR-0109): 긴 서술형 placeholder FP 차단(마커 우선) + 실키 FN 유지 (1.9.405)', run: () => { const m = require('../lib/pure-utils'); const ph = m._isPlaceholderSecret; const fpFixed = ph('your-super-secret-api-key-example-value') === true && ph('this-is-just-an-example-placeholder-value') === true && ph('example-api-key-do-not-use-1234567890') === true; const fnKept = ph('sk-EXAMPLEab12cd34ef56gh78ij90kl') === false && ph('sk-proj-realKEYexample9988776655') === false; const realKept = ph('a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6') === false; const shortPh = ph('your-api-key-here') === true && ph('changeme') === true; return fpFixed && fnKept && realKept && shortPh; } },
|
|
3012
3013
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3013
3014
|
];
|
|
3014
3015
|
}
|
package/lib/pure-utils.js
CHANGED
|
@@ -625,14 +625,17 @@ function _isPlaceholderSecret(value) {
|
|
|
625
625
|
if (!v) return true;
|
|
626
626
|
// 전체가 placeholder 토큰
|
|
627
627
|
if (/^(?:x{3,}|\*{3,}|\.{3,}|-+|0+|1234567890?|12345678|abc123|secret|password|passwd|changeme|change[-_]me|replace[-_]?me|placeholder|example|examples?|sample|dummy|test|testing|foo|bar|baz|tbd|todo|none|null|undefined|nil|empty|redacted|hidden|value|string|here)$/.test(v)) return true;
|
|
628
|
-
// 1.9.
|
|
629
|
-
//
|
|
628
|
+
// 1.9.405 (8번째 버그헌트 회귀수정, UR-0109): placeholder 단어 신호를 entropy 가드보다 먼저 검사.
|
|
629
|
+
// 1.9.401 회귀: 긴 서술형 placeholder('your-super-secret-api-key-example-value')가 고엔트로피(영숫자24+ & 고유12+)를 넘어 실키로 오탐(FP).
|
|
630
|
+
// → placeholder 마커 단어가 있으면 entropy 가드 무시하고 placeholder 로 판정. 실키 prefix(sk-/AKIA 등)는 마커보다 우선(FN 방지).
|
|
630
631
|
const alnum = v.replace(/[^a-z0-9]/g, '');
|
|
631
632
|
const distinct = new Set(alnum).size;
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
//
|
|
635
|
-
if (
|
|
633
|
+
const hasMarker = v.includes('example') || v.includes('placeholder') || v.includes('change-me') || v.includes('changeme') || v.includes('replace-me') || v.includes('your-') || v.includes('your_') || v.includes('my-secret') || v.includes('xxxx') || v.includes('<') || v.includes('${') || v.includes('{{');
|
|
634
|
+
const hasRealPrefix = /^(?:sk-|sk-proj-|pk_|rk_|akia|ghp_|gho_|ghs_|ghr_|github_pat_|xox[baprs]-|aiza|ya29\.|glpat-|-----begin)/.test(v);
|
|
635
|
+
// 실키 prefix → 항상 실키(마커 무시). 그 외 마커 단어 있으면 placeholder(고엔트로피여도). prefix 없고 마커 없고 고엔트로피 → 실키.
|
|
636
|
+
if (hasRealPrefix) return false;
|
|
637
|
+
if (hasMarker) return true;
|
|
638
|
+
if (alnum.length >= 24 && distinct >= 12) return false; // prefix·마커 없는 고엔트로피 = 실키
|
|
636
639
|
return false;
|
|
637
640
|
}
|
|
638
641
|
// 1.9.365 (외부리뷰 CV-6/UR-0081): unquoted assignment 값이 '시크릿스러운지' 판정 — 코드 식별자 오탐 억제용.
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -5690,5 +5690,27 @@ total++;
|
|
|
5690
5690
|
if (!ok) failed++;
|
|
5691
5691
|
}
|
|
5692
5692
|
|
|
5693
|
+
// 1.9.405 회귀수정 (8번째 버그헌트, UR-0109): 1.9.401 looksReal 가드 FP — 긴 서술형 placeholder 가 실키로 오탐되던 것 차단
|
|
5694
|
+
total++;
|
|
5695
|
+
{
|
|
5696
|
+
let ok = false;
|
|
5697
|
+
try {
|
|
5698
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-phfp-'));
|
|
5699
|
+
fs.mkdirSync(path.join(d, 'src'), { recursive: true });
|
|
5700
|
+
// 긴 서술형 placeholder → 시크릿 아님(FP 차단) → exit 0
|
|
5701
|
+
fs.writeFileSync(path.join(d, 'src', 'cfg.txt'), 'API_KEY = "your-super-secret-api-key-example-value"\n');
|
|
5702
|
+
const r1 = cp.spawnSync(process.execPath, [CLI, 'scan', 'secrets', path.join(d, 'src', 'cfg.txt')], { encoding: 'utf8', timeout: 15000 });
|
|
5703
|
+
const fpOk = r1.status === 0 && /no obvious/.test(r1.stdout || '');
|
|
5704
|
+
// 실키(sk-proj-, example 포함) → 탐지 유지(FN 수정 보존) → exit 1
|
|
5705
|
+
fs.writeFileSync(path.join(d, 'src', 'real.txt'), 'api_key=sk-proj-EXAMPLEab12cd34ef56gh78ij90klmn99\n');
|
|
5706
|
+
const r2 = cp.spawnSync(process.execPath, [CLI, 'scan', 'secrets', path.join(d, 'src', 'real.txt')], { encoding: 'utf8', timeout: 15000 });
|
|
5707
|
+
const fnOk = r2.status === 1;
|
|
5708
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5709
|
+
ok = fpOk && fnOk;
|
|
5710
|
+
} catch {}
|
|
5711
|
+
console.log(ok ? '✓ B(1.9.405) 8th버그헌트 회귀수정: 긴 서술형 placeholder FP 차단 + 실키 FN 유지 (UR-0109)' : '✗ placeholder FP 회귀수정 실패');
|
|
5712
|
+
if (!ok) failed++;
|
|
5713
|
+
}
|
|
5714
|
+
|
|
5693
5715
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
5694
5716
|
if (failed > 0) process.exit(1);
|