Repository navigation
docs: show Rampart as the sensitive info backend everywhere - #272
Conversation
Co-authored-by: david <david@arcjet.com>
Co-authored-by: david <david@arcjet.com>
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
|
@SocketSecurity ignore-all |
There was a problem hiding this comment.
Arcjet Review — 🟢 Low Risk
Decision: Approved
Rationale: Documentation-only change: README, package README, docstrings, and example apps are updated to recommend and demonstrate the Rampart sensitive-info backend. Library behaviour is unchanged — no runtime code paths, validation, or defaults are modified. Example pyproject.toml files add the sensitive-info-rampart extra, which is a dependency surface change but limited to examples (not the published SDK's install metadata).
Summary of Changes
Switches all user-facing documentation and example apps to present Rampart (arcjet[sensitive-info-rampart], backend=rampart()) as the recommended sensitive-info backend. Updates README.md, sensitive-info-rampart/README.md, docstrings in _rules.py, _sensitive_info_backend.py, guard/_rules/_sensitive_info.py, and guard/_types.py, and modifies every example's main.py/verify.py/pyproject.toml to pass backend=rampart() and depend on the extra. Removes the custom detect callback example and 'default backend detects four types' wording from user-facing docs. The library still falls back to the WASM backend when backend is omitted — this PR does not change that default.
Escalation Triggers
- Dependency Changes: Multiple
pyproject.tomlfiles inexamples/add thesensitive-info-rampartextra and a local[tool.uv.sources]entry. Scope is limited to example projects — the published SDK's dependency set is unaffected.
Notes
Diff is ~400 lines of substantive change spread across many files, well under the 1000-line threshold. No tests appear to have been updated, but no runtime behaviour was changed, so new test coverage isn't warranted. The author's own note that making Rampart the actual default would require a code change is accurate — this PR leaves the WASM fallback intact.
Path filtering: 9 files excluded by ignore paths. 37 of 46 files included in review.
Review: 17a9b071 | Model: anthropic/claude-opus-4-7 | Powered by Arcjet Review
Co-authored-by: david <david@arcjet.com>
Co-authored-by: david <david@arcjet.com>
Every sensitive info example in the docs, docstrings, and examples now passes
backend=rampart()fromarcjet-sensitive-info-rampart, and Rampart is described as the recommended backend. References to the bundled WebAssembly backend and its customdetectcallback are removed from user-facing docs. Library behaviour is unchanged.README.md: the quick start, the sensitive information section, the LangChain examples, and the Guard examples all use Rampart and tell you to installarcjet[sensitive-info-rampart]. The "default backend detects four types" text and the customdetectcallback example are gone, replaced by the full list of entity types Rampart detects.sensitive-info-rampart/README.md: the package is described as the recommended backend instead of an opt-in alternative.detect_sensitive_info,SensitiveInfoEntityType,LocalDetectSensitiveInfo,SensitiveInfoConfig.backend,SensitiveInfoBackend,SENSITIVE_INFO_ENTITY_TYPES): the examples userampart(), and the "default (WASM) backend" wording is removed.fastapi,flask, both LangChain apps, and the eight Guard adapter apps, including theirverify.pyharnesses) passesbackend=rampart()and depends onarcjet[sensitive-info-rampart]. Committed lockfiles were regenerated.When
backendis omitted, the library still uses the WASM engine. Making Rampart the actual default would be a code change and is not part of this PR.