Skip to content

Reject invalid skill paths#45

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/build-context-invalid-skill-path
Open

Reject invalid skill paths#45
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/build-context-invalid-skill-path

Conversation

@fallintoplace

Copy link
Copy Markdown

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

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