Skip to content

DX.Comply v2.1.0

Latest

Choose a tag to compare

@omonien omonien released this 13 Nov 06:35
1842ff3

Product page: DX.Comply on developer-experts.net (German)

Highlights

  • SPDX 3.0.1 output. BSI TR-03183-2 version 2.1.0 asks for CycloneDX 1.6 or later, or SPDX 3.0.1 or later. dxcomply.exe --format=spdx-json --spdx-version=3.0.1 now writes SPDX 3.0.1 JSON-LD with the Core, Software and SimpleLicensing profiles. The .dxcomply.json key is "spdxVersion": "3.0.1". SPDX 3.0.1 uses the same packages, IDs, licences and uses graph as SPDX 2.3, and it carries dependency completeness on its relationships, as CycloneDX does with compositions. SPDX 2.3 stays the SPDX default for existing toolchains. The structural check after writing recognises SPDX 3.0.1 (#108).
  • Overview sections in the reports. The HTML and Markdown reports now open with an origin summary (component counts per origin and per supplier), a licence overview grouped by declared licence with a review hint for copyleft licences that differ from the product licence, and a list of third-party units that no component manifest row matches. The CLI and the IDE log print the count of those units as one line (#112, #113, #114).
  • Warnings for incomplete third-party data, and --strict. Third-party components without supplier or licence are reported as CRA/BSI warnings. dxcomply.exe --strict (file key strict) writes the SBOM and then exits with code 3 when any CRA/BSI warning was raised, so a CI pipeline can fail on incomplete data (#110, #111).
  • Choose the report content. dxcomply.exe --report-content=overview|units|all selects what the HTML and Markdown reports contain: the overview sections, the list of all units with their SHA-256 hashes, or both. all is the default and keeps the previous reports. The .dxcomply.json key is report.content, and the IDE has a Report content setting. The SBOM always stays complete. This came from user feedback (#126).
  • ARM and LLVM linker maps. Android, iOS, Linux and macOS ARM builds link with LLD. Its map file is now read: object files become units, archive members become native components. Build outputs follow the platform naming (for example lib<Project>.so on Android), and the map hints name the right IDE setting for each platform (#99, #100, #101, #105).

Changes

  • CLI name. The command-line tool is dxcomply.exe everywhere: project file, help text, hints and documentation. Help and hints show the name of the executable that is actually running (#102, #106, #107).
  • CLI version. dxcomply.exe reads its version number from its own version resource instead of a constant in the code (#41).
  • Search path variables. A DCC_UnitSearchPath entry that starts with $(Name) is expanded, then the value is split on ;. A variable that holds several paths becomes several entries. A later property group that contains $(DCC_UnitSearchPath) extends the value from earlier groups, as MSBuild does. An entry that still contains $(Name) after expansion is left out, and that name is reported once (#83).
  • CLI Delphi version. dxcomply.exe --bds-version=23.0 (or 23) chooses the Delphi install. The file key is bdsVersion. The default is the BDS environment variable, then the newest installed Delphi. That version sets $(ProductVersion), the library paths, and the IDE environment variable overrides. The CLI prints the version it used and where it came from (#85).
  • --scan-tree. Deprecated. It scans the output directory recursively, as older versions did, and will be removed in the next release.
  • IDE focus. The DX.Comply options page is not indexed for IDE Insight. The README browser is created only when the info tab of a visible options frame is shown, so it does not take the focus from the IDE. Menu injection does not run during a compile. Clean all and Build all fire those events once per project (#66, #69).
  • Deep-Evidence failure detail. When the optional rebuild fails, the progress output names the project path, the expected MAP path, the working directory and the command line. dxcomply-deep-evidence.log is written next to the project, with paths and truncated build output, not MAP contents (#89, #91).
  • Progress dialog. A failed generation says to check the log in the dialog, below the step label. The dialog can be resized, and the log memo has a horizontal scrollbar (#86, #87, #92).
  • Versions in the report tables. The HTML and Markdown artefact tables have a Version column. The value is the version stored for that file, the same one CycloneDX writes (#90, #93).
  • Supplier from the .dproj. When no supplier is set, the CompanyName from the version info of the .dproj is used as the fallback (#88).
  • Version fallback. A file without a version of its own gets its last modification time in UTC as an RFC 3339 timestamp, marked with the versionSource property, as section 5.2.2 of the TR describes. That does not apply to the program the project builds when a product version is known. A third-party .dcp does not take the product version (#109).
  • Validator. The structural check requires CycloneDX 1.6. SPDX output names the licence list version it was written against (#115).
  • DLL lookup. DLLs and BPLs named by the project are also found in an Installer folder in the project tree, with a hash, instead of being recorded from a system directory without one (#98).
  • Group by source folder. dxcomply.exe --report-group-by-folder (file key report.groupByFolder) groups the third-party units without manifest by unit prefix and source folder, so libraries that share a prefix but live in different folders show as separate groups. The default stays grouping by prefix. This came from user feedback (#132).
  • Licence of the built program. The built program (the .exe, .dll or .bpl of the project) now carries the product licence in CycloneDX JSON and XML, as it already did in SPDX. The licence overview of the reports lists it under the product licence instead of under "No licence information" (#131).
  • Libraries below the Delphi folder. Only product source trees (source\rtl, source\vcl, source\fmx, source\data, and the other source trees shipped in that folder) and product lib folders (lib\<platform>\release, lib\<platform>\debug, and the DCUs Delphi places in lib) count as Embarcadero RTL, VCL or FMX. A library in another folder under the install, such as Extras, a GetIt CatalogRepository under the install or under Documents, or a folder you added, is third party. A component manifest row (units_exact, units_folder, or units_prefix) wins over that location, and the unit is reported as that component. With no matching row it is named on the Unknown supplier row. A unit matched by own_code_units, own_code_prefixes, or own_code_folders is the project's own code and stays off that row (#134, #179).
  • Shared libraries outside the project. A project search path inside the Delphi folder no longer makes its units "Local project". A DCU in the project's DCU output folder takes the origin of its .pas when that source is found in the search path, so a third-party unit compiled into the project stays "Third party" (#133).
  • Longest manifest prefix wins. When several units_prefix entries match a unit, the longest one wins, whatever the order of the rows. Neslib.Xml now gets its units even when a row with Neslib comes first. units_exact and own_code_units keep their priority (#129).
  • units_exclude in the component manifest. A row can list units that its prefixes do not match, so a short prefix such as Ab can be used without taking units of other libraries. The warning for a prefix shorter than 3 characters now says that the prefix is still applied. This came from user feedback (#140).
  • Folders in the component manifest. own_code_folders names folders of your own units. units_folder on a row names the folder of a third-party package, including subfolders, so a large code base does not have to list every unit. A relative path is resolved from the components file. The longest matching folder wins. units_exact and own_code_units keep their priority, and units_exclude also applies to a folder. A missing folder is a warning and the rule is still applied. A unit known only by name is not matched by a folder. This came from user feedback (#162).
  • copyright in the component manifest. A row can carry an optional copyright string, a year such as "2020" or other copyright text. It is not a timestamp. Rows that omit it stay valid. DX.Comply stores the value and does not use it for matching (#151).
  • Copyright in the SBOM. When a component manifest row sets copyright, that text is written on the library component the row describes. CycloneDX JSON and XML use copyright, after licenses and before purl. SPDX 2.3 writes it as the package copyrightText. SPDX 3.0.1 writes software_copyrightText on the software_Package. That is the Software profile property copyrightText on SoftwareArtifact, which a package inherits, and it is optional. A row that omits copyright, or sets only spaces, leaves the files as they are: CycloneDX has no copyright field, SPDX 2.3 keeps copyrightText as NOASSERTION, and SPDX 3.0.1 omits software_copyrightText (#164).
  • Licence summary, one row per component. The HTML and Markdown licence tables list each component on its own row, sorted by name without regard to case. Version is its own column. Copyright is its own column and shows the optional component manifest copyright text, or an empty cell when the row does not set it. The declared licence, the component count and the review note are shown once for each licence group. The copyright column shows the same text the SBOM writes for that component (#156).
  • Shared output directory. outputDir in .dxcomply.json, and SBOM and report directory in the IDE options, send bom.json and the HTML and Markdown reports to one folder. The folder is created if needed. --output=<file> still names the SBOM file and wins over outputDir. --include-platform-in-output still decorates the file name inside that folder. report.output remains an optional report-only override (#146).
  • SBOM header data in the reports. The HTML and Markdown reports show the SBOM creator, supplier, supplier URL, licence and product version (#104).
  • Generation time. The README and the BSI field table now state that an archived SBOM records when it was generated inside the file (CycloneDX metadata.timestamp, SPDX creationInfo.created, SPDX 3.0.1 created on CreationInfo, and the report row Generated At), and that --output is how to choose the archive file name (#147).
  • Documentation. The README and docs/BSI-TR-03183-2.md now state that the CRA asks for a commonly used, machine-readable format, and that the format versions come from the TR. The retention period follows CRA Article 13(13): 10 years after the product is placed on the market, or the support period if that is longer. A new FAQ entry explains which SBOM format to pick (#116). A docs pass for 2.1 adds the ARM map setting, the version fallback and the report content option to the README, and completes the unit table in docs/Architecture.md. The CI guide uses retention-days: 3653, which is 10 years including leap days, and says that GitHub caps artifact retention at the repository limit, so the SBOM also belongs on the release or in an archive (#130). The README explains how to add supplier and licence for libraries that ship no metadata, with a matching FAQ entry (#135). FAQ entries cover library mode, old precompiled DLLs, and the CRA archive (#94).
  • Component manifest docs. The components file is documented as DX.Comply's own optional input. The notes no longer name a third-party Delphi tool.

Fixes

  • Embarcadero units in the licence overview. RTL, VCL and FMX units, and any other unit whose origin is an Embarcadero label, are listed under that label instead of under "No licence information". CycloneDX writes the label as license.name. SPDX 2.3 and SPDX 3.0.1 write LicenseRef-Embarcadero-RTL (and the matching VCL and FMX tokens) with the label as the extracted licence text (#165).
  • Own-code units and the product licence. Units matched by own_code_units, own_code_prefixes or own_code_folders inherit product.licence in the HTML and Markdown reports and in CycloneDX, SPDX 2.3 and SPDX 3.0.1. With no product licence they stay without one (#166).
  • Report title. The HTML page title and heading, and the Markdown heading, start with the project name, or with the product name when the project name is empty, so several open reports can be told apart (#167).
  • Expected MAP path in the IDE dialog. Choosing another build configuration, for example Release, updates the Expected MAP file path. The path is the one SBOM generation uses for that configuration and platform, including a custom output directory and $(Platform) / $(Config). The missing-MAP hint follows the same path (#153).
  • Project executable in the licence overview. The project's own output binary is treated as the product, including when it was not stored as an application, library, or package. The HTML and Markdown licence overview lists it under the product licence, and CycloneDX and SPDX write that licence on the component. A neighboring binary such as bit.dll stays without a licence. The component is kept in the SBOM. The CLI and the IDE use the same classification (#155).
  • Manifest count in the log. The CLI and the IDE log the third-party units without a manifest row only when at least one unit is missing. A line such as 0 of 4 third-party units have no component manifest row is no longer written. The HTML and Markdown section Third-party units without manifest stays omitted in that case, which matches the reports today (#157).
  • Shared units_prefix. Two component rows that use the same units_prefix assign those units to the first row in the file. The log names both rows and the prefix. A prefix matches the start of the unit name, and a trailing dot is not required, so FMX.TMSFNC matches FMX.TMSFNCButton. Matching uses the MAP unit name, including when the file on disk is only the part after the last dot, so the report lists the library even when those units are classified as local project code. A row that still matches no unit is still reported as matched no units. Invalid JSON names the file, the line and the position (#172).

Found in the review before the release:

  • DLL lookup and the target platform. When the project tree holds one copy of a DLL or BPL per platform, for example lib\Win32\x.dll and lib\Win64\x.dll, the copy whose PE header names the target platform is taken. Before, folder depth and name decided, so a Win64 SBOM could carry the hash and version of the Win32 file. A single copy for another platform is still recorded.
  • Maps that are not UTF-8. A Windows map without unit sections that holds a byte outside UTF-8 no longer raises an encoding error. The LLD header is looked for first, so a large ARM map is streamed once and not loaded a second time. A project in a folder named NDK keeps its units.
  • units_exclude with a Delphi scope. "units_exclude": ["Vcl.Skia"] now keeps Vcl.Skia out of a row with the prefix Skia. Before, only the name without the scope worked.
  • CompanyName with &. A company name such as Smith & Sons Ltd is stored as &amp; in the .dproj. It was cut at the ; of the entity and written as Smith &amp. Entities are now decoded. A name with two ampersands, such as ebm-papst Mulfingen GmbH & Co. KGaA & Co. KG, is decoded in full. The same text in product.supplier in .dxcomply.json is kept as written.
  • --strict with --no-composition-evidence. Third-party units without supplier or licence are reported in this mode too, so the exit code is 3 instead of 0.
  • No byte order mark in JSON. CycloneDX JSON, SPDX 2.3 JSON and SPDX 3.0.1 JSON-LD are written as UTF-8 without a byte order mark, as RFC 8259 asks. Strict parsers, for example Python json, rejected the files before.
  • Build output in the console code page. Output of the Deep-Evidence build is decoded once at the end. Umlauts in the OEM code page no longer end the build step with an encoding error.
  • Platform groups in the .dproj. A scan for Android no longer also reads the Cfg_N_Android64 groups, and Win64 no longer reads Win64x.
  • Smaller points. An unsupported spdxVersion in .dxcomply.json gives a warning instead of silently writing SPDX 2.3. The reports make the supplier URL a link only when it starts with http:// or https://. Warning groups for third-party units ignore case.
  • Config file lookup. dxcomply.exe checks a relative .dxcomply.json, and a relative --config path, in the current directory first and then in the folder of --project. An absolute path is used as given. The folder of the executable is not searched. When --ci is set and no file is found, the paths that were checked are printed and the run continues. That message is not a CRA/BSI warning, so --strict still uses exit code 3 only when a CRA/BSI warning was raised. A batch file can start with cd /d %~dp0 so its working directory is the folder that contains the batch file (#168).
  • Help legend. The help text states that square brackets mark an optional value, so --report equals --report=both and --library equals --library=true. The --config line describes the lookup order.
  • Android 32-bit output folder. A 32-bit Android build uses the platform Android. The binary and the map are Android\<Config>\lib<Project>.so and lib<Project>.so.map. Android32 is accepted and mapped to that folder. Android64 stays Android64. $(Platform) and $(Config) in DCC_ExeOutput, DCC_BplOutput, DCC_DcpOutput, and DCC_DcuOutput are expanded. When those settings are absent and the Delphi platform folder is on disk, that folder is used. Otherwise the project directory is used. A Deep-Evidence build passes -Platform Android for a 32-bit Android target (#169, #170).
  • Android product version. Android versionName in VerInfo_Keys is the product version when FileVersion is missing. The value is read from Base_Android and Cfg_N_Android (and the Android64 groups for that platform). 16.0.0.7 keeps every digit. VerInfo_MajorVer, MinorVer, Release, and Build in the same groups are used when neither key is set. A Windows project still uses FileVersion (#171).
  • Licence references. A licence that already starts with LicenseRef- keeps that prefix in SPDX 2.3 and SPDX 3.0.1. Only the characters after the prefix are sanitized, so LicenseRef-Proprietary is not written as LicenseRef-LicenseRef-Proprietary. English words inside a name, such as the with in LicenseRef-Freeware with source or the and in Free and open, do not make it an expression. The name stays a name and is sanitized. It is an expression only when each operand is a known SPDX id or a LicenseRef id. A LicenseRef- value does not raise the unrecognised-identifier warning. CycloneDX 1.6 writes it as license.name, because license.id is the SPDX licence list.
  • Unknown supplier. A third-party unit that matches own_code_units, own_code_prefixes, or own_code_folders is the project's own code. It is not counted as an unknown supplier, and it stays out of the third-party units without a manifest and out of the console warning. Units that remain unknown are named on the Unknown supplier row in the HTML and Markdown reports, grouped by prefix, with the same limits as the console warning (#176).
  • Product deliverable with no version. The built program uses the product version from the SBOM header when the file has no version of its own. An Android lib<Project>.so with no version resource is that case. A file-date stand-in is not treated as a version of that file when a product version is known. A version already stored on the file is kept. A third-party DLL or other file does not inherit the product version. CycloneDX JSON and XML, SPDX 2.3, SPDX 3.0.1, and the HTML and Markdown reports use the same value.

Test coverage

782 DUnitX tests pass on Win32 and Win64 (up from 774, and from 519 in v2.0.3).

Downloads

File Description
DX.Comply.D13.Setup.exe Installer for Delphi 13
DX.Comply-2.1.0-win32.zip Manual install: BPLs, DCPs, CLI tool, README

ZIP contents

  • bin/dxcomply.exe
  • bpl/DX.Comply.Engine370.bpl, bpl/DX.Comply.IDE370.bpl
  • dcp/DX.Comply.Engine.dcp, dcp/DX.Comply.IDE.dcp
  • README.md