
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
.. image:: https://github.com/aamalev/aiohttp_apiset/workflows/Tests/badge.svg :target: https://github.com/aamalev/aiohttp_apiset/actions?query=workflow%3ATests
.. image:: https://codecov.io/gh/aamalev/aiohttp_apiset/branch/master/graph/badge.svg :target: https://codecov.io/gh/aamalev/aiohttp_apiset :alt: Coverage
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json :target: https://github.com/charliermarsh/ruff :alt: Code style: ruff
.. image:: https://img.shields.io/pypi/v/aiohttp_apiset.svg :target: https://pypi.python.org/pypi/aiohttp_apiset
.. image:: https://readthedocs.org/projects/aiohttp-apiset/badge/?version=latest :target: http://aiohttp-apiset.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://img.shields.io/pypi/dm/aiohttp-apiset.svg :target: https://pypi.org/project/aiohttp-apiset
.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg :alt: Hatch project :target: https://github.com/pypa/hatch
Package to build routes and validate request using swagger specification 2.0.
swagger-ui <https://github.com/swagger-api/swagger-ui>
_Package aiohttp_apiset allows supports several strategies:
.. code-block:: python
async def handler(request, pet_id): """ --- tags: [Pet] description: Info about pet parameters: - name: pet_id in: path type: integer minimum: 0 responses: 200: description: OK 400: description: Validation error 404: description: Not found """ pet = await db.pets.find(pet_id)
if not pet:
return {'status': 404, 'msg': 'Not Found'}
return {
'pet': pet, # dict serialized inside jsonify
}
def main(): router = SwaggerRouter( swagger_ui='/swagger/', version_ui=2, ) router.add_get('/pets/{pet_id}', handler=handler)
app = web.Application(
router=router,
middlewares=[jsonify],
)
web.run_app(app)
Is now available in the swagger-ui to the address http://localhost:8080/swagger/. Available both branch swagger-ui. For use branch 3.x visit http://localhost:8080/swagger/?version=3
Examples: examples <https://github.com/aamalev/aiohttp_apiset/tree/master/examples>
_
Check code:
.. code-block:: shell
hatch run lint:all
Format code:
.. code-block:: shell
hatch run lint:fmt
Run tests:
.. code-block:: shell
hatch run pytest
Run tests with coverage:
.. code-block:: shell
hatch run cov
FAQs
Build routes using swagger specification
We found that aiohttp-apiset 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
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.