International
The Morning Dev

Only the news worth knowing

‹
 

Security · High impactFan score 66 · Tier A

Even pytest --help Runs conftest.py. PolinRider Malware Counts on It

DEV · By Lycore Development ·

The Brief

  • Running pytest executes conftest.py, even for pytest --help, according to the article.
  • A malware campaign called PolinRider relies on this behaviour.
  • The article warns that developers often run tests on cloned repos before reviewing them.

Why it matters

Running pytest on an untrusted repository can execute attacker-controlled code before any tests run, so simply cloning and running the test suite is not safe.

Who’s affected

  • Python developers who run pytest on cloned or untrusted repositories

What to do

  1. Review conftest.py in untrusted repositories before running pytest

Most of us treat pytest as the safe command. You clone a repo, skim the README, and before running the app you run the tests, because tests don't touch production, don't need secrets and can't break anything. That habit is exactly what one malware campaign is now leaning on. On…

How do you feel about this?

0 Comments

    Even pytest --help Runs conftest.py. PolinRider Malware Counts on It – The Morning Dev