SBOM

Automa
2026-08-21
1 hour ago
  • Automa - 2026-08-21

    Hi,
    How do you create your SBOM in Codesys. I have been searching for this topic but couldn't find any useful information. I am referring to making an export list or all libraries used in the project. I have developed a python script that exports them, but I am open for ideas of beast practice

     
    πŸ‘
    1
  • YIN

    YIN - 1 hour ago

    Good question, and one I have run into as well when a customer started asking for a list of everything inside a project before they would accept it.

    Short version: I have not found a built-in "export SBOM" button in the IDE, so your Python script is already on the right track. What I usually do is treat the Library Manager as the source of truth. It shows the name, version and company for every library actually referenced, including the ones pulled in through placeholders. Your script reading the .project file should give you the same list, which makes a good cross-check: if the script output and the Library Manager disagree, something probably got resolved to a different version than you expected.

    A couple of things that made the list more useful for me. First, pin the library versions with placeholders instead of letting them float to "newest", so the SBOM you generate today still matches the project next month. Second, record the CODESYS version and the device and target version alongside the libraries, since those change how the code behaves just as much as a library update does. And if you want the dependencies of the dependencies as well, the library files themselves carry their own references, so you can walk those too. That is where my first version missed a few entries.

    If you want to get away from parsing files by hand, the scripting interface can enumerate the libraries in a project for you, which I found a bit more robust when the project format changes between versions.

    Out of curiosity, what format are you aiming for, something like SPDX or CycloneDX, or just a plain list for internal use? That decides how much of the extra metadata is worth collecting.

     

Log in to post a comment.