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.
BDD steps for test markup. Just for readability.
pip3 install baby-steps
import httpx
from baby_steps import given, when, then
def test_status_code():
with given:
code = 200
with when:
resp = httpx.get(f"https://httpbin.org/status/{code}")
with then:
assert resp.status_code == code
import httpx
from baby_steps import given, when, then
def test_status_code():
with given("status code"):
code = 200
with when("user requests a resource"):
resp = httpx.get(f"https://httpbin.org/status/{code}")
with then("it should return expected status code"):
assert resp.status_code == code
from baby_steps import given, then, when
from baby_steps.hooks import add_hook
def test():
with given("status code"):
pass
with when("user requests a resource"):
pass
with then("it should return expected status code"):
pass
def hook(step, name):
print(step, name)
add_hook(hook)
test()
# <class 'baby_steps.Given'> 'status code'
# <class 'baby_steps.When'> 'user requests a resource'
# <class 'baby_steps.Then'> 'it should return expected status code'
from baby_steps import when
from baby_steps.hooks import add_hook
def test():
with when:
print("when")
def hook(step, name):
print("before", step)
yield
print("after", step)
add_hook(hook)
test()
# before <class 'baby_steps.When'>
# when
# after <class 'baby_steps.When'>
from baby_steps import Step
class AndThen(Step):
pass
and_then = AndThen()
with and_then("smth"):
pass
FAQs
Readability Matters
We found that baby-steps 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.