Skip to main content

ragleap-security

Small, auditable security primitives for the ragleap libraries. Standard library only. Alpha. Not independently audited: see docs/threat-model.md for exactly what is and is not defended.

What is in 0.1.0

  • Scope: an immutable tenant scope (tenant, subject, agent, session) with an unambiguous key, covers, narrow and require_scope, so stores can refuse to work without one.
  • AuditLog: an append-only JSON Lines log with a SHA-256 hash chain and verify(). Tamper-evident, not tamper-proof (see the threat model).
  • SecretStr, from_env, redact: secrets that do not print themselves, read from the environment by name, and a heuristic redactor for logs.
  • check_size, check_json_shape, bounded_read, Deadline: hard limits for untrusted input.
from ragleap_security import AuditLog, Scope, SecretStr, from_env, redact

scope = Scope("acme", subject="alice")
log = AuditLog("audit.jsonl")
token = from_env("MY_SERVICE_TOKEN")
log.append("login.ok", {"user": "alice", "token": token}, scope)
assert log.verify().ok
print(redact(f"request failed with {token.reveal()}", [token]))

Verifying it yourself

pip install -e ".[test]"
pytest
python scripts/mutation_check.py   # breaks one protection at a time; every mutation must be killed

Not in 0.1.0

Encryption, an SSRF-safe HTTP helper, a policy engine, output detectors and a red-team harness are planned (issue #899) and not available yet.

Metadata

Release files for ragleap-security 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ragleap-security 0.1.0
File Size Uploaded Provenance
ragleap_security-0.1.0.tar.gz 16.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ragleap-security 0.1.0
File Interpreter ABI Platform
ragleap_security-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.7 kB

Release files / ragleap_security-0.1.0.tar.gz

Download URL ragleap_security-0.1.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5080d28294dde2f0f2543a863b31a4ab13da7357b1263f807c8455fd2e45dea9
BLAKE2b-256 checksum
How to use checksums
62935d884d7ad86d3f87027d47ac608fea24bd3b92733ee534cf00c1e02269b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / ragleap_security-0.1.0-py3-none-any.whl

Download URL ragleap_security-0.1.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3f31d3703d552cde53080e6d6c56cef733954d61deeaba586bdce48db53075d
BLAKE2b-256 checksum
How to use checksums
47c0eab66bea29ad0f3974ed794c9b6fca1f6f686f416b309f5523651efc04fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for ragleap-security 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ragleap_security-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page