Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Jinja2 support for bareASGI (read the documentation)
Try the following.
from typing import Mapping, Any
import jinja2
import os.path
import uvicorn
from bareasgi import Application
from bareasgi_jinja2 import Jinja2TemplateProvider, add_jinja2
here = os.path.abspath(os.path.dirname(__file__))
async def http_request_handler(request: HttpRequest) -> HttpResponse:
"""Handle the request"""
template = 'example1.html'
variables = {'name': 'rob'}
return await Jinja2TemplateProvider.apply(request, template, variables)
app = Application()
env = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.join(here, 'templates')),
autoescape=jinja2.select_autoescape(['html', 'xml']),
enable_async=True
)
add_jinja2(app, env)
app.http_router.add({'GET'}, '/example1', http_request_handler)
uvicorn.run(app, port=9010)
FAQs
Jinja2 support for bareasgi
We found that bareasgi-jinja2 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.