Популярность имеет свои минусы. Чем популярней язык программирования, тем выше его распространённость, а значит найдутся те кто поспешит воспользоваться этим.
С ростом популярности 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 Hubble Deep Field image, captured in 1995, revealed thousands of galaxies in a tiny, seemingly empty patch of sky. Each pinpoint of light is a galaxy containing billions of stars, some over 12 billion light-years away. ✨
#astronomy⚡#hubble⚡#universe
👉subscribe Interesting Planet
👉more Channels
🪐 In 2015, scientists using the Hubble Space Telescope watched a star named F01004-2237 in a distant galaxy vanish from view, providing rare evidence of a star being swallowed whole by a supermassive black hole. As the black hole tore the star apart, it produced a dramatic flare of light called a tidal disruption event—an intense cosmic signal that lets astronomers witness the hidden power of black holes at work. ✨
#blackholes⚡#hubble⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy NGC 3706, astronomers using the Hubble Space Telescope have found a mysterious, perfectly round disk of stars swirling close to a supermassive black hole. This dense, circular ring is less than 200 light-years across and orbits so quickly that it reveals the incredible gravitational pull black holes can exert, yet scientists are still puzzled by how such a perfectly shaped stellar disk could form so close to the heart of a galaxy. ✨
#blackholes⚡#hubble⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2012, astronomers using the Hubble Space Telescope discovered a supernova named SN Primo in the distant galaxy SXDS-1069, whose light traveled over 9 billion years to reach Earth. This explosion offers a view into the universe’s youth, revealing that supernovae have been enriching galaxies with heavy elements like iron and oxygen since the cosmos was less than half its current age—a process crucial for forming new stars and planets. ✨
#supernovae⚡#hubble⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the spiral galaxy NGC 2525, a supernova explosion imaged by the Hubble Space Telescope in 2018 briefly outshone all the other stars in its galaxy combined. Supernovae are the final, colossal explosions of massive stars, releasing enough energy in just weeks to equal the total output of our Sun over billions of years, and leaving behind exotic remnants like neutron stars or black holes. ✨
#supernovae⚡#galaxies⚡#hubble⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2022, astronomers used the Hubble Space Telescope to identify a fast radio burst originating from a galaxy called WISEA J071634.59–190039.2, located about 6 billion light-years from Earth. This pinpointed location helps scientists study the environments where these ultra-short, powerful flashes of radio energy are born, revealing new clues about the mysterious origins of fast radio bursts across the cosmos. ✨
#fastbursts⚡#hubble⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The distance between Earth and the edge of the observable universe is about 46.5 billion light-years—meaning the furthest galaxies seen by the Hubble Space Telescope, like GN-z11, are so distant that their light has taken over 13 billion years to reach us, yet the universe has expanded even farther in that time. This immense scale exists because space itself stretches as light travels, making cosmic distances far greater than the simple time since the Big Bang would suggest. ✨
#spacedistances⚡#cosmology⚡#hubble⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy UDFy-38135539, discovered using the Hubble Space Telescope, is among the most distant objects ever detected—its light began its journey toward Earth more than 13 billion years ago. Seeing UDFy-38135539 means observing a galaxy as it existed when the universe was just a few hundred million years old, allowing astronomers to study the very dawn of galaxy formation. ✨
#galaxies⚡#hubble⚡#cosmicdawn⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy NGC 1300, located about 61 million light-years away in the constellation Eridanus, features a spectacular "barred spiral" shape, with a bright central bar of stars stretching across its core and sweeping spiral arms extending outward. Unlike typical spirals, this central bar channels gas inward, helping trigger bursts of star formation and giving NGC 1300 its unusual, grand design—making it one of the best examples of a cosmic structure shaped by galactic dynamics rather than collisions. ✨
#galaxies⚡#structures⚡#hubble⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the spiral galaxy NGC 3147, astronomers have discovered a supermassive black hole encircled by a disk of gas that defies expectations—it's thin and spinning at nearly the speed predicted for much larger, brighter disks found around actively feeding black holes. This surprising find, made with the Hubble Space Telescope, shows that even "starving" black holes can maintain disks behaving like those from the most powerful galactic cores, challenging what scientists thought they knew about black hole feeding habits. ✨
#blackholes⚡#hubble⚡#galaxiess⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels