fileagent


Namefileagent JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryPython fileagent to accompany Snort in a container
upload_time2025-07-18 19:42:29
maintainerNone
docs_urlNone
authorNikolas Filippatos
requires_python>=3.11
licenseMIT License Copyright (c) 2025 ISSG University of Patras Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords fileagent api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FileAgent

## About

This repository is part of the SAND5G project, which aims to enhance security in 5G networks. FileAgent is a tool designed to facilitate the management of Snort rules in a containerized environment.

5G -and beyond- networks provide a strong foundation for EU’s digital transformation and are becoming one of the Union’s key assets to compete in the global market.

Securing 5G networks and the services running on top of them requires high quality technical security solutions and also strong collaboration at the operational level.

https://sand5g-project.eu

![SAND5G](https://sand5g-project.eu/wp-content/uploads/2024/06/SAND5G-logo-600x137.png)

## Overview

FileAgent is a Python-based application designed to accompany Snort in a containerized environment. It provides a FastAPI-based interface for uploading and managing custom rules for Snort. The application supports JSON and plain text file uploads, translates the content into Snort-compatible rules, and appends them to a rules file while ensuring backups and avoiding duplicates.

## Features

- Upload JSON or plain text files containing IP addresses or URLs.
- Automatically translate uploaded content into Snort-compatible rules.
- Append rules to a custom rules file (`mock.local.rules` by default).
- Backup the rules file before appending new rules.
- Avoid duplicate rule entries.

## Requirements

- Python 3.11 or higher
- Dependencies listed in `pyproject.toml`:
  - `fastapi`
  - `uvicorn`
  - `requests`
  - `python-multipart`

## Installation

### Clone from github

1. Clone the repository:

   ```bash
   git clone https://github.com/ISSG-Projects/FileAgentSAND5G.git
   cd FileAgentSAND5G
   ```

2. Create a virtual environment

   ```bash
   python -m venv venv
   ```

3. Activate the virtual environment:

   - On Windows:

     ```bash
     venv\Scripts\activate
     ```

   - On macOS/Linux:
     ```bash
     source venv/bin/activate
     ```

4. Install the required dependencies:

   ```bash
   pip install .
   ```

### pip install from github

```bash
pip install git+ssh://git@github.com/ISSG-Projects/FileAgentSAND5G.git
```

## API Endpoints

- POST /upload: Upload a JSON or plain text file containing IP addresses or URLs. The content is translated into Snort rules and appended to the rules file.

## Documentation

The project documentation is generated using pdoc3. To generate and view the documentation:

Open the generated HTML files in the `docs` directory.

More information at [docs/pdoc/README.md](docs/pdoc/README.md).

Additionally the FastAPI framework provides an interactive API documentation at `http://localhost:8000/docs` when the application is running. This allows you to test the API endpoints directly from your browser.

## Future Implementations

<input disabled="" type="checkbox"> Add support for additional file formats (e.g., XML, CSV).
<input disabled="" type="checkbox"> Implement rule validation against a predefined schema.
<input disabled="" type="checkbox"> Add logging for better traceability.
<input disabled="" type="checkbox"> Create a web-based dashboard for managing rules.
<input disabled="" type="checkbox"> Integrate with external threat intelligence feeds.

## License

This project is licensed under the MIT License. See the LICENSE file for details.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fileagent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "fileagent, api",
    "author": "Nikolas Filippatos",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ca/2e/d0522fe71284b9d31ee40d6b718928adc3d49941a29e0cf8eaa57f3dbe22/fileagent-0.2.1.tar.gz",
    "platform": null,
    "description": "# FileAgent\n\n## About\n\nThis repository is part of the SAND5G project, which aims to enhance security in 5G networks. FileAgent is a tool designed to facilitate the management of Snort rules in a containerized environment.\n\n5G -and beyond- networks provide a strong foundation for EU\u2019s digital transformation and are becoming one of the Union\u2019s key assets to compete in the global market.\n\nSecuring 5G networks and the services running on top of them requires high quality technical security solutions and also strong collaboration at the operational level.\n\nhttps://sand5g-project.eu\n\n![SAND5G](https://sand5g-project.eu/wp-content/uploads/2024/06/SAND5G-logo-600x137.png)\n\n## Overview\n\nFileAgent is a Python-based application designed to accompany Snort in a containerized environment. It provides a FastAPI-based interface for uploading and managing custom rules for Snort. The application supports JSON and plain text file uploads, translates the content into Snort-compatible rules, and appends them to a rules file while ensuring backups and avoiding duplicates.\n\n## Features\n\n- Upload JSON or plain text files containing IP addresses or URLs.\n- Automatically translate uploaded content into Snort-compatible rules.\n- Append rules to a custom rules file (`mock.local.rules` by default).\n- Backup the rules file before appending new rules.\n- Avoid duplicate rule entries.\n\n## Requirements\n\n- Python 3.11 or higher\n- Dependencies listed in `pyproject.toml`:\n  - `fastapi`\n  - `uvicorn`\n  - `requests`\n  - `python-multipart`\n\n## Installation\n\n### Clone from github\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/ISSG-Projects/FileAgentSAND5G.git\n   cd FileAgentSAND5G\n   ```\n\n2. Create a virtual environment\n\n   ```bash\n   python -m venv venv\n   ```\n\n3. Activate the virtual environment:\n\n   - On Windows:\n\n     ```bash\n     venv\\Scripts\\activate\n     ```\n\n   - On macOS/Linux:\n     ```bash\n     source venv/bin/activate\n     ```\n\n4. Install the required dependencies:\n\n   ```bash\n   pip install .\n   ```\n\n### pip install from github\n\n```bash\npip install git+ssh://git@github.com/ISSG-Projects/FileAgentSAND5G.git\n```\n\n## API Endpoints\n\n- POST /upload: Upload a JSON or plain text file containing IP addresses or URLs. The content is translated into Snort rules and appended to the rules file.\n\n## Documentation\n\nThe project documentation is generated using pdoc3. To generate and view the documentation:\n\nOpen the generated HTML files in the `docs` directory.\n\nMore information at [docs/pdoc/README.md](docs/pdoc/README.md).\n\nAdditionally the FastAPI framework provides an interactive API documentation at `http://localhost:8000/docs` when the application is running. This allows you to test the API endpoints directly from your browser.\n\n## Future Implementations\n\n<input disabled=\"\" type=\"checkbox\"> Add support for additional file formats (e.g., XML, CSV).\n<input disabled=\"\" type=\"checkbox\"> Implement rule validation against a predefined schema.\n<input disabled=\"\" type=\"checkbox\"> Add logging for better traceability.\n<input disabled=\"\" type=\"checkbox\"> Create a web-based dashboard for managing rules.\n<input disabled=\"\" type=\"checkbox\"> Integrate with external threat intelligence feeds.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 ISSG University of Patras \n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Python fileagent to accompany Snort in a container",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/ISSG-UPAT/FileAgent-SAND5G"
    },
    "split_keywords": [
        "fileagent",
        " api"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ca16b40638a7e8b8ea74f03aa494b05eaf4ee94beb547fddd1a762035290b62e",
                "md5": "fb05b3dfef2308895e234dc37fa383c7",
                "sha256": "06437c52ccc154b3356461df5225356e3153dc9ee5ac25daf586be5b544c4b85"
            },
            "downloads": -1,
            "filename": "fileagent-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb05b3dfef2308895e234dc37fa383c7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 19254,
            "upload_time": "2025-07-18T19:42:28",
            "upload_time_iso_8601": "2025-07-18T19:42:28.422870Z",
            "url": "https://files.pythonhosted.org/packages/ca/16/b40638a7e8b8ea74f03aa494b05eaf4ee94beb547fddd1a762035290b62e/fileagent-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ca2ed0522fe71284b9d31ee40d6b718928adc3d49941a29e0cf8eaa57f3dbe22",
                "md5": "43f5ad20510edfdc875a4c1b7a8e9257",
                "sha256": "fe406ba7d51340e7b1887652f1bb4edf8a4c0f5594608a55c29116732c0e9c28"
            },
            "downloads": -1,
            "filename": "fileagent-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "43f5ad20510edfdc875a4c1b7a8e9257",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 18277,
            "upload_time": "2025-07-18T19:42:29",
            "upload_time_iso_8601": "2025-07-18T19:42:29.448552Z",
            "url": "https://files.pythonhosted.org/packages/ca/2e/d0522fe71284b9d31ee40d6b718928adc3d49941a29e0cf8eaa57f3dbe22/fileagent-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 19:42:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ISSG-UPAT",
    "github_project": "FileAgent-SAND5G",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fileagent"
}
        
Elapsed time: 0.98069s