Skip to content

Add bounded structured dependency-source analysis - #442

Draft
Spectorian wants to merge 13 commits into
codex/sc10-core-config-coveragefrom
codex/sc10-shell-parser-adapters
Draft

Add bounded structured dependency-source analysis#442
Spectorian wants to merge 13 commits into
codex/sc10-core-config-coveragefrom
codex/sc10-shell-parser-adapters

Conversation

@Spectorian

@Spectorian Spectorian commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Stack on feat(sc10): detect direct dependency-source redirection #430 to replace its executable-surface coverage notices with bounded, syntax-aware analysis.
  • Parse supported shell units with exact-pinned Tree-sitter Bash, a bounded callable reader, conservative literal state, and localized limitations for unsupported or ambiguous semantics.
  • Add typed dependency-source command adapters for npm, Yarn, pnpm, pip, Poetry, Cargo, uv, and literal bundle-local Maven settings references.
  • Analyze structurally proven heredoc/here-string generated configurations, then converge direct and executable evidence through atomic finding and ledger accounting.
  • Complete the committed SC10 corpus as explicit finding, inert, or truthful limitation outcomes.

Stack

This draft targets codex/sc10-core-config-coverage and depends on #430. It should remain stacked until the base change is integrated.

Security and product boundary

  • Deterministic, local-only, static-only, advisory HIGH evidence.
  • No command execution, network/DNS/reputation calls, telemetry, trust lists, recommendation-policy change, raw-text fallback parser, general shell interpreter, or general file-descriptor model.
  • Provider output may add presentation context but cannot suppress, downgrade, rewrite, or otherwise mutate deterministic SC10 results.
  • Sensitive values are removed from findings, evidence, provider requests, logs, and terminal/JSON/Markdown/SARIF output.

Parser and deployment impact

  • Adds required exact pins: tree-sitter==0.25.2 and tree-sitter-bash==0.25.1.
  • CI verifies the source distribution, wheel, Docker smoke path, and the wheel-only Python/platform matrix.
  • Parser import, ABI, deadline, syntax, and resource failures are represented as bounded failed/partial/skipped work rather than silent clean coverage.

Explicit limitations

Unsupported descriptors, downstream pipeline writers, data-to-shell pipelines, xargs, env -S, ambiguous wrapper options, dynamic structure-changing expansion, and unproven generated-file writes fail closed as localized incomplete coverage. Dockerfile RUN, Make recipes, unsupported shell dialects, indented Markdown code, and shell fences outside supported README/SKILL Markdown remain explicit unscanned executable coverage.

Verification

  • uv sync --all-extras --frozen
  • Focused SC10 suites: 1,077 passed, 3 expected xfails
  • CI workflow contract: 4 passed
  • make test-ci: 4,169 passed, 13 skipped, 38 deselected, 7 expected xfails; 88% coverage
  • Ruff lint and format checks
  • Source distribution and wheel build
  • Public-copy scrub across the complete candidate diff, commit subjects, fixtures, docs, and this PR text

Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
SanHsien added a commit to SanHsien/SkillSpector that referenced this pull request Sep 5, 2026
水位修正(tools/upstream_baseline.json):

reviewed_pr_through 483 → 462、reviewed_issue_through 482 → 0。原本那組數字等於
宣稱「上游 PR 與 issue 都審過了」,但沒有人看過那 8 個仍開啟的 PR,一個上游 issue
也還沒對本 fork 分診過。462 是誠實的:本 fork 的 HEAD 就是 PR NVIDIA#462 的合併點,
合併到 NVIDIA#462 為止的每個 PR 都字面存在於這棵樹裡,不需要移植;NVIDIA#462 以上的都是未合併、
未審。issue 那一軸據實寫 0。

判定記錄(docs/UPSTREAM.md,新增):

fork 繼承的 36 個分支全部給出書面判定——「刪掉」不等於「處理過」,判定要寫下來
才算。分四組:

- A(22 個):commits 已 patch-id 相同地在 main 裡,內容已在樹上。
- B(4 個):上游 PR 已定案。NVIDIA#332NVIDIA#306 已合併=已在樹上;NVIDIA#155NVIDIA#235 關閉未合併,
  由同期的 -2 後續分支取代(此為依命名慣例與關閉時間的推論,檔內已標明不是上游明說)。
- C(8 個):上游 PR 仍開啟,逐筆四點評估(缺陷是什麼/本樹是否有這段程式/判定/
  回頭再看的觸發點)。本樹與上游逐字元相同,所以這些缺陷在這裡全部存在——問題是
  「現在移植」還是「等上游合併」,不是「適不適用」。八筆全部判「等上游合併」,
  但各有各的理由與觸發點:NVIDIA#470 的 letter-spaced P3/P4 是純靜態路徑就能繞過的真實
  安全缺口,優先序最高;NVIDIA#383/NVIDIA#430/NVIDIA#442 是同一個 dependency-source redirection 能力的
  三個疊加嘗試,提前選邊會造成合併衝突白工。
- D(2 個):從未成為 PR,任何水位都追不到。已從上游 fetch 回來評估後判「不適用」
  (NIM provider 是功能擴充非缺陷修正、且無使用情境;revert-306 是上游自己開了又
  放棄的提案),判定寫入後才刪除。

驗證:pwsh -NoProfile -File tools/dev_check.ps1 → WINDOWS DEV CHECK GREEN、exit 0
(3953 passed、39 skipped、4 xfailed)。python 驗過 baseline JSON 可解析。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant