Repository navigation
fix(process): validate saved process/socket attribution consistency - #10
Merged
Merged
Conversation
Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.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.
Problem
Fixes #9. Duplicate numeric PID candidates and contradictory saved process/link records can reach diffs or telemetry under a plausible identity. Matched links also overwrite the distinct name reported by
ss.Invariant
A cohort has one process candidate per numeric PID. Declared process IDs must agree with host/PID/start fields, and linked records must reference that paired process with matching PID/executable/UID/GID. This establishes internal consistency of represented evidence;
linked=trueremains PID-based contextual association.Design decision
The exact independently accepted eight-file patch has five production change categories:
ssname in socketprocess_name, retaining procfs name separately.Threat/failure model
Saved artifacts may be inconsistent or combined incorrectly. Equal declared observation times do not authorize contradictory context. Name differences can be legitimate; neither disagreement nor agreement proves PID reuse or ownership.
E1/E2 show an information limit: identical supported inputs can represent different possible execution-instance histories. Atomic capture, instance ownership, executable integrity, causality and cross-boot/namespace identity remain unverified. The standalone adapter has no complete paired cohort.
G6 remains a separate pre-existing parser defect: malformed content beside a valid
ssusers reference may be ignored. Independent replay found unchanged baseline/candidate outputs; this PR does not claim complete users-field validation or fix G6.Rejected alternatives
Name-equality admission would reject legitimate observations and still miss same-name reuse. First/last candidate selection is order-dependent. No confidence score, schema version, boot identifier, namespace inference or live collection is introduced.
Compatibility
Inconsistent normalized artifacts now fail closed. Socket
process_namenow preservesssprovenance; consumers must not assume procfs-name equality. Existing schema, dependencies, fixtures, workflows, socket identity/order and event types remain unchanged. Missing-PID sockets and multiple references remain represented; name-only link differences still create no link-change event.Validation
Rollback
Existing artifact versions need no migration. Removing these checks would restore order-dependent duplicate-PID selection and acceptance of inconsistent context; reverting name preservation would again discard the distinct
ssobservation.