Skip to content

fix(profile): activity stats query real columns - #644

Merged
ralyodio merged 2 commits into
masterfrom
fix/profile-activity-stats-columns
Oct 21, 2026
Merged

ralyodio merged 2 commits into
masterfrom
fix/profile-activity-stats-columns

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The ugig-net supabase gateway logs ~2,600 HTTP 400s a day for HEAD /rest/v1/post_votes?...&value=eq.1, HEAD /rest/v1/gig_comments?user_id=eq... and HEAD /rest/v1/posts?...&type=eq.skill, all from ProfileActivityStats.

  • gig_comments: user_id -> author_id
  • post_votes: value -> vote_type (stores 1 / -1)
  • Skills published: posts.type = skill (no such column) -> skill_listings by seller_id, status active

Each failed query silently counted 0 on public profiles.

🤖 Generated with Claude Code

gig_comments and post_votes have author_id/vote_type, not user_id/value,
and posts has no type column (skills live in skill_listings). PostgREST
answered 400 to every one of these count queries (~2,600/24h on the
gateway), so profile stats always showed 0 for skills, gig comments,
upvotes and downvotes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

57 finding(s)

HIGH/CRITICAL: 1 | MEDIUM: 12 | LOW: 44

Severity Rule Location
HIGH js-ssrf-outbound-request scripts/scan-all-skills.ts:38
MEDIUM js-open-redirect src/app/agent-login/AgentLoginForm.tsx:38
MEDIUM js-unescaped-html-sink src/app/blog/[slug]/page.tsx:80
MEDIUM js-open-redirect src/app/checkout/CheckoutClient.tsx:77
MEDIUM js-open-redirect src/app/dashboard/subscription/page.tsx:101
MEDIUM js-open-redirect src/app/dashboard/subscription/page.tsx:113
MEDIUM js-unescaped-html-sink src/app/page.tsx:70
MEDIUM js-unescaped-html-sink src/app/pricing/page.tsx:84
MEDIUM js-open-redirect src/components/funding/FundingClient.tsx:138
MEDIUM js-open-redirect src/components/gigs/BuyNowButton.tsx:106
MEDIUM js-unescaped-html-sink src/components/layout/PitFooter.tsx:25
MEDIUM js-dynamic-code-execution src/lib/skills/metadata-extract.ts:300
MEDIUM js-dynamic-code-execution src/lib/skills/security-scan.ts:48
LOW secret-generic-credential cli/src/commands/auth.test.ts:66
LOW secret-generic-credential cli/src/commands/auth.test.ts:85
LOW secret-generic-api-key docs/agents/integration-guide.md:893
LOW secret-generic-credential src/app/api/auth/agent-register/route.test.ts:27
LOW secret-generic-credential src/app/api/auth/login/route.test.ts:53
LOW secret-generic-credential src/app/api/auth/login/route.test.ts:68
LOW secret-generic-credential src/app/api/auth/login/route.test.ts:87
LOW secret-generic-credential src/app/api/auth/signup/route.test.ts:158
LOW secret-generic-credential src/app/api/auth/signup/route.test.ts:180
LOW secret-generic-credential src/app/api/auth/signup/route.test.ts:197
LOW secret-generic-credential src/app/api/auth/signup/route.test.ts:208
LOW secret-generic-credential src/app/api/auth/signup/route.test.ts:247
LOW secret-generic-credential src/app/api/gigs/[id]/buy/route.test.ts:48
LOW secret-generic-credential src/app/api/gigs/[id]/buy/route.test.ts:99
LOW secret-generic-credential src/app/api/gigs/[id]/buy/route.test.ts:158
LOW secret-generic-credential src/app/api/orders/[id]/release/route.test.ts:18
LOW js-dynamic-code-execution src/app/api/skills/[slug]/scan/route.test.ts:212
LOW js-dynamic-code-execution src/app/api/skills/[slug]/scan/route.test.ts:223
LOW js-dynamic-code-execution src/app/api/skills/[slug]/scan/route.test.ts:239
LOW secret-generic-credential src/lib/api.test.ts:126
LOW secret-generic-credential src/lib/api.test.ts:131
LOW js-dynamic-code-execution src/lib/skills/composite-scanner.test.ts:106
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:36
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:44
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:66
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:81
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:94
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:103
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:118
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:144
LOW js-dynamic-code-execution src/lib/skills/secureclaw-scanner.test.ts:162
LOW js-dynamic-code-execution src/lib/skills/security-scan.test.ts:28
LOW js-dynamic-code-execution src/lib/skills/url-import.test.ts:178
LOW js-dynamic-code-execution src/lib/skills/url-import.test.ts:191
LOW secret-jwt src/lib/supabase/service.test.ts:16
LOW secret-jwt src/lib/supabase/service.test.ts:40
LOW secret-generic-credential src/lib/validations.test.ts:148

…and 7 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

…d types)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 1fe6b55 into master Oct 21, 2026
6 checks passed
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