Популярность имеет свои минусы. Чем популярней язык программирования, тем выше его распространённость, а значит найдутся те кто поспешит воспользоваться этим.
С ростом популярности Python всё больше на PyPi появляется вредоносных пакетов. Трояны, стиллеры и доставщики более опасных вредоносов.
Команда PyPi постоянно мониторит подобные случаи но и их возможности достигли предела. В результате сервис временно закрывает возможность заливки новых пакетов и регистрации юзеров.
PyPI new user and new project registrations temporarily suspended
Возможно одной из причин большого наплыва вредоносов является резко возросшая доступность их создания. Сегодня любой, даже не программист, может попросить у ChatGPT написать необходимый код и все инструкции для атаки.
Основной тип атаки - рассчёт на опечатку в названии пакета. Если невнимательный программист случайно установит pilow или djangoo, считай что вредонос уже в системе.
Чтобы избежать подобных факапов я рекомендую:
▫️ Всегда работайте в виртуальном окружении, неизвестные проекты устанавливайте внутри контейнеров.
▫️ Используйте файл requirements.txt вместо ручной установки пакетов
▫️ Очень внимательно пишите названия пакетов, а после написания проверьте еще раз. Сверьте с названием из документации.
▫️ После успешных тестов всегда фиксируйте версию пакета. Бывали случаи когда опасный код добавляли в новые версии. К тому же и без этой опасности не рекомендуется ставить по умолчанию последнюю версию.
▫️ Используйте вспомогательные инструменты для проверки безопасности, например https://pyup.io/safety или https://github.com/PyCQA/bandit. Они помогут не только найти опасный код в чужих пакетах, но и ваш код проверит на уязвимости.
Будем надеяться что PyPi переосмыслит методы борьбы с вредоносами, например внедрит ИИ для проверки как симметричный шаг.
#offtop
🌍 The lithosphere, atmosphere, hydrosphere, and biosphere constantly exchange matter—volcanic eruptions can shoot minerals into the air that later fall into oceans, nourishing marine life far away. ✨
#lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 When huge dust storms sweep across deserts, fine particles from the lithosphere reach the atmosphere, circle the globe, and even fertilize distant rainforests—linking Earth’s spheres in invisible ways. ✨
#lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 A single major volcanic eruption links all of Earth’s spheres—rock and magma from the lithosphere, gas and ash in the atmosphere, water vapor in the hydrosphere, and rapid changes in the biosphere. ✨
#lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The hydrosphere holds less than 0.01% of Earth's water in rivers and lakes, while most is locked in glaciers, ice caps, or underground. These hidden reserves link all of Earth’s spheres. ✨
#hydrosphere⚡#lithosphere⚡#biosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The deepest part of the ocean, the Mariana Trench, reaches nearly 11,000 meters below sea level. Here, the hydrosphere, lithosphere, and biosphere all meet in extreme conditions. ✨
#hydrosphere⚡#lithosphere⚡#biosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 The deepest point on land, the Dead Sea Depression, lies about 430 meters below sea level, linking the lithosphere, atmosphere, hydrosphere, and biosphere in an extreme environment for life. ✨
#lithosphere⚡#hydrosphere⚡#biosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 At the bottom of Antarctica’s ice lies a vast liquid lake called Lake Vostok, sealed under 4 kilometers of ice. This hidden hydrosphere supports unique life forms adapted to total darkness. ✨
#hydrosphere⚡#Antarctica⚡#secrets⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍