Repository navigation
Fix #51: Tracking: Runtime reachability for SCA (in-app probe + live sensor) - #84
Vedant-200 wants to merge 1 commit into
Conversation
Applied by the DevPilot agent from the reviewed run diff.
vsn411
left a comment
There was a problem hiding this comment.
Thanks for jumping in on the runtime reachability work. I'm going to close this one, and I'd like to explain why so the next attempt lands.
#51 is the tracking issue, not a task. Its body is a checklist of sub-issues (#52–#57, #66–#80), and Fixes #51 here would close that whole roadmap on merge. Each sub-issue is sized to be a PR on its own; pick one of those instead. #54 (import coverage files) has a good first issue label and a clear spec, and #52/#53 define the formats everything else depends on.
What would need to change in the code itself:
- Location. This adds sensor/runtime code to
src/secfoo/__init__.py, so everyimport secfooloads it. Rule 0 in #51 is that installing secfoo never pulls in probe code paths. Runtime code should live in its own module (e.g.src/secfoo/runtime/), imported only by the commands that need it. - Event format. #53 defines the NDJSON contract:
type: session | load | hitlines withsession,finding_fingerprint,count,first_seen/last_seen,auth,stack_sample. TheRuntimeEventdataclass here is a different, flat schema, so anything built on it would have to be redone. Please build to #53 (and raise it in that thread if you think the format should change). - Watchlist format. #52 proposes
version,generated_at, and entries withecosystemandgranularity, and asks for discussion before building.load_watchlist()drops all of those fields. - The
SECFOO_SENSORgate is in the wrong place.append_event()silently writes nothing unlessSECFOO_SENSOR=1. Rule 0 is about probes not hooking into the app process; the coverage importer (#54) andsecfoo runtime ingestwrite event files with no sensor running, so this gate would break them. - Tests. CONTRIBUTING asks for tests with any behavior change, and #53 specifically lists the cases: a valid file, a malformed line (skip and report, don't abort), and re-ingesting the same file without double counting.
If you'd like to take one of the sub-issues, comment on it so nobody duplicates the work, and feel free to ask questions there before writing code. Happy to review the next one.
Summary
Adds the explicit SECFOO_SENSOR opt-in gate plus the watchlist and append-only runtime event formats to the package init.
Fixes #51
🤖 Generated by the DevPilot agent — please review before merging.