
Research
lightning PyPI Package Compromised in Supply Chain Attack
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.
django-oauth-usp
Advanced tools
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
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.