lsmcheck
Linux Security Module introspection from procfs and sysfs only: which LSMs the kernel runs, the security attributes of a process, and the state of AppArmor, SELinux, Yama and lockdown. No dependencies, no shell-outs; every reader degrades to None when the feature is absent.
Requires Python 3.10+ and Linux.
Install
pip install lsmcheck
Example
import lsmcheck
print(lsmcheck.active_lsms()) # [LSM.CAPABILITY, LSM.YAMA, ...]
ctx = lsmcheck.apparmor.current()
if ctx and ctx.mode == lsmcheck.apparmor.AppArmorMode.ENFORCE:
print("confined by", ctx.profile)
Development
uv sync --group dev
make check
License: 0BSD. Quad4 Software, https://quad4.io
Metadata
Release files for lsmcheck 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lsmcheck-0.1.0.tar.gz | 68.7 kB | With provenance | Details for lsmcheck-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lsmcheck-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lsmcheck-0.1.0-py3-none-any.whl |
Total release size: 81.0 kB
Release files / lsmcheck-0.1.0.tar.gz
| Download URL | lsmcheck-0.1.0.tar.gz |
|---|---|
| Size | 68.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe9a848562e311b7311d99ad67810bba8584d43e76a4c76b55cfd0bc9a72d867
|
|
BLAKE2b-256 checksum How to use checksums |
c77f6e4d520dbce806517589ab95cd4bfcaf2d390eab3c916ef3de7720ec7e33
|
| 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 Sep 22, 2026.
Transparency logRelease files / lsmcheck-0.1.0-py3-none-any.whl
| Download URL | lsmcheck-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55df4d61105c4ef48cc3807f83eccf8a81d1af7ee715920895103c0571db8a84
|
|
BLAKE2b-256 checksum How to use checksums |
cada3b91eae9ffe23b9cd1f184a84e3d3cf079edb5e2cdf7befafc34faf54fd1
|
| 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 Sep 22, 2026.
Transparency logSecurity for lsmcheck 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
Both files in this release have been uploaded with provenance metadata.
Attestation for lsmcheck-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 Sep 22, 2026.
Transparency logA 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.