Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A lightweight, minimal python package that ships magic
libraries
using automake, CMake, scikit-build, and cibuildwheel.
|Actions Status| |Cirrus Status| |Documentation Status| |Code style: black|
|PyPI version| |PyPI platforms|
|GitHub Discussion| |Gitter|
If you use python-magic <https://github.com/ahupp/python-magic>
__, you typically get an error like this
.. code:: pycon
import magic Traceback (most recent call last): File "", line 1, in File "/Users/kratsg/.pyenv/versions/venv/lib/python3.7/site-packages/magic/init.py", line 209, in libmagic = loader.load_lib() File "/Users/kratsg/.pyenv/versions/venv/lib/python3.7/site-packages/magic/loader.py", line 49, in load_lib raise ImportError('failed to find libmagic. Check your installation') ImportError: failed to find libmagic. Check your installation
which is frustrating because they don’t ship shared lib with their
python distribution. pylibmagic
helps fill in the missing gap by
shipping the required magic
library and adding it to your path, so
you can just do:
.. code:: pycon
import pylibmagic import magic
and be on your way. pylibmagic
is designed to be very minimal and
lightweight.
.. code:: bash
$ docker run -it --rm -v $PWD:/home/root -w /home/root ubuntu
.. code:: bash
$ python3 -m pip install pylibmagic
and the libraries are installed at
.. code:: bash
$ python -c "import pylibmagic; print(pylibmagic.data)"
To release, due to concurrency issues, we need to push the tag after Cirrus CI finishes with the building for pushing to the main branch. So the order is typically:
.. code:: bash
tbump 0.5.0 --no-tag-push
git push origin v0.5.0
gh release create
See cirruslabs/cirrus-ci-docs#1167 for more details.
.. |Actions Status| image:: https://github.com/kratsg/pylibmagic/workflows/CI/badge.svg :target: https://github.com/kratsg/pylibmagic/actions .. |Cirrus Status| image:: https://api.cirrus-ci.com/github/kratsg/pylibmagic.svg?branch=main :target: https://cirrus-ci.com/github/kratsg/pylibmagic .. |Documentation Status| image:: https://readthedocs.org/projects/pylibmagic/badge/?version=latest :target: https://pylibmagic.readthedocs.io/en/latest/?badge=latest .. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black .. |PyPI version| image:: https://badge.fury.io/py/pylibmagic.svg :target: https://pypi.org/project/pylibmagic/ .. |PyPI platforms| image:: https://img.shields.io/pypi/pyversions/pylibmagic :target: https://pypi.org/project/pylibmagic/ .. |GitHub Discussion| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github :target: https://github.com/kratsg/pylibmagic/discussions .. |Gitter| image:: https://badges.gitter.im/https://github.com/kratsg/pylibmagic/community.svg :target: https://gitter.im/https://github.com/kratsg/pylibmagic/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
FAQs
scikit-build project with CMake for compiling libmagic
We found that pylibmagic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.