Skip to content

Post-M4: fail-closed PCAP/SCL evidence, bounded identity keys and cancellable Validation - #31

Merged
masarray merged 9 commits into
mainfrom
fix/interop-evidence-boundaries-and-pcap-ux-20261017
Oct 17, 2026
Merged

masarray merged 9 commits into
mainfrom
fix/interop-evidence-boundaries-and-pcap-ux-20261017

Conversation

@masarray

Copy link
Copy Markdown
Owner

Follow-up to merged #29. Tighten offline M4 verdicts to prevent false confidence from a single ASDU, duplicate publishers, bad sequence/layout, unverified smpCnt wraps, truncated replay or identity saturation. Add GUI cancellation and throttled progress for long local PCAP inspections, and remove per-ASDU joined-string allocation in inspector. All software changes remain passive/receive-only. Physical canonical TAP/IED/60-minute soak acceptance continues under #30.

@masarray
masarray marked this pull request as ready for review October 17, 2026 03:09
@masarray
masarray merged commit 334b771 into main Oct 17, 2026
7 checks passed
@masarray
masarray deleted the fix/interop-evidence-boundaries-and-pcap-ux-20261017 branch October 17, 2026 03:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T03:11:50.397277Z 0be1f48 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0be1f48db3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +171 to +173
if (exact.Stream.AsduCount < 2)
return new(expectation.ControlBlockReference, "LIMITED_EVIDENCE",
"One ASDU cannot establish sequence progression; record more than one sample", exact.Stream.Key);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require actual smpCnt values before claiming progression

When two or more decoded ASDUs omit or contain an unparseable smpCnt, AsduCount still passes this check while Observe records neither duplicates nor non-unit steps, so the comparison eventually returns WIRE_FIELDS_MATCH and claims sequential evidence. SampledValueParser.ReadAsdu explicitly permits SmpCnt to remain null, so track valid counters and downgrade any stream without at least two comparable values rather than treating ASDU count as progression evidence.

AGENTS.md reference: src/AGENTS.md:L19-L21

Useful? React with 👍 / 👎.

Comment on lines +153 to +156
var matching = candidatesWithMismatches.Where(x => x.Errors.Count == 0).ToArray();
if (matching.Length > 1)
return new(expectation.ControlBlockReference, "AMBIGUOUS_WIRE",
$"{matching.Length} independent observed publisher identities match the same SCL stream; select and investigate the true source");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count distinct senders before reporting ambiguity

When SCL omits a field such as confRev, VLAN ID, or PCP, CompareFields ignores that field, so two strong keys from the same source MAC that differ only in the omitted field both enter matching. This branch then reports “independent observed publisher identities” and AMBIGUOUS_WIRE, even though there may be only one sender whose configuration changed; incomplete intent should remain the diagnosis unless multiple distinct publishers actually match.

AGENTS.md reference: AGENTS.md:L29-L34

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant