fix(plc): a committed CODESYS project types a repository PLC only on its own
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m10s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m10s
A code repository that also keeps a CODESYS project (a package.json, pom.xml or Cargo.toml beside it) stays a code target and keeps its code scans; its CODESYS components and runtime CVEs are collected by the code pipeline either way. The committed-files verdict drops below the backend manifests; a repository with nothing but the archive is still PLC. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
1 parent
c3f9e53806
commit
90bcb6e4f8
2 files changed
+14
-7
No files matched your search
@@ -471,11 +471,15 @@ impl HeuristicClassifier {
|
||||
facts_lang("iec-61131-3"),
|
||||
));
|
||||
}
|
||||
// A CODESYS project (or its archive) committed to the repository.
|
||||
// A CODESYS project (or its archive) committed to the repository:
|
||||
// PLC when nothing else is there. Below a backend manifest, so a
|
||||
// code repository that also keeps a PLC project stays a code
|
||||
// target (its CODESYS components are collected either way) and
|
||||
// keeps its code scans.
|
||||
if m.has_ext("projectarchive") || m.has_ext("project") {
|
||||
out.push(verdict(
|
||||
TargetType::PlcSps,
|
||||
0.85,
|
||||
0.5,
|
||||
"CODESYS project files",
|
||||
facts_lang("iec-61131-3"),
|
||||
));
|
||||
@@ -908,7 +912,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn a_committed_codesys_archive_is_plc_even_beside_a_backend_manifest() {
|
||||
async fn a_committed_codesys_archive_is_plc_unless_code_is_beside_it() {
|
||||
let only_archive = classify_tree(|root| {
|
||||
fs::write(root.join("Line.projectarchive"), b"PK").unwrap();
|
||||
})
|
||||
@@ -920,7 +924,7 @@ mod tests {
|
||||
fs::write(root.join("package.json"), "{}").unwrap();
|
||||
})
|
||||
.await;
|
||||
assert_eq!(top(&mixed), TargetType::PlcSps);
|
||||
assert_eq!(top(&mixed), TargetType::BackendService);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
+6
-3
@@ -134,9 +134,12 @@ my-plc-project/
|
||||
:::
|
||||
|
||||
A `.projectarchive` (or a CODESYS `.project`) in a repository or an uploaded
|
||||
archive marks it as a PLC project when Prüfwerk detects the type. A repository
|
||||
created through the managed git source therefore becomes **SPS / PLC** on its
|
||||
first scan, and later scans run the control-logic analysis. Whatever the
|
||||
archive marks it as a PLC project when Prüfwerk detects the type and the
|
||||
repository holds no application code with a build manifest. A repository
|
||||
created through the managed git source with only a CODESYS project therefore
|
||||
becomes **SPS / PLC** on its first scan, and later scans run the control-logic
|
||||
analysis; one that also holds, say, a `package.json` or `pom.xml` stays a code
|
||||
target. Whatever the
|
||||
target's type, the library + runtime SBOM and its CVEs come from every
|
||||
`.projectarchive` the code holds, so a target kept as **Backend / API** still
|
||||
lists its CODESYS components.
|
||||
|
||||
Reference in new issue
Block a user