Repository navigation
Use Little Canary SecurityPipeline in injection adapter - #1
Merged
samvitgersappa merged 3 commits intoSep 11, 2026
Merged
Conversation
Contributor
Author
|
Hi @samvitgersappa — this PR updates the CI security extra now that little-canary 0.3.5 provides a universal wheel, and adds adapter regression coverage. GitHub shows the PR workflow as |
Owner
|
Approved. The fix is correct and I verified it end-to-end rather than relying on the description:
Two tradeoffs I'm consciously accepting (flagging for the record, not blocking):
Thanks for the thorough regression coverage and the docs update. This fixes a real silent no-op bug. |
This was referenced Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Use Little Canary's
SecurityPipelinein the existing injection adapter. With the original code and installed little-canary 0.3.0 or 0.3.5, importingCanaryDetectorraisesImportError; the adapter disables itself and returns(False, None)without screening.The adapter now runs the synchronous pipeline through
asyncio.to_threadin advisory mode. It preserves the existingscan()tuple interface and addsscan_detailed()so callers can distinguish completed, degraded, unavailable, and failed screening.SecurityGuardrecords degraded, unavailable, or failed screening separately, including when a structural detection also occurs.Related issue (if any)
Reproduced against the existing adapter; no separate issue.
Changes
Checklist
uv run pytest: 38 passed with little-canary 0.3.5uv run ruff check src/anduv run ruff format --check src/passuv run mypy src/passesRolando Bosch is the responsible human contributor and provided active oversight and steering. This contribution was selected through Hermes Labs’ autonomous triage and executed through its engineering infrastructure.
Disclosure: Rolando Bosch maintains Little Canary.