Sample Reports

Source-Code Security Audit · Sample

Security Audit Report

Acme Notes, Inc. — SAMPLE

Auditor

SecReport · secreport.site

Engagement

Static Source-Code Security Audit

Date

2026-11-20

Repository

acme/notes-api (fictional)

SAMPLE. The company, code and findings below are entirely fictional and exist only to demonstrate the format and depth of a SecReport deliverable.

1. Executive Summary

The multi-tenant note-sharing backend of Acme Notes (Node/TypeScript) was assessed through a read-only static source-code audit. The overall posture is adequate with gaps: authentication and the authorization checks on single-resource endpoints are sound, but a bulk endpoint contains an authorization-matrix inconsistency that allows cross-tenant data access, and a webhook feature contains a redirect-unaware SSRF.

SeverityCount
Critical0
High
1 — F-01
Medium
1 — F-02
Low / Hardening2

2. Findings

F-01 — Bulk endpoint skips the ownership check → cross-tenant read

High
CVSS 7.1 · CWE-639 · src/routes/notes.ts:142

Root cause. The single endpoint enforces ownership (notes.ts:88). The bulk endpoint fetches the client-supplied id list without an ownerId filter (notes.ts:142). Two paths reach the same resource with different authorization.

// safe — single
where: { id, ownerId: user.id }        // notes.ts:88
// vulnerable — bulk
where: { id: { in: body.ids } }        // notes.ts:142  ✗ no ownerId

Impact. Any authenticated user can enumerate note ids and read other tenants' note contents — a cross-tenant confidentiality breach not possible on the single endpoint.

Fix. Add an ownership scope to the bulk query: where: { id: { in: ids }, ownerId: userId }. Effort: S.

F-02 — Webhook URL validator does not re-check after a redirect

Medium
CVSS 5.3 · CWE-918 · src/services/webhook.ts:34

Root cause. validateUrl() only blocks literal private IPs; sendWebhook follows 30x redirects. A URL such as http://attacker/redirect → 169.254.169.254 bypasses the validator and reaches the cloud metadata service.

Fix. Disable redirects or re-validate on every hop; use DNS pinning. Effort: M.

3. Remediation Roadmap

PriorityFindingAction
1 (now)F-01Add ownerId scope to the bulk endpoint
2 (short-term)F-02Redirect-aware SSRF guard + DNS pinning
3 (hardening)F-03/04Security headers + error hygiene

4. Positive Observations

Single CRUD endpoints are consistently ownership-scoped. JWT validation is centralized and sound; password hashing is appropriate; the ORM uses parameterized queries (no raw SQL).