Repository navigation
Security hardening, review fixes and README screenshot - #3
Merged
Merged
Conversation
- Login, setup and invite emails are validated without a backtracking regex; DogStatsD lines are parsed without one, and a header or path API key is checked first. - Tag-filter globs use a linear matcher (at most 20 wildcards); metric intervals must be positive and are widened to at most 10,000 buckets. - Sample data no longer replaces Date.now; one start per organization at a time. - The public API accepts only an API key in DD-API-KEY; session ids are accepted only from the signed cookie, and every cookie request that changes state is origin-checked. - Monitor recipients come from the monitor's template, not from inserted tag values. Webhook deliveries have a 15 s total limit, and each organization's monitors run independently; notification retries run in parallel. - Private-key redaction is linear; tags and names are bounded before redaction. All values under secret-named keys are masked; service and span names, short Basic credentials and separated card numbers are redacted. - Webhook filter: IPv4 addresses inside IPv6 forms (mapped, compatible, NAT64, 6to4) and Teredo, site-local and other special ranges are refused. Connection and framing headers cannot be set on webhooks. - Anti-framing headers; PUBLIC_URL is required in production; API keys in log URLs are hidden regardless of case; logout returnTo accepts same-origin paths only. Assisted-by: Replit
Akshayab
force-pushed
the
security-hardening
branch
from
November 17, 2026 05:25
43a10b7 to
7367d8a
Compare
Intake: cumulative OTLP references are applied only after the data is stored; stream keys include all resource, scope and point attributes; late samples are ignored; histograms are subtracted by matching bucket layout; negative exponential buckets are kept; disk usage keeps its device tag. ClickHouse insert errors return 503; multi-chunk PostgreSQL writes are one transaction; series metadata is marked written only after success. Datadog Agent sketches keep their bins as weighted points. Monitors: groups that stop reporting go to No Data when notify_no_data is set; the no-data timer starts at the newest data point; evaluation_delay is applied; updates are validated as merged (no empty queries) and keep priority; log env and span group fields work; percentile(N), change and pct_change are computed; state is saved with a compare-and-set so one process announces each transition. Queries: formulas combine only matching groups and share one bucket size; data is selected from the exact start time; numeric filters ignore text values; facets and charts find flat attribute keys; totals and timeseries are computed separately; percentiles use the same interpolation on PostgreSQL and ClickHouse; the APM backfill is limited by span id; query_index follows the source formula. API and UI: dashboard updates lock the row and validate structure; list routes page when asked; the dashboard page reloads when its id changes; precision-0 numbers keep their zeros; live tail pages with the cursor and cancels stale requests. SDKs and server: the Node exporter treats a reset response as a retryable failure; Flask spans end when the response body is finished; SIGTERM drains requests, flushes rollups and closes the database before exit. Errors after monitor create and update are logged. Assisted-by: Replit
3 tasks done
Assisted-by: Replit
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.
What and why
Hardens the server against denial-of-service inputs, credential misuse, alert-recipient injection, webhook abuse and redaction gaps.
Date.now, and only one start per organization runs at a time.DD-API-KEY, not an application key. Sessions are read only from the signed cookie, and every state-changing cookie request is origin-checked.Host,Transfer-Encodingand similar) cannot be set.X-Frame-Options: DENYandframe-ancestors 'none';PUBLIC_URLis required whenNODE_ENV=production(Docker Compose already sets it); API keys in logged URLs are hidden regardless of case; logoutreturnToaccepts same-origin paths only.Also included (merged in from #4 and #2):
How it was tested
pnpm run format:check, typechecks and unit tests pass (49 tests; 12 new, each using the exact problem input and checking that normal input behaves as before)scripts/e2e.shpasses (for intake, query or storage changes): on PostgreSQL and ClickHousePUBLIC_URLrequirementAlso checked on a running server: log search, facets, histogram, the v2 logs API and a log monitor, and the new response headers.
Final checks on the combined branch:
~ written by ⠕ Replit