Skip to content

Validate resolved snippet source safety - #1309

Draft
danielporterda wants to merge 1 commit into
snippet-resolve-source-attributesfrom
snippet-validate-source-safety
Draft

Validate resolved snippet source safety#1309
danielporterda wants to merge 1 commit into
snippet-resolve-source-attributesfrom
snippet-validate-source-safety

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Applies repository allowlisting and relative-path safety to a resolved snippet source.

It composes the independently introduced membership and path predicates and returns span-anchored validation issues. It does not apply the preview-only local-ref policy or candidate/condition identity.

Why

Source safety is separate from source/path attribute shape and from lifecycle policy.

Validation

  • python -m pytest tests/test_snippet_source_safety_validation.py tests/test_snippet_source_path_validation.py tests/test_snippet_repository_membership.py (14 passed)
  • python -m ruff check scripts/snippets/model.py scripts/snippets/validation.py tests/test_snippet_source_safety_validation.py
  • python -m mypy scripts/snippets/model.py scripts/snippets/validation.py
  • git diff --check

Signed-off-by: danielporterda <daniel.porter@digitalasset.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