Skip to content

Reject invalid skill paths#45

Merged
keshprad merged 3 commits into
NVIDIA:mainfrom
fallintoplace:fix/build-context-invalid-skill-path
Jun 16, 2026
Merged

Reject invalid skill paths#45
keshprad merged 3 commits into
NVIDIA:mainfrom
fallintoplace:fix/build-context-invalid-skill-path

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

  • build_context now raises a ValueError when skill_path is missing, empty, nonexistent, or points at a file.
  • Existing empty directories still scan successfully as valid empty scan targets.
  • Tests now cover the graph/API failure mode so invalid skill_path cannot return a low-risk report.
  • Graph integration tests set use_llm: False where they only validate report shape.

Why

Direct graph/API callers could pass a typo or invalid skill_path and receive a successful-looking risk_score: 0 / SAFE result. That is risky for CI and automation because bad input can look like a clean scan.

Validation

  • uv run --extra dev pytest
  • uv run --extra dev pytest -m integration tests/integration/test_graph.py
  • uv run --extra dev ruff check src/skillspector/nodes/build_context.py src/skillspector/nodes/resolve_input.py tests/nodes/test_build_context.py tests/integration/test_graph.py

@keshprad keshprad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change as is. I have no changes. :)

Thanks for submitting this fix.

@keshprad keshprad merged commit 4f9c660 into NVIDIA:main Jun 16, 2026
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.

2 participants