Metadata-Version: 2.4
Name: rustleaks
Description-Content-Type: text/markdown
Summary: Scan bytes and text for secrets with the Rustleaks engine
Project-URL: Changelog, https://github.com/joshgarnett/rustleaks/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/joshgarnett/rustleaks/blob/main/docs/user/python.md
Project-URL: Homepage, https://github.com/joshgarnett/rustleaks
Project-URL: Issues, https://github.com/joshgarnett/rustleaks/issues
Project-URL: Source, https://github.com/joshgarnett/rustleaks/tree/main/bindings/python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.12
Version: 0.3.0a1
License-Expression: MIT AND BSD-3-Clause AND Apache-2.0 AND Apache-2.0 WITH LLVM-exception
Keywords: gitleaks,secret-detection,security,scanner
License-File: LICENSE
License-File: NOTICE
License-File: third-party/index.json
License-File: third-party/packages/adler2-2.0.1/LICENSE-0BSD
License-File: third-party/packages/adler2-2.0.1/LICENSE-APACHE
License-File: third-party/packages/adler2-2.0.1/LICENSE-MIT
License-File: third-party/packages/aho-corasick-1.1.5/COPYING
License-File: third-party/packages/aho-corasick-1.1.5/LICENSE-MIT
License-File: third-party/packages/aho-corasick-1.1.5/UNLICENSE
License-File: third-party/packages/alloc-no-stdlib-3.0.0/LICENSE
License-File: third-party/packages/alloc-stdlib-0.3.0/LICENSE
License-File: third-party/packages/base64-0.23.1/LICENSE-APACHE
License-File: third-party/packages/base64-0.23.1/LICENSE-MIT
License-File: third-party/packages/block-buffer-0.12.1/LICENSE-APACHE
License-File: third-party/packages/block-buffer-0.12.1/LICENSE-MIT
License-File: third-party/packages/brotli-decompressor-6.3.2/LICENSE
License-File: third-party/packages/cfg-if-1.0.5/LICENSE-APACHE
License-File: third-party/packages/cfg-if-1.0.5/LICENSE-MIT
License-File: third-party/packages/compcol-0.8.0/LICENSE
License-File: third-party/packages/const-oid-0.10.2/LICENSE-APACHE
License-File: third-party/packages/const-oid-0.10.2/LICENSE-MIT
License-File: third-party/packages/cpufeatures-0.3.1/LICENSE-APACHE
License-File: third-party/packages/cpufeatures-0.3.1/LICENSE-MIT
License-File: third-party/packages/crypto-common-0.2.2/LICENSE-APACHE
License-File: third-party/packages/crypto-common-0.2.2/LICENSE-MIT
License-File: third-party/packages/digest-0.11.3/LICENSE-APACHE
License-File: third-party/packages/digest-0.11.3/LICENSE-MIT
License-File: third-party/packages/hybrid-array-0.4.15/LICENSE-APACHE
License-File: third-party/packages/hybrid-array-0.4.15/LICENSE-MIT
License-File: third-party/packages/itoa-1.0.18/LICENSE-APACHE
License-File: third-party/packages/itoa-1.0.18/LICENSE-MIT
License-File: third-party/packages/lz4_flex-0.14.2/LICENSE
License-File: third-party/packages/lzma-rust2-0.25.0/LICENSE
License-File: third-party/packages/memchr-2.8.3/COPYING
License-File: third-party/packages/memchr-2.8.3/LICENSE-MIT
License-File: third-party/packages/memchr-2.8.3/UNLICENSE
License-File: third-party/packages/miniz_oxide-0.9.1/LICENSE
License-File: third-party/packages/miniz_oxide-0.9.1/LICENSE-APACHE.md
License-File: third-party/packages/miniz_oxide-0.9.1/LICENSE-MIT.md
License-File: third-party/packages/miniz_oxide-0.9.1/LICENSE-ZLIB.md
License-File: third-party/packages/proc-macro2-1.0.107/LICENSE-APACHE
License-File: third-party/packages/proc-macro2-1.0.107/LICENSE-MIT
License-File: third-party/packages/quote-1.0.47/LICENSE-APACHE
License-File: third-party/packages/quote-1.0.47/LICENSE-MIT
License-File: third-party/packages/rawzip-0.5.2/LICENSE.txt
License-File: third-party/packages/regex-automata-0.4.19/LICENSE-APACHE
License-File: third-party/packages/regex-automata-0.4.19/LICENSE-MIT
License-File: third-party/packages/regex-syntax-0.8.12/LICENSE-APACHE
License-File: third-party/packages/regex-syntax-0.8.12/LICENSE-MIT
License-File: third-party/packages/regex-syntax-0.8.12/src/unicode_tables/LICENSE-UNICODE
License-File: third-party/packages/rustleaks-bzip2-0.1.2-rustleaks.1/crates/rustleaks-bzip2/LICENSE-APACHE
License-File: third-party/packages/rustleaks-bzip2-0.1.2-rustleaks.1/crates/rustleaks-bzip2/LICENSE-MIT
License-File: third-party/packages/rustleaks-cli-0.3.0-alpha.1/LICENSE
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/LICENSE
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/NOTICE
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/data/LICENSE.tiktoken
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/data/LICENSE.tiktoken-rs
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/default/LICENSE.betterleaks
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/default/LICENSE.kingfisher
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/default/LICENSE.veles
License-File: third-party/packages/rustleaks-core-0.3.0-alpha.1/crates/rustleaks-core/default/NOTICE
License-File: third-party/packages/rustleaks-rar-codec-0.9.3-rustleaks.1/crates/rustleaks-rar-codec/COPYING
License-File: third-party/packages/rustleaks-report-0.3.0-alpha.1/LICENSE
License-File: third-party/packages/rustleaks-sevenz-0.20.2-rustleaks.1/crates/rustleaks-sevenz/LICENSE
License-File: third-party/packages/rustleaks-sources-0.3.0-alpha.1/LICENSE
License-File: third-party/packages/semver-1.0.28/LICENSE-APACHE
License-File: third-party/packages/semver-1.0.28/LICENSE-MIT
License-File: third-party/packages/serde-1.0.229/LICENSE-APACHE
License-File: third-party/packages/serde-1.0.229/LICENSE-MIT
License-File: third-party/packages/serde_core-1.0.229/LICENSE-APACHE
License-File: third-party/packages/serde_core-1.0.229/LICENSE-MIT
License-File: third-party/packages/serde_derive-1.0.229/LICENSE-APACHE
License-File: third-party/packages/serde_derive-1.0.229/LICENSE-MIT
License-File: third-party/packages/serde_json-1.0.154/LICENSE-APACHE
License-File: third-party/packages/serde_json-1.0.154/LICENSE-MIT
License-File: third-party/packages/serde_spanned-1.1.3/LICENSE-APACHE
License-File: third-party/packages/serde_spanned-1.1.3/LICENSE-MIT
License-File: third-party/packages/sha2-0.11.1/LICENSE-APACHE
License-File: third-party/packages/sha2-0.11.1/LICENSE-MIT
License-File: third-party/packages/simd-adler32-0.3.10/LICENSE.md
License-File: third-party/packages/syn-3.0.9/LICENSE-APACHE
License-File: third-party/packages/syn-3.0.9/LICENSE-MIT
License-File: third-party/packages/thiserror-2.0.21/LICENSE-APACHE
License-File: third-party/packages/thiserror-2.0.21/LICENSE-MIT
License-File: third-party/packages/thiserror-impl-2.0.21/LICENSE-APACHE
License-File: third-party/packages/thiserror-impl-2.0.21/LICENSE-MIT
License-File: third-party/packages/tinyvec-1.13.3/LICENSE-APACHE.md
License-File: third-party/packages/tinyvec-1.13.3/LICENSE-MIT.md
License-File: third-party/packages/tinyvec-1.13.3/LICENSE-ZLIB.md
License-File: third-party/packages/toml-1.2.1+spec-1.1.0/LICENSE-APACHE
License-File: third-party/packages/toml-1.2.1+spec-1.1.0/LICENSE-MIT
License-File: third-party/packages/toml_datetime-1.1.3+spec-1.1.0/LICENSE-APACHE
License-File: third-party/packages/toml_datetime-1.1.3+spec-1.1.0/LICENSE-MIT
License-File: third-party/packages/toml_parser-1.1.5+spec-1.1.0/LICENSE-APACHE
License-File: third-party/packages/toml_parser-1.1.5+spec-1.1.0/LICENSE-MIT
License-File: third-party/packages/toml_writer-1.2.0+spec-1.1.0/LICENSE-APACHE
License-File: third-party/packages/toml_writer-1.2.0+spec-1.1.0/LICENSE-MIT
License-File: third-party/packages/twox-hash-2.1.5/LICENSE.txt
License-File: third-party/packages/typenum-1.20.1/LICENSE
License-File: third-party/packages/typenum-1.20.1/LICENSE-APACHE
License-File: third-party/packages/typenum-1.20.1/LICENSE-MIT
License-File: third-party/packages/unicode-ident-1.0.27/LICENSE-APACHE
License-File: third-party/packages/unicode-ident-1.0.27/LICENSE-MIT
License-File: third-party/packages/unicode-ident-1.0.27/LICENSE-UNICODE
License-File: third-party/packages/winnow-1.0.5/LICENSE-MIT
License-File: third-party/packages/zmij-1.0.23/LICENSE-MIT
License-File: third-party/packages/zstd-zero-0.2.1/LICENSE-APACHE
License-File: third-party/packages/zstd-zero-0.2.1/LICENSE-MIT
License-File: third-party/runtime/glibc-2.28/COPYING.LIB
License-File: third-party/runtime/glibc-2.28/LICENSES
License-File: third-party/runtime/glibc-2.28/csu/init.c.notice
License-File: third-party/runtime/glibc-2.28/debug/stack_chk_fail_local.c.notice
License-File: third-party/runtime/glibc-2.28/io/fstat.c.notice
License-File: third-party/runtime/glibc-2.28/io/fstat64.c.notice
License-File: third-party/runtime/glibc-2.28/io/fstatat.c.notice
License-File: third-party/runtime/glibc-2.28/io/fstatat64.c.notice
License-File: third-party/runtime/glibc-2.28/io/lstat.c.notice
License-File: third-party/runtime/glibc-2.28/io/lstat64.c.notice
License-File: third-party/runtime/glibc-2.28/io/mknod.c.notice
License-File: third-party/runtime/glibc-2.28/io/mknodat.c.notice
License-File: third-party/runtime/glibc-2.28/io/stat.c.notice
License-File: third-party/runtime/glibc-2.28/io/stat64.c.notice
License-File: third-party/runtime/glibc-2.28/sysdeps/aarch64/start.S.notice
License-File: third-party/runtime/glibc-2.28/sysdeps/x86_64/start.S.notice
License-File: third-party/runtime/hermetic-glibc-support-0.8.27/3rd_party/libc/glibc/csu/abi-note-2.31.S.notice
License-File: third-party/runtime/hermetic-glibc-support-0.8.27/3rd_party/libc/glibc/csu/elf-init-2.31.c.notice
License-File: third-party/runtime/hermetic-glibc-support-0.8.27/3rd_party/libc/glibc/nptl/pthread_atfork.c.notice
License-File: third-party/runtime/hermetic-glibc-support-0.8.27/3rd_party/libc/glibc/stdlib/at_quick_exit.c.notice
License-File: third-party/runtime/hermetic-glibc-support-0.8.27/3rd_party/libc/glibc/stdlib/atexit.c.notice
License-File: third-party/runtime/hermetic-llvm-compiler-rt-23.1.2/compiler-rt/LICENSE.TXT
License-File: third-party/runtime/hermetic-llvm-libcxx-23.1.2/libcxx/LICENSE.TXT
License-File: third-party/runtime/hermetic-llvm-libcxxabi-23.1.2/libcxxabi/LICENSE.TXT
License-File: third-party/runtime/hermetic-llvm-libunwind-23.1.2/libunwind/LICENSE.TXT
License-File: third-party/runtime/rust-compiler-builtins-0.1.160/library/compiler-builtins/LICENSE.txt
License-File: third-party/runtime/rust-standard-library-1.95.0/share/doc/rust/COPYRIGHT-library.html
License-File: third-party/runtime/rust-standard-library-1.95.0/share/doc/rust/licenses/Apache-2.0.txt
License-File: third-party/runtime/rust-standard-library-1.95.0/share/doc/rust/licenses/BSD-2-Clause.txt
License-File: third-party/runtime/rust-standard-library-1.95.0/share/doc/rust/licenses/MIT.txt
License-File: third-party/runtime/rust-standard-library-1.95.0/share/doc/rust/licenses/Unicode-3.0.txt

# rustleaks for Python

The `rustleaks` package scans bytes and text for secrets, such as API keys
and passwords, with the Rustleaks engine. It runs in your process through a
native library that ships in the wheel. It needs CPython 3.12 or later and
uses only the standard library.

```python
import rustleaks

data = b'aws_key = "AKIALALEMEL33243OLIB"\n'  # rustleaks:allow
with rustleaks.Engine() as engine:
    for finding in engine.scan(data, path="config/app.env"):
        print(finding.rule_id, finding.start_line, finding.secret_range)
```

The value in the example is synthetic test data.

Read [Using Rustleaks from
Python](https://github.com/joshgarnett/rustleaks/blob/main/docs/user/python.md)
for rules, options, errors, threads, timeouts and safe logging. The Python
code is under the MIT license. The native library in each wheel also holds
code under BSD-3-Clause, Apache-2.0 and Apache-2.0 WITH LLVM-exception; the
wheel's `licenses` folder holds every license text and notice.

The code lives in `bindings/python/` of
[joshgarnett/rustleaks](https://github.com/joshgarnett/rustleaks). Report
issues and send pull requests there.

