Skip to content

fix: use precise markdown link assertion in translation test#38

Merged
fmueller merged 1 commit intomainfrom
fix/url-assertion-codeql
Feb 25, 2026
Merged

fix: use precise markdown link assertion in translation test#38
fmueller merged 1 commit intomainfrom
fix/url-assertion-codeql

Conversation

@fmueller
Copy link
Owner

Summary

  • Changes the URL assertion in test_pipeline_preserves_code_links_and_placeholders from "https://example.com" in result to "[link](https://example.com)" in result
  • The bare URL substring check triggered a CodeQL py/incomplete-url-substring-sanitization alert (false positive — it's a test assertion, not security validation)
  • The new assertion is stricter: it verifies the full markdown link syntax survived translation

Test plan

  • uv run pytest tests/unit/translate_pipeline_test.py passes
  • uv run ruff check clean

🤖 Generated with Claude Code

Check for the full markdown link syntax `[link](https://example.com)`
instead of the bare URL substring. This avoids a false-positive CodeQL
py/incomplete-url-substring-sanitization alert while making the
assertion more precise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fmueller fmueller merged commit 0c895b6 into main Feb 25, 2026
6 checks passed
@fmueller fmueller deleted the fix/url-assertion-codeql branch February 25, 2026 13:52
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