Skip to content

feat(gateway-safety): add configurable word-blocklist scanner - #2

Open
oliverjmarty-hash wants to merge 2 commits into
mainfrom
feat/word-blocklist-scanner
Open

feat(gateway-safety): add configurable word-blocklist scanner#2
oliverjmarty-hash wants to merge 2 commits into
mainfrom
feat/word-blocklist-scanner

Conversation

@oliverjmarty-hash

Copy link
Copy Markdown
Collaborator

Adds WordBlocklistScanner alongside the existing SecretsScanner, following the same register_safety_scanner! extension pattern (no core changes needed).

Blocks request content matching a configurable word list, currently ["duck"] as a demonstration value. Not enabled by default — requires adding 'word_blocklist' to services/gateway/policies.yaml under scanners/block_categories to activate.

Verified working in a local systemprompt-astound instance: matching messages get blocked and logged to ai_safety_findings with category word_blocklist; non-matching messages pass through unaffected.

Adds WordBlocklistScanner alongside the existing SecretsScanner,
following the same register_safety_scanner! extension pattern (no
core changes needed).

Blocks request content matching a configurable word list, currently
["duck"] as a demonstration value. Not enabled by default \u2014
requires adding 'word_blocklist' to services/gateway/policies.yaml
under scanners/block_categories to activate.

Verified working in a local systemprompt-astound instance: matching
messages get blocked and logged to ai_safety_findings with category
word_blocklist; non-matching messages pass through unaffected.
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