fix(security): enforce discovery and analysis completeness - #410
fix(security): enforce discovery and analysis completeness#410Spectorian wants to merge 11 commits into
Conversation
Signed-off-by: Nir Paz <npaz@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Requesting changes because the requested semantic pass can still be skipped entirely while this PR reports it as used and complete, producing an install-safe verdict. The current-head end-to-end repro executes zero semantic calls but returns llm_used=True, scan_mode=static+llm, recommendation=SAFE, and safe_to_install=True.
| if not enabled: | ||
| return False, False | ||
| call_log = result.get("llm_call_log") | ||
| if not isinstance(call_log, list) or not call_log: |
There was a problem hiding this comment.
[P1] Do not count an empty call log as a completed LLM pass. If the graph is imported before provider credentials are available, credential-gated semantic nodes are omitted. Binding a supported provider later through use_provider makes preflight succeed, but no semantic nodes or calls run and llm_call_log remains empty. This branch then returns (used=True, complete=True), allowing a SAFE/safe_to_install=True result even though meta_analysis_applied=False. Treat an empty log as not used/incomplete, or retain the expected analyzers and account their explicit statuses before allowing an install approval.
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>
Summary
Validation
git diff --check