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.
third-party-license-file-generator
Advanced tools
The Python third_party_license_file_generator is aimed at distilling down the appropriate license for one or many pip "requirements" files into a single file; it supports Python2.7 and Python3.
The Python third_party_license_file_generator is aimed at distilling down the appropriate license for one or many pip "requirements" files into a single file; it supports Python2.7 and Python3.
$ pip install third-party-license-file-generator
$ python -m third_party_license_file_generator -h
With no arguments (other than a pip "requirements" file and a Python executable path that has those requirements installed), the process is as follows:
It's worth noting that information learned about packages is cached- so if you have to build one third party licenses file for a large project that has many components with many dependencies (but some overlap) then it's best to specify all those pip "requirements" files and Python executable paths in a single call to the Python third_party_license_file_generator as it will take less time overall.
You can specify a number of command line options (check syntax with -h) to do things like the following:
Two different pip "requirements" files, two different Python paths (Virtualenvs) and a skip prefix:
python -m third_party_license_file_generator \
-r requirements-py.txt \
-p ~/.virtualenvs/backend_py/bin/python \
-r requirements-pypy.txt \
-p ~/.virtualenvs/backend_pypy/bin/python \
-s ims-
Please note that pip "requirements" files and Python executable paths are paired together in the order they're specified.
Three different pip "requirements" files, two different Python paths (need to repeat), a GPL exception and a custom output file:
python -m third_party_license_file_generator \
-r requirements.txt \
-p ~/.virtualenvs/api_pypy/bin/python \
-r pypy_requirements.txt \
-p ~/.virtualenvs/api_pypy/bin/python \
-r cpython_requirements.txt \
-p ~/.virtualenvs/api_py/bin/python \
-x uWSGI \
-o ThirdPartyLicenses.txt
Three different pip "requirements" files, two different Python paths (need to repeat), a GPL exception, a custom output file and a license override file:
# contents of license_override_file.yml
uWSGI:
license_name: GPL-2.0 w/ linking exception
license_file: https://raw.githubusercontent.com/unbit/uwsgi/master/LICENSE
python -m third_party_license_file_generator \
-r requirements.txt \
-p ~/.virtualenvs/api_pypy/bin/python \
-r pypy_requirements.txt \
-p ~/.virtualenvs/api_pypy/bin/python \
-r cpython_requirements.txt \
-p ~/.virtualenvs/api_py/bin/python \
-x uWSGI \
-o ThirdPartyLicenses.txt \
-l license_override_file.yml
An example of the structure of the generated third party license file is as follows:
Start of 'ThirdPartyLicenses.txt' generated by Python third_party_license_generator at 2018-04-19 12:36:58.627421
----------------------------------------
Package: Django
License: BSD-3-clause
Requires: pytz
Author: Django Software Foundation <foundation@djangoproject.com>
Home page: https://www.djangoproject.com/
(license content appears here in full)
----------------------------------------
End of 'ThirdPartyLicenses.txt' generated by Python third_party_license_generator at 2018-04-19 12:36:58.627825
FAQs
The Python third_party_license_file_generator is aimed at distilling down the appropriate license for one or many pip "requirements" files into a single file; it supports Python2.7 and Python3.
We found that third-party-license-file-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.