Skip to content

FastAPI app version hardcoded and stale (main.py) #31

Description

@mesrikanthreddy

Problem

`backend/app/main.py`:
```python
app = FastAPI(
title="KShield Engine",
version="1.0.0",
...
)
```
This is hardcoded and does not track the actual package version — currently 1.1.0 in `pyproject.toml`, `npm/package.json`, and `cli/Cargo.toml`. Shows up in `/docs` (Swagger UI) and `/openapi.json`, so anyone introspecting the API sees the wrong version.

Proposed fix

Read the version from `pyproject.toml` at import time (e.g. via `importlib.metadata.version("kshield")`) instead of hardcoding it, so it can't drift again.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions