<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JIE SONG</title>
    <description>The latest articles on DEV Community by JIE SONG (@jie_song_30b94190e0815ed3).</description>
    <link>https://dev.to/jie_song_30b94190e0815ed3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4200765%2F2cf7a9da-a4cc-4012-bdbb-08a93f6643bf.png</url>
      <title>DEV Community: JIE SONG</title>
      <link>https://dev.to/jie_song_30b94190e0815ed3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jie_song_30b94190e0815ed3"/>
    <language>en</language>
    <item>
      <title>Source-present is not the same as shipped: reviewing an embedded C/C++ SBOM</title>
      <dc:creator>JIE SONG</dc:creator>
      <pubDate>Thu, 22 Oct 2026 15:31:20 +0000</pubDate>
      <link>https://dev.to/jie_song_30b94190e0815ed3/source-present-is-not-the-same-as-shipped-reviewing-an-embedded-cc-sbom-258d</link>
      <guid>https://dev.to/jie_song_30b94190e0815ed3/source-present-is-not-the-same-as-shipped-reviewing-an-embedded-cc-sbom-258d</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Draft for author review. The example below is based on the project's documented workflow; this preparation session did not execute a firmware build or reproduce its benchmark results.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An embedded C/C++ source tree tells you which files are available. It does not, by itself, establish what reached the shipped firmware. SDKs may include optional dependencies, vendor forks and code discarded during linking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep three kinds of evidence separate
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evidence&lt;/th&gt;
&lt;th&gt;What it helps establish&lt;/th&gt;
&lt;th&gt;What it does not establish alone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Source tree&lt;/td&gt;
&lt;td&gt;Candidate components and identification evidence&lt;/td&gt;
&lt;td&gt;Participation in a particular build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compilation database&lt;/td&gt;
&lt;td&gt;Translation units and compiler commands for that build&lt;/td&gt;
&lt;td&gt;Final retention in the linked image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linker map&lt;/td&gt;
&lt;td&gt;Link-time object and section information&lt;/td&gt;
&lt;td&gt;Complete upstream identity and version&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A compilation database and a linker map complement component identification. None should silently substitute for the others. Linker formats and incomplete build inputs can also introduce ambiguity.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete documented workflow
&lt;/h2&gt;

&lt;p&gt;Gangmu is an open-source tool I initiated to work on this problem. Its documented workflow combines component identification rules with build inputs and exports CycloneDX or SPDX SBOMs.&lt;/p&gt;

&lt;p&gt;For a project that already has the required build artifacts, the README gives this pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gangmu scan ./firmware &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--compile-db&lt;/span&gt; build/compile_commands.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--link-map&lt;/span&gt; build/firmware.map &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; cyclonedx &lt;span class="nt"&gt;-o&lt;/span&gt; sbom.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The paths are illustrative: replace them with your own project's inputs. Before relying on the output, inspect component identity, version evidence and whether the relevant code was linked. Source-only scanning remains useful, but a source inventory should not be presented as proof of the shipped contents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test identification separately from build inclusion
&lt;/h2&gt;

&lt;p&gt;The repository includes a controlled example based on GmSSL 3.0.0. It renames a directory, removes a version header, changes some symbols, inserts vendor functions and deletes some source files. The reproduction script is &lt;a href="https://github.com/GANGMU-SBOM/gangmu/blob/main/examples/disguise.sh" rel="noopener noreferrer"&gt;examples/disguise.sh&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This experiment asks whether identity and version evidence survive those particular modifications. A separate experiment is needed to test whether a compiled dependency that is discarded at link time is represented appropriately. Success on either example does not establish accuracy across other SDKs or toolchains.&lt;/p&gt;

&lt;p&gt;For a useful experiment report, record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tool and rule-pack versions.&lt;/li&gt;
&lt;li&gt;Upstream release and source provenance.&lt;/li&gt;
&lt;li&gt;Compiler, linker and relevant flags.&lt;/li&gt;
&lt;li&gt;Exact inputs and reproduction commands.&lt;/li&gt;
&lt;li&gt;Expected identity, version and build status.&lt;/li&gt;
&lt;li&gt;Observed output, mismatches and unresolved evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Treat gaps as review work
&lt;/h2&gt;

&lt;p&gt;Rule coverage and build evidence are finite. An unidentified directory, ambiguous object or uncertain version should remain visible to a reviewer. Generating a valid SBOM file is also distinct from establishing that its inventory is complete or that a product meets a regulatory requirement.&lt;/p&gt;

&lt;p&gt;The next editorial step for this draft is to add an experiment reproduced by the author, including actual output and a concrete explanation of any mismatch. No new benchmark or accuracy claim is made here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/GANGMU-SBOM/gangmu" rel="noopener noreferrer"&gt;Gangmu README&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/GANGMU-SBOM/gangmu/blob/main/docs/LIMITS.md" rel="noopener noreferrer"&gt;Documented limitations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disclosure: This draft was prepared with AI assistance from public project documentation. It has not yet received the author's final factual and editorial review.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>security</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
