Skip to content

feat: initial implementation of abuse reporting wizard#1

Merged
lizthegrey merged 6 commits intomainfrom
lizf.initial-implementation
Feb 7, 2026
Lines changed: 10140 additions & 0 deletions
Merged

feat: initial implementation of abuse reporting wizard#1
lizthegrey merged 6 commits intomainfrom
lizf.initial-implementation

Conversation

@lizthegrey
Copy link
Contributor

@lizthegrey lizthegrey commented Feb 7, 2026

Summary

  • Go web app automating infrastructure discovery and abuse report lifecycle for endharassment.net
  • Server-rendered HTML (Go html/template + htmx), SQLite storage, SendGrid email delivery
  • Core workflow: URL submission → DNS/ASN/RDAP/BGP discovery → Cloudflare detection → evidence links → X-ARF report generation → admin approval queue → SendGrid delivery → escalation to upstreams
  • Security review with rate limiting, HMAC-signed CSRF, content safety validation, and CSAM/legal risk analysis (see SECURITY_REVIEW.md)

Key Design Decisions

  • Auth: Google/GitHub OAuth only — no magic links. Eliminates token race conditions, SendGrid auth spam, and brute-forcing surface area.
  • Evidence: user-hosted cloud links — users upload screenshots to their own Google Drive/Dropbox/iCloud and paste share links. No local blob storage to maintain, no disk exhaustion risk, no content-type attack surface.
  • URL text snapshotting — best-effort text-only crawl of reported URLs for evidentiary purposes (internal/snapshot/). Designed to integrate with endharassment/tor-fetcher for .onion sites.
  • CSAM/IC3/NCMEC disclaimers — prominent notices on home page, wizard steps, and footer directing users to report CSAM to NCMEC CyberTipline and federal cybercrimes to IC3. This tool is not equipped to handle those.

Packages

Package Purpose
cmd/wizard/ Entry point, config, graceful shutdown
internal/model/ Domain types
internal/store/ Store interface + SQLite with WAL mode + busy_timeout
internal/infra/ DNS → ASN → RDAP → BGP → Cloudflare discovery pipeline
internal/report/ X-ARF generation, evidence handling, SendGrid email, content safety
internal/server/ chi router, OAuth auth, wizard flow, CSRF, rate limiting
internal/admin/ Admin dashboard, approval queue, email approve/reject
internal/escalation/ Background worker for upstream escalation (wired up)
internal/snapshot/ URL text snapshotting for evidence capture

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./... passes (infra, report, escalation, server packages)
  • Manual walkthrough: go run ./cmd/wizard, walk through wizard with a real domain
  • Review SECURITY_REVIEW.md for pre-launch blockers (NCMEC reporting, legal counsel, SPF/DKIM)
  • Verify htmx.min.js integrity against CDN checksum
  • Configure Google OAuth credentials and test login flow

Sorry, something went wrong.

Go web app automating infrastructure discovery and abuse report
lifecycle for endharassment.net. Server-rendered HTML with htmx,
SQLite storage, SendGrid email delivery.

Core workflow: URL submission → DNS/ASN/RDAP/BGP discovery →
Cloudflare detection → evidence upload → X-ARF report generation →
admin approval queue → SendGrid delivery → escalation to upstreams.

Includes security review with rate limiting, HMAC-signed CSRF,
content safety validation, and CSAM/legal risk analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lizthegrey lizthegrey force-pushed the lizf.initial-implementation branch from 0e5e201 to 6359e8a Compare February 7, 2026 00:45
lizthegrey and others added 5 commits February 7, 2026 12:39
- Remove magic link auth entirely; use Google/GitHub OAuth only.
  Eliminates token race conditions, SendGrid auth abuse, and
  brute-forcing risks.

- Rearchitect evidence from local file uploads to user-provided
  cloud storage URLs (Google Drive, Dropbox, etc.). Users paste
  share links instead of uploading files. Eliminates blob storage,
  disk exhaustion, and content-type attack surface.

- Add URL text snapshotting (internal/snapshot/) for best-effort
  text-only crawls of reported URLs for evidentiary purposes.
  Runs asynchronously after URL submission.

- Add prominent CSAM/IC3/NCMEC disclaimers on home page, step 1,
  step 3, layout footer. Directs users to report CSAM to NCMEC
  CyberTipline and federal cybercrimes to IC3.

- Wire up escalation engine in main.go with RDAP-based abuse
  contact lookup. Was previously a placeholder log line.

- Add busy_timeout(5000) pragma to SQLite connection string.

- Update X-ARF generation and email composition to include
  evidence URLs instead of file hashes.

- Update SECURITY_REVIEW.md with changes-since-initial-review
  section documenting all architectural changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Request drive.metadata.readonly OAuth scope and offline access during
Google login, persist access/refresh tokens on user records, and verify
Google Drive evidence URLs by extracting file IDs and pulling metadata
(name, mimeType, size, createdTime) via the Drive REST API.

- New internal/gdrive/ package: URL parsing, file ID extraction, Drive
  API metadata fetch, token refresh helper
- Migration 003: adds google token columns to users table and Drive
  metadata columns to evidence table
- Updated store layer with UpdateEvidence method and expanded column sets
- Wizard step 3 now auto-verifies Drive links during evidence submission
- Templates show "Verified"/"Unverified" badges with file metadata
- CSS badges for verified/unverified states

Co-authored-by: Cursor <cursoragent@cursor.com>
Warn users prominently that hosting providers will forward abuse reports
to site operators, who may retaliate by publicly posting complaints and
encouraging further harassment. There is no expectation of privacy.

Warnings appear in three locations with escalating severity:
- Home page: informational overview of risks
- Wizard step 1: direct warning before entering any data
- Wizard step 4: explicit acknowledgment before final submission

Verified that outgoing emails and X-ARF reports do not include the
individual reporter's email or name -- reports are sent on behalf of
the organization only.

Co-authored-by: Cursor <cursoragent@cursor.com>
…limits

Add prominent disclosures that reports are filed on behalf of and with
the permission of the reporter:

- Home page: new "How We File Reports" info section explaining that
  reports are ToS-based, NCII reporters must be the affected person or
  their authorized representative, and we do NOT file DMCA takedown
  notices (which require being a copyright agent under penalty of
  perjury)
- Wizard step 3: strengthened NCII warning requires confirmation of
  identity; new copyvio-warning appears when copyright is selected,
  explaining the DMCA distinction
- Outgoing emails: opening line now says "on behalf of an affected
  individual"; NCII emails note the report is from the depicted person
  or their representative; copyright emails explicitly state this is a
  ToS report, not a DMCA notice
- CSS: added alert-danger and alert-info styles (were used but missing)

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add Apache 2.0 LICENSE file
- Add comprehensive README.md with setup, configuration, architecture,
  workflow, and pre-launch checklist
- Add AGENTS.md with AI coding agent guidelines covering architecture,
  conventions, security rules, and common task recipes
- Fix session secret: fail-fast if unset with HTTPS base URL; warn in
  dev mode instead of silently using a weak default
- Fix logout cookie: add missing Secure flag (consistent with session
  cookie)
- Remove vestigial evidence/ directory and Config.EvidenceDir field
  (evidence is now URL-based)
- Update SECURITY_REVIEW.md with all changes since initial review:
  Drive verification, retaliation warnings, NCII identity, DMCA
  distinction, session secret hardening, updated findings table

Co-authored-by: Cursor <cursoragent@cursor.com>
@lizthegrey lizthegrey merged commit 57e3159 into main Feb 7, 2026
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.

None yet

1 participant