docs(python): document the on-device Rampart sensitive info backend - #848
docs(python): document the on-device Rampart sensitive info backend#848davidmytton wants to merge 3 commits into
Conversation
PR arcjet/arcjet-py#164 adds a pluggable detection backend to the Python SDK, including the optional arcjet[sensitive-info-rampart] extra for on-device NER detection of names, addresses, and government/financial identifiers. Bring the Python docs to parity with the JS SDK changes from #846: - reference: add the Python `backend` param, install extra, RampartOptions, rampart_entities, and Python RampartBackend snippets; drop the note claiming the backend is JS-only - guards: add a Python tab for LocalDetectSensitiveInfo(backend=rampart()) - data-loss-prevention: replace the "JS SDKs only" Python slots with real Python Rampart config - sensitive-info index: generalize the package reference to cover the Python extra - quick-start: full parity — install the extra and use backend=rampart() - fix Python example log shape and status codes to mirror the JS examples (quick-start returns a single 400; reference logs per result) - llms-full.txt: document the backend option and expanded entity types Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Arcjet Review — 🟡 Medium Risk
Decision: Approved
Rationale: This is a documentation-only PR that updates sensitive-info/Rampart guidance, Python snippets, generated llms text, and corresponding snapshots. The configured auth escalation trigger matched generic occurrences of the word "token" in sensitive-info documentation, but the changes do not modify authentication, authorization, session handling, or runtime code. No secrets, unsafe dependency changes, injection risks, or security-sensitive implementation changes were identified. I am approving despite Medium risk because the trigger is a false-positive content match in docs and the change is well-scoped.
Summary of Changes
Documents Python support for the optional on-device Rampart sensitive-info backend across AI protection, guards, sensitive-info reference, quick-start snippets, llms output, and snapshots.
Escalation Triggers
- Authentication & Authorization: Diff content includes the word "token" in sensitive-info documentation, such as token context/window wording. This appears unrelated to auth/session/token handling.
Notes
Docs review found the relevant documentation and snapshot updates included in this PR. No PR size concern was identified.
Review: f47e6273 | Model: openai/gpt-5.5 | Powered by Arcjet Review
Address PR review: the reference RampartBackend snippets and the data-loss-prevention Rampart examples used string entity literals while the quick-start snippets use the SensitiveInfoEntityType enum. Switch them to the enum for consistency and type-checker friendliness. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Brings the Python docs to parity with the JS SDK Rampart work (#846), covering the new pluggable sensitive info detection backend added in arcjet/arcjet-py#164 — the optional
arcjet[sensitive-info-rampart]extra that runs an on-device NER model to detect names, addresses, and government/financial identifiers in addition to the four built-in structured types.Changes
sensitive-info/reference.mdx): add the Pythonbackendparam and expanded entity types, language-aware install (pip install "arcjet[sensitive-info-rampart]"), a PythonRampartOptionstab (threshold/providers/max_input_chars/recognizers/model_path),rampart_entities, and newRampartBackendsnippets for FastAPI + Flask. Removes the note claiming the backend is JS/TS-only.guards/index.mdx): add a Python tab forLocalDetectSensitiveInfo(backend=rampart()); drop the "JavaScript SDK only" line.ai-protection/data-loss-prevention.mdx): replace the "available in the JS/TS SDKs only" Python slots with real Python Rampart config.sensitive-info/index.mdx): generalize the package reference to name both the JS package and the Python extra.backend=rampart()(detecting names) in step 3.400for a sensitive-info denial (the only rule), and the reference logs per result. Previously the quick-start had an unreachable403branch.llms-full.txt: document thebackendoption and the expanded entity types in thesensitiveInforeference (this was stale for both languages — feat: document the on-device Rampart sensitive info backend #846 didn't update it).Verification
astro buildpasses cleanly — 0 errors/warnings, all internal links valid.🤖 Generated with Claude Code