← Back to Pull requests

queue: npm-audit-osv-scanner-decision for Zenn publication #473

Open
RyukaST077 opened this pull request with 794 lines diff across 3 files
View on GitHub
RyukaST077 RyukaST077 commented on Nov 20, 2026 00:29 UTC
Author

npm audit と OSV-Scanner を、lockfile対応・finding・終了コード・scan失敗の実測から選べる記事を公開キューへ追加します。記事は published: false で、公開は既存FIFOワーカーが行います。

初回の未実装だった範囲判定を、保存済みJSON/lockfileの全30行を使った検証に置き換えました。npm/OSVの両側で範囲内30件、範囲外・判定不能は各0件でした。旧結果がplaceholderだった経緯と、保存snapshotに限る結果であることを本文に明記しています。scan-errorもfindingより先に分類します。

検証:

  • 固定Node/npmとnpm同梱semverによる範囲評価、11固定+122実データ境界caseがpass。

  • 本文の完全inline checkerは実行済みコードとbyte一致、5 JSON出力の再生一致。

  • 修正後レビュー logs/review-npm-audit-osv-scanner-decision-20261120-1430.md: pass、blockers 0 / warnings 0。記事チェック・構文チェックpass。

  • 改訂normalizerの既存7応答再生と10合成error優先caseもpass。新しいscanner観測や修正版full inline全体の再実行とは扱っていません。
  • 対象head: fd924d6d378f60b452969846f56c6b9643664d5e(PR表示とbranch refの一致を確認)。このheadのCI run 44686948665は、請求ロックによりジョブ開始前に失敗しました(実行stepsなし)。アカウント側のロック解除後、このheadのCI成功を確認してから、既存の競合復旧・FIFO公開キューへ進めます。CI成功まではマージ保留です。

    Diff: 794 lines (+794 / -0) across 3 files Reviewer: None requested Review duration: 16476m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.58) × (1 − Review Confidence (0.40)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.58 · 794 lines diff across 3 files
    0.58
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Shallow Review Depth shallow_review_depth
    0.344
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #473"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    RyukaST077 RyukaST077
    Labels
    risk: low confidence: 40.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57.9% (MEDIUM) · Higher = larger blast radius
    57.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.5% · Lower = rushed or shallow review
    40.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 34.5% · Safe to merge
    34.5%