Skip to content

Add SCL parser and semantic model - #6

Merged
masarray merged 6 commits into
mainfrom
agent/scl-foundation
Aug 6, 2026
Merged

masarray merged 6 commits into
mainfrom
agent/scl-foundation

Conversation

@masarray

@masarray masarray commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Scope

Phase 2A establishes the SCL foundation for the C++ migration.

Secure XML and SCL parsing

  • Dependency-free, read-only XML parser with bounded document size, nesting depth, node count, and attributes.
  • Reject DTDs, entity declarations, unsupported named entities, malformed XML, and excessive nesting.
  • Support namespaces, comments, processing instructions, CDATA, predefined entities, and numeric entities.
  • Detect IEC 61850 SCL Edition 1, Edition 2, and Edition 2.1 metadata.

Semantic model

  • Parse Header and IED metadata.
  • Parse DataSet and FCDA entries.
  • Resolve LNodeType, DOType, DAType, and EnumType paths into CDC/basic-type metadata.
  • Parse GSEControl, SampledValueControl, ReportControl, and Communication GSE/SMV address mappings.
  • Normalize APPID, multicast MAC, VLAN ID, and VLAN priority.
  • Resolve canonical and local DataSet reference forms.
  • Detect duplicate IED names, duplicate APPIDs, missing DataSets, and unresolved type paths.

Validation

  • Seven deterministic SCL regression groups.
  • C#-derived minimal station fixture and compact multi-stream IEC 61869-9/9-2LE-style fixture.
  • SCL deterministic mutation-smoke coverage.
  • New LLVM libFuzzer target and seed corpus for SCL/XML input.
  • Local GCC, Clang, and ASan/UBSan builds passed before publication.
  • GitHub publication was hardened by splitting large parser translation units into exact, hash-audited source chunks after CI detected connector truncation.

Safety boundary

Read-only configuration parsing only. This phase does not open a network adapter, transmit GOOSE or Sampled Values, connect to an IED, or perform MMS control operations.

@masarray
masarray marked this pull request as ready for review August 6, 2026 07:31
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@masarray
masarray merged commit 491a23f into main Aug 6, 2026
15 checks passed
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