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.
pyopt version 0.84
A module for command-line options with a pythonic, decorator-centric syntax.
The following example auto-generates help with docstrings, type casting for arguments and enforcing argument count:
import pyopt
expose = pyopt.Exposer()
@expose.args
def regular_function(arg1:str, arg2:int):
'''Your help - the docstring'''
# bla, etc, foobar spam...
print(repr(arg1), repr(arg2))
if __name__ == "__main__":
expose.run()
There are 3 modes of operation: 1. expose.args - A decorator for positional arguments. 2. expose.kwargs - A decorator for keyword arguments. 3. expose.mixed - A decorator for keyword and positional arguments.
Currently known compromises that are open to discussion, e-mail me: 1. This module was specifically designed with python 3 in mind, certain features can be converted to python 2.x, but the awesome ones can't. 2. Keyword command-line functions require every argument to start with a different letter to avoid collisions. 3. Annotations aren't mandatory, I don't know if this is the right way to go, it's an explicity vs convenience issue. 4. Booleans can't default to True. I couldn't think of a use case for this so tell me if you did.
License: whatever, I don't mind. Google Code made me choose so I went with the "New BSD". If somebody has a better idea, e-mail, comment or whatnot. Hearing from whoever uses this code would be nice, but you really shouldn't feel obliged.
Contact me at: ubershmekel at gmail
FAQs
Exposing python functions to the command line
We found that pyopt 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.