Skip to content
MediumSupply chainBLWK-PERSIST-005

A Python startup hook runs code in every Python process ​

What this means ​

‹path› runs code every time Python starts in this environment, before your own program and even if you never import the package that added it. Some tools use this legitimately, but it is also how the poisoned LiteLLM 1.107.0 package stole credentials in October 2026.

How to fix it ​

Check where this file came from, and remove it if you don't recognise it.

  1. Find the package that installed it: pip show -f <package> lists a package's files.
  2. If you recognise it, ignore this issue with the package name as the reason.
  3. If you don't, uninstall that package and rotate any secrets this Python environment could read.

Check it yourself ​

Run a scan and look for BLWK-PERSIST-005 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads python_startup_hooks and reports this check when:

text
executes_code == true and known_benign == false and malicious_name == false

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.