
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Este pacote permite que usuários façam login utilizando a senha única USP.
Além da autenticação OAuth este pacote também possui migrations para o armazenamento dos usuários no banco de dados.
É recomendado que a estas migrations sejam rodadas antes de qualquer outra migration, devido a dificuldade de alteração do model User depois de realizada a primeira migration:
Using a custom user model when starting a project
Adicione "django_oauth_usp" em INSTALLED_APPS no arquivo settings.py
INSTALLED_APPS = [
...
'django_oauth_usp.accounts',
]
Adicone o Middleware OAuthUspMiddleware
MIDDLEWARE = [
...
'django_oauth_usp.accounts.middleware.OAuthUspMiddleware',
]
No arquivo settings.py, informe o Model que será utilizado para armazenar os usuários
```
AUTH_USER_MODEL= 'accounts.UserModel'
```
Defina os parâmetro para OAuth::
OAUTH_CALLBACK_ID = 'callback_id_da_aplicação'
AUTHLIB_OAUTH_CLIENTS = {
'usp': {
'client_id': 'meu_client_id',
'client_secret': 'meu_secret_key'
}
}
#Rota utilizada para a view accounts_authorize
REDIRECT_URI = '/auth/authorize'
#Lista com o código das unidades que poderão ter acesso.
ALLOWED_UNIDADES = [12, 13, 14]
Rode as migrations::
python manage.py migrate
Adicione rotas para as views accounts_login e accounts_authorize::
urlpatterns = [
path('login', accounts_login, name='login'),
path('authorize', accounts_authorize, name='authorize'),
]
Os model UserModel provê os seguintes dados do usuário
user.get_full_name()
user.get_short_name()
user.email_user()
user.get_phone()
user.is_servidor()
user.get_funcao()
user.get_vinculo()
user.get_setor()
FAQs
Unknown package
We found that django-oauth-usp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.