Skip to content

Autonomous hardening: auth throttling, safer downloads, 401/403 split, security headers - #1

Draft
morshedmilton wants to merge 10 commits into
mainfrom
autonomous/ticketdeskpro-hardening
Draft

morshedmilton wants to merge 10 commits into
mainfrom
autonomous/ticketdeskpro-hardening

Conversation

@morshedmilton

Copy link
Copy Markdown
Owner

Summary of changes (autonomous loop-engineering run)

Security fixes (evidence in audit/security-findings.md):

  • BE-M1/M3: register + forgot-password now throttled via bucketed per-email Redis windows (stops reset-email bombing of victims/inbox + Brevo quota, and mass account creation). 3 new unit tests pin the buckets.
  • BE-L1: attachment Content-Type is derived server-side from the allowlisted extension; the client-supplied header is ignored (spoof regression test added).
  • BE-L4: unauthenticated callers on permissioned endpoints now get 401 (was 403); authenticated-without-permission stays 403.
  • BE-L3: list search terms clamped to 200 chars (tickets + users LIKE scans).
  • BE-L2: startup WARNING when demo users are seeded outside Development (behavior unchanged — intentional portfolio demo).
  • FE-H1: baseline security headers on every API response (nosniff, frame DENY, strict referrer; no CSP by design — Swagger UI).

Docs: README truth-fixes (edge-gate description, headers/throttle notes, test counts 47+33) + audit/ loop-ledger (state, findings, remediation plan, verification report).

Verification (commands actually run): dotnet test — 47/47 unit + 33/33 integration, green after every slice; build clean. gitleaks full-history: 0 findings. npm audit: 0 vulns. NuGet vulnerable: none.

Known limitations / owner decisions:

  • BE-M2 (Cloudinary attachment URLs are public capability URLs) deliberately NOT changed — needs a private-delivery design decision.
  • Independent-agent diff review was blocked by a sub-agent model outage (4 attempts); fallback = coordinator fresh-eyes diff review + full test reruns. Residual process risk noted in audit/verification-report.md.
  • Not tested: Docker builds (unavailable), live authenticated crawling (out of scope).

No merge/deploy by me — deploy job is push-to-main gated; review then merge at your discretion.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant