Skip to main content

lsmcheck

CI CodeQL OpenSSF Scorecard PyPI License: 0BSD

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)

Source distribution for lsmcheck 0.1.0
File Size Uploaded
lsmcheck-0.1.0.tar.gz 68.7 kB Details

Built distribution (wheel)

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

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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