Skip to content

Core Library

Purpose

This library was created to be used as a dependency by other Fluid Attacks’ components.

It contains common utilities that can be reused in other projects.

Installation

You can install this library via Pypi.

Publishing a new version

  1. Make any changes you want to the library.
  2. Run the Python linter:
    Terminal window
    m . /lintPython/dirOfModules/commonUtilsPypiFluidattackscore
  3. Upgrade the library version in pyproject.toml. Make sure to do this as it is required for your changes to be published.
  4. Push your changes using the common\ pipeline.
  5. Once you reach production, the new version of the library should become available.

Modules

Below you will find all relevant modules within the library.

git

You can import it via

from fluidattacks_core.git import (
...
)

http

This module wraps aiohttp, providing functions to perform HTTP requests, with additional security checks.

It is especially recommended for use cases where the URL comes from user input, as it helps prevent DNS rebinding attacks by default.

Usage example:

import asyncio
from fluidattacks_core.http import (
request
)
async def example() -> None:
response = await request("https://fluidattacks.com/", method="GET")
print(response)
asyncio.run(example())