Skip to content

security: token_ref (Proxmox + Git tokens) returned verbatim in API responses #100

Description

@pparage

Problem

token_ref (the live Proxmox API token and Git PATs) is returned verbatim in API responses, not just stored at rest.

  • GET /v1/proxmox/hostsHostOut.token_ref (the full PVEAPIToken=... secret)
  • GET /v1/catalog/sourcesSourceOut.token_ref (Git PAT)

Evidence

  • app/schemas/v1/proxmox.py:15HostOut(HostIn) includes token_ref: str
  • app/schemas/v1/catalog.py:13,21SourceOut.token_ref
  • app/routes/v1/proxmox/hosts.py _row_to_out() populates token_ref from the DB row

Impact (Critical)

Any caller that can reach the backend harvests every registered Proxmox/Git credential in one GET. The exposure is amplified by the subnet-wide CORS default (separate issue) — a single LAN device can read all tokens.

Suggested fix

Drop token_ref from the *Out response models (use a separate input-only model, or Field(exclude=True) / a masked boolean like has_token). Never echo secrets in responses regardless of the at-rest fix.

Related (at-rest, distinct): #86, #75.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions