Secure and robust input handling with TTY validation and bot protection.
Project description
securify
Secure and robust input handling for Python applications.
securify is a lightweight library designed to make user interactions more secure.
Its primary goal is to provide reliable ways to capture sensitive information, like
passwords, while enforcing strict security constraints.
Key Features
- Security First: Enforces interactive terminal (TTY) usage to prevent insecure input processing.
- Bot Protection: Built-in time delay checks to prevent automated script attacks.
- Double-Entry Verification: Simple logic to ensure users enter identical passwords.
- Developer Friendly: Fully type-hinted, 100% test coverage, and clean exception hierarchies.
Installation
pip install .
Quick Start
The core of the library is the PasswordDoubleCheck class. It ensures that a
password is typed correctly twice and that the user is actually sitting at a
terminal.
from securify.input.password import PasswordDoubleCheck
from securify.input.exceptions import PasswordError
# Initialize with a 1.5-second minimum delay
checker = PasswordDoubleCheck(min_delay=1.5)
try:
password = checker()
print("Password successfully verified!")
except PasswordError as e:
# Handles Mismatch, Speed, or Terminal errors
print(f"Verification failed: {e}")
Technical Background: Why TTY?
By default, securify rejects input that does not come from a real terminal. This
ensures that the tool only processes input from a secure, interactive source.
If the input is provided through a pipe or another non-interactive process, the checker will reject the operation. This prevents the application from being used in insecure workflows where passwords might be handled through unsafe channels.
Development
securify is built with a focus on stability and cross-version compatibility. It
is tested against Python 3.11 up to 3.15-alpha.
Running Tests
We use tox to manage environments and pytest for testing:
tox
Building Documentation
The documentation is built with Sphinx:
cd doc
make html
License
LGPLv2 or above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ftw_securify-0.1.2.tar.gz.
File metadata
- Download URL: ftw_securify-0.1.2.tar.gz
- Upload date:
- Size: 36.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62404e031898734b0144eefe4cd8ad184913c9c76c7c94407b6abe4fd43f1ba5
|
|
| MD5 |
64c7f833f9c9a760e3a0d60f34fd15be
|
|
| BLAKE2b-256 |
ca0e85d90be0ebc9f0af19ce0c180e570f76ddbd722ede9f98b17b04e8a5dd8e
|
Provenance
The following attestation bundles were made for ftw_securify-0.1.2.tar.gz:
Publisher:
ci.yml on fitzz-ftw/securify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftw_securify-0.1.2.tar.gz -
Subject digest:
62404e031898734b0144eefe4cd8ad184913c9c76c7c94407b6abe4fd43f1ba5 - Sigstore transparency entry: 1395231936
- Sigstore integration time:
-
Permalink:
fitzz-ftw/securify@4620a3bd88d0cea222f87c4b75847eec3a306bae -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/fitzz-ftw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4620a3bd88d0cea222f87c4b75847eec3a306bae -
Trigger Event:
push
-
Statement type:
File details
Details for the file ftw_securify-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ftw_securify-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942a01c608a3783bc36c7671b2b7915f9b55eb3c7dcf6c3df404fa39b48b9676
|
|
| MD5 |
57af88b2f48f384277ad0fd4a5391c7d
|
|
| BLAKE2b-256 |
a11081cb28beffe77396fc9c7084f830814bc384099cf76f5607756462dc9f15
|
Provenance
The following attestation bundles were made for ftw_securify-0.1.2-py3-none-any.whl:
Publisher:
ci.yml on fitzz-ftw/securify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftw_securify-0.1.2-py3-none-any.whl -
Subject digest:
942a01c608a3783bc36c7671b2b7915f9b55eb3c7dcf6c3df404fa39b48b9676 - Sigstore transparency entry: 1395232039
- Sigstore integration time:
-
Permalink:
fitzz-ftw/securify@4620a3bd88d0cea222f87c4b75847eec3a306bae -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/fitzz-ftw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4620a3bd88d0cea222f87c4b75847eec3a306bae -
Trigger Event:
push
-
Statement type: