Part of #165, PR 1 of the plan: no silent gap. Tracker #167.
Why
The PLC scan reads Structured Text and PLCopen XML. A CODESYS project in its native format (the binary .project, including the one inside an uploaded .projectarchive) yields 0 POUs, with no note on the run. A target that has only a native project therefore read as "no control-logic findings".
What
plc::native_projects(tree) lists two kinds of file, as sorted, /-separated paths with .git skipped:
a .project that is not an XML export (a BOM and leading white space are allowed before <);
a .projectarchive that opens as a zip. A corrupt one already gets ArchiveUnreadable from the SBOM stage and is not listed twice.
run_plc_scan records them as a skipped stage plc_native_project (SkipCode::NativePlcProject, not informational). The reason says what to do: export the POUs as PLCopen XML (Project → Export PLCopenXML) and add the export. DE/EN texts and a stage label are included.
.project is parsed as PLCopen only when it looks like XML.
Nightly: plc-codesys-synthetic and plc-codesys-proemion (uploaded archives) gain plc_native_project in their baselines. plc-corrupt-archive is unchanged.
Docs: guide/plc and the table in guide/scanning.
Tests
Unit native_codesys_projects_are_listed_and_exports_are_not covers:
Part of #165, PR 1 of the plan: no silent gap. Tracker #167.
## Why
The PLC scan reads Structured Text and PLCopen XML. A CODESYS project in its native format (the binary `.project`, including the one inside an uploaded `.projectarchive`) yields 0 POUs, with no note on the run. A target that has only a native project therefore read as "no control-logic findings".
## What
- `plc::native_projects(tree)` lists two kinds of file, as sorted, `/`-separated paths with `.git` skipped:
- a `.project` that is not an XML export (a BOM and leading white space are allowed before `<`);
- a `.projectarchive` that opens as a zip. A corrupt one already gets `ArchiveUnreadable` from the SBOM stage and is not listed twice.
- `run_plc_scan` records them as a skipped stage `plc_native_project` (`SkipCode::NativePlcProject`, not informational). The reason says what to do: export the POUs as PLCopen XML (*Project → Export PLCopenXML*) and add the export. DE/EN texts and a stage label are included.
- `.project` is parsed as PLCopen only when it looks like XML.
- Nightly: `plc-codesys-synthetic` and `plc-codesys-proemion` (uploaded archives) gain `plc_native_project` in their baselines. `plc-corrupt-archive` is unchanged.
- Docs: `guide/plc` and the table in `guide/scanning`.
## Tests
- Unit `native_codesys_projects_are_listed_and_exports_are_not` covers:
- a binary and a non-XML `.project`;
- a `.project` holding a PLCopen export with a BOM;
- a readable and a corrupt `.projectarchive`;
- `.git` skipped;
- a single uploaded file;
- `analyze_tree` yielding nothing and no error.
- CI only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A CODESYS project in its native format (the binary .project, also inside
an uploaded .projectarchive) yields no POUs, and the scan said nothing:
a target with only a native project read as clean control logic.
- plc::native_projects lists a .project that is not a PLCopen XML export
and a readable .projectarchive (a corrupt one keeps its own
ArchiveUnreadable note).
- The PLC scan records them as a skipped stage (plc_native_project,
SkipCode::NativePlcProject, DE/EN) with the way out: export the POUs
as PLCopen XML and add the export.
- A .project is parsed only when it looks like XML.
- The two CODESYS archive baselines of the nightly gain the stage; docs
in guide/plc and guide/scanning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang
merged commit b645769f67 into main2026-11-04 09:13:00 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #165, PR 1 of the plan: no silent gap. Tracker #167.
Why
The PLC scan reads Structured Text and PLCopen XML. A CODESYS project in its native format (the binary
.project, including the one inside an uploaded.projectarchive) yields 0 POUs, with no note on the run. A target that has only a native project therefore read as "no control-logic findings".What
plc::native_projects(tree)lists two kinds of file, as sorted,/-separated paths with.gitskipped:.projectthat is not an XML export (a BOM and leading white space are allowed before<);.projectarchivethat opens as a zip. A corrupt one already getsArchiveUnreadablefrom the SBOM stage and is not listed twice.run_plc_scanrecords them as a skipped stageplc_native_project(SkipCode::NativePlcProject, not informational). The reason says what to do: export the POUs as PLCopen XML (Project → Export PLCopenXML) and add the export. DE/EN texts and a stage label are included..projectis parsed as PLCopen only when it looks like XML.plc-codesys-syntheticandplc-codesys-proemion(uploaded archives) gainplc_native_projectin their baselines.plc-corrupt-archiveis unchanged.guide/plcand the table inguide/scanning.Tests
native_codesys_projects_are_listed_and_exports_are_notcovers:.project;.projectholding a PLCopen export with a BOM;.projectarchive;.gitskipped;analyze_treeyielding nothing and no error.🤖 Generated with Claude Code