# Vulnerability reports

A vulnerability report is a bug report from outside your team. It might be a researcher’s write-up, an email, or another tool’s output. zkao reads it, splits it into separate claims, and checks each one against your code.

Reports filed here land in the project’s **Vulnerability reports** inbox, next to the ones that arrive through GitHub private vulnerability reporting. The project needs a security program first. A project admin sets one up under **Settings → Advisory settings**.

## File a report

Filing needs the `reports:write` scope. `zkao login` does not ask for it by default, so pass it with `--scope`. Name the repository the bug is in. Write the body as prose for a reader: what the flaw is, how to reach it, and what it costs. The body is limited to 80,000 characters.

CLI

```bash
zkao reports submit <repoId> --title "Verifier skips the final pairing check" --file report.md \
  --severity high --reporter-name "Ada" --reporter-github ada
cat report.md | zkao reports submit <repoId> --title "..." --file -
```

TypeScript

```ts
const { publicId } = await zkao.submitReport(repoId, {
  title: "Verifier skips the final pairing check",
  body,
  claimedSeverity: "HIGH",
  reporter: { name: "Ada", githubLogin: "ada" },
});
```

curl

```bash
curl -X POST -H "Authorization: Bearer $ZKAO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Verifier skips the final pairing check","body":"...","claimedSeverity":"HIGH"}' \
  https://zkao.io/api/v1/projects/$ZKAO_PROJECT_ID/repositories/<repoId>/reports
```

The response holds the report’s `publicId` and `intakeState: PENDING`. Sending the same title and body again returns the same report, so a retry never files a copy.

The severity is what the reporter claims, not an assessment. A higher claim is read more closely and costs more, so do not inflate it. Reporter details are for attribution only.

Filing is free. Reading the report and splitting it into claims is charged to the project.

## Investigate it

Wait until the report’s `intakeState` is `COMPLETE`. A `PENDING` or `RUNNING` report is still being read, and an investigation refuses it with `409`.

CLI

```bash
zkao reports list
zkao reports investigate <publicId>
zkao scans wait <scanId>
```

TypeScript

```ts
const { scanId } = await zkao.investigateReport(publicId);
await zkao.waitForScan(scanId);
```

curl

```bash
curl -X POST -H "Authorization: Bearer $ZKAO_API_TOKEN" \
  https://zkao.io/api/v1/projects/$ZKAO_PROJECT_ID/reports/<publicId>/investigate
```

An investigation is a scan, so it needs the `scans:launch` scope and spends credits. Each claim is checked against the code, compared with what earlier scans already found, and given a proof of concept where one can be written. Read the results as the scan’s findings. See [Triage findings](https://docs.staging.zkao.io/guides/findings/).

Note

Asking again while an investigation runs returns the same scan with `claimsQueued: null`. It starts nothing and spends nothing.
