fix(security): close OSS Criticals S1–S5 - #49
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements S1–S5 from
docs/oss-ux/OSS_SECURITY_REVIEW.mdso the default self-host posture is safer for private / single-admin installs (and unblocks the internet multi-user bar’s Critical gate).pidconcat)SessionKillSupport.requireNumericPid+PreparedStatementfor Postgres; digit-only MySQLKILL; dialect viaDatabaseProviderRegistry.getCanonicalNameAccessControlServiceon ActiveQuery, LockContention, IndexRecommendation (incl. apply), Configuration, SlowLogSource, GrowthMonitoring, SavedQuery, Playbook0.0.0.0setup-agent.shdefaultHERMES_WEBUI_HOST=127.0.0.1; compose publishes agent on127.0.0.1(in-container bind unchanged for bridge DNS)--requirepass+DEEPSQL_VALKEY_PASSWORD; install generates it; ActuatorpermitAllonly/actuator/health; prod exposes health onlyJwtUtilfails closed under prod or auth-on if secret < 32 bytesAlso:
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 compiledocker compose config -qwith Valkey password setscripts/self-host/smoke-test.shsecurity section/active-queries/kill/...and/index-recommendations/{id}/applyOut of scope (still open)
High/Medium from the review: H4 SET allowlist, H5 SSRF, H6 share password, remaining controllers without ACL, etc.