---
title: "Report a new vulnerability"
method: POST
path: "/api/v2/rescanAgent/reportNewVuln"
tags: ["Rescan Agent"]
---

# Report a new vulnerability

`POST /api/v2/rescanAgent/reportNewVuln`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/rescanAgent/reportNewVuln`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Report a new vulnerability discovered during a rescan. The reported file must be within the rescan agent's scope. Provide a title, detailed description, affected file with line range, category, and severity. The frontend validates the input and returns a confirmation; the full_scan worker later enriches the report with language detection, scoring, and code segment extraction before creating the vulnerability record.

## Request body

- RescanAgentReportNewVulnRequest: Input for reporting a new vulnerability discovered during a rescan. The frontend validates the input; the full_scan worker enriches and persists the record.
  - `title` string, required: Short title summarizing the new vulnerability.
  - `description` string, required: Detailed description of the vulnerability, including impact and reproduction steps.
  - `file` string, required: Repository-relative path of the file containing the vulnerability.
  - `lineStart` integer, required: First line of the vulnerable code.
  - `lineEnd` integer, required: Last line of the vulnerable code (must be >= lineStart).
  - `category` string, required: Vulnerability category (e.g. "SQL Injection", "Cross-Site Scripting").
  - `severity` 'critical' | 'high' | 'medium' | 'low' | 'info', required: Severity level of the reported vulnerability.

## Response `200`

Vulnerability report accepted

- RescanAgentReportNewVulnResponse: Response confirming the vulnerability report was accepted.
  - `reported` boolean, required: Always true on success.
  - `vuln` object, required: Echo of the reported vulnerability input.

## Other responses

- `400`: Error Response
- `401`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
