Skip to content

fix(security): close OSS Criticals S1–S5 - #49

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/oss-security-criticals-c497
Aug 13, 2026
Merged

fix(security): close OSS Criticals S1–S5#49
cursor[bot] merged 2 commits into
mainfrom
cursor/oss-security-criticals-c497

Conversation

@venkateshsakamuri-lab

Copy link
Copy Markdown
Contributor

Summary

Implements S1–S5 from docs/oss-ux/OSS_SECURITY_REVIEW.md so the default self-host posture is safer for private / single-admin installs (and unblocks the internet multi-user bar’s Critical gate).

ID Finding Fix
S1 / C2 Kill-session SQLi (pid concat) SessionKillSupport.requireNumericPid + PreparedStatement for Postgres; digit-only MySQL KILL; dialect via DatabaseProviderRegistry.getCanonicalName
S2 / C1 Connection IDOR on dangerous APIs AccessControlService on ActiveQuery, LockContention, IndexRecommendation (incl. apply), Configuration, SlowLogSource, GrowthMonitoring, SavedQuery, Playbook
S3 / C3 Hermes bound 0.0.0.0 setup-agent.sh default HERMES_WEBUI_HOST=127.0.0.1; compose publishes agent on 127.0.0.1 (in-container bind unchanged for bridge DNS)
S4 / C4 Compose + fat Actuator Loopback binds for Postgres/Valkey/backend/agent; Valkey --requirepass + DEEPSQL_VALKEY_PASSWORD; install generates it; Actuator permitAll only /actuator/health; prod exposes health only
S5 / C5 Blank JWT → ephemeral key JwtUtil fails closed under prod or auth-on if secret < 32 bytes

Also: SECURITY.md, smoke asserts for anonymous prometheus / WAN binds, unit tests for pid validation + JWT fail-closed.

Test plan

  • ./mvnw -Dtest=SessionKillSupportTest,JwtUtilFailClosedTest,AccessControlServiceTest test
  • ./mvnw -DskipTests compile
  • docker compose config -q with Valkey password set
  • Redeploy compose (or install.sh) and run scripts/self-host/smoke-test.sh security section
  • Manual: user B → 403 on user A’s /active-queries/kill/... and /index-recommendations/{id}/apply

Out of scope (still open)

High/Medium from the review: H4 SET allowlist, H5 SSRF, H6 share password, remaining controllers without ACL, etc.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 13, 2026 11:19
Kill-session pid validation + prepared SQL; connection ACL on apply/kill
and related controllers; Hermes/compose loopback binds; Valkey requirepass;
Actuator lockdown; JWT fail-closed under prod/auth. Adds SECURITY.md and
smoke assertions.

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
Release review of S1–S5: keep vulnerability-reporting SLAs in SECURITY.md,
require ACL before slow-log cancel/resume, document Valkey requirepass, and
restrict session kill pids to ASCII digits.

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
@cursor
cursor Bot merged commit 7833f31 into main Aug 13, 2026
7 checks passed
@cursor
cursor Bot deleted the cursor/oss-security-criticals-c497 branch August 13, 2026 13:08
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.

2 participants