Repository navigation
feat(sensor): attribute runtime hits to live traffic route templates and auth state (#69) - #228
Open
SriRamkunamsetty wants to merge 1 commit into
Open
SriRamkunamsetty wants to merge 1 commit into
SriRamkunamsetty wants to merge 1 commit into
Conversation
Comment on lines
+123
to
+126
| const cleaned = String(name || "") | ||
| .trim() | ||
| .replace(JOB_SAFE_RE, "-") | ||
| .replace(/^[-/]+|[-/]+$/g, ""); |
| parsed_routes = json.loads(routes_seen_json) | ||
| if isinstance(parsed_routes, dict): | ||
| distinct_routes.update(str(k) for k in parsed_routes) | ||
| except ValueError: |
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.
Fixes #69
Summary
Adds live request, job, and auth state attribution for Python and Node.js probes while enforcing the privacy guarantee (route templates only — never concrete paths, query strings, header/cookie values, tokens, or user IDs):
Python (\contextvars.ContextVar, \src/secfoo/sensor/context.py\ & \probe.py):
outes_seen).
Node.js (\AsyncLocalStorage,
pm/secfoo-sensor/):
eq.baseUrl + req.route.path\ and \astifyPlugin\ reading
equest.routeOptions.url\ /
outerPath.
unWithJob, \NodeHitCollector, template sanitization, and
ode --test\ suite validated directly against \secfoo.runtime.evidence.validate_event.
Contract & Dashboard Integration:
untime/evidence.py, \schema.sql,
epository.py, and \web/sca_runtime.py\ with validated
outes_seen\ storage and
eached on X of Y routes seen\ summaries.
Benchmark & Verification
uff check .\ clean, \�andit -c .bandit -ll -r src/secfoo\ clean, \pytest tests/test_sensor/ tests/test_runtime/ tests/test_web/test_sca_runtime.py tests/test_docs_consistency.py\ (322 passed).