Популярность имеет свои минусы. Чем популярней язык программирования, тем выше его распространённость, а значит найдутся те кто поспешит воспользоваться этим.
С ростом популярности 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
Time to yourself🧘♀️
Indulge in a 45-minute grounding meditation, harmonising your being and cultivating a deep sense of peace and renewal within.
🗓️ Tomorrow, May 14
🕖 7 am - 7.50am
📍Seminyak, at Sunset Park Pool Bar, Level 4, Potato Head Studios
Bookings via the link.
@BaliNews
#wheretogo#Seminyak
🤠Annual Cinco De Mayo party at Motel Mexicola
🪩 Today from 6pm till the late night you can try to win IDR 10 million in Reggaeton Dancing Competition.
🍸 DJs, dancers and good vibes are expected in Seminyak tonight.
@BaliNews
#Seminyak#wheretogo
🤕Two foreigners beat up the Pechalangs at a villa in Seminyak
Kuta police have detained two US citizens, 26-year-old Aabed Attia and his older brother 30-year-old Zeyad Ahmed Attia. According to law enforcers, the Americans beat up two pechalangs (local vigilantes) at a rented villa in Seminyak after being reprimanded over loud music. The foreigners are now in a detention center, awaiting trial.
@BaliNews
#accidents#Kuta#Seminyak
😱 А very impressive python crawled onto Seminyak beach for a rest yesterday
🐍 It was not allowed to rest, though – despite its status as a public beach, the snake was politely but firmly asked to leave.
@BaliNews
#places#incidents#Seminyak
🏚Fire destroys 19 villas in Seminyak
📰 Detikbali reports the the blaze broke out overnight on Kayu Aya Street in the Amasya villa complex. The fight against the fire continued into the morning. The flames were so big that they were seen even from airplanes arriving in Bali.
🎍 Apparently, the reason is that the complex is mostly built in eco-style, a lot of materials such as bamboo and straw were used in the decoration and construction, and they are known to burn well.
💸 Damage from the fire is estimated at 12 billion rupees.
👮♂️ Ketut Sukadi, a spokesman for Denpasar police's public relations department, said:
“The fire first appeared on the second floor of villa 9 of The Amasya Villas complex, then spread to villa 12. A total of 19 villas out of 20 were burned in the fire, only villa 5 was not burned.”
There are no official reports on the cause of the fire or other details yet, authorities are still investigating the incident.
@BaliNews
#accidents#Seminyak#Denpasar