GitBOM Representations of Build Tools and Build Tool configuration in tree #56
Replies: 5 comments
-
I think it's worse than that - it loses how many times a build tool was invoked at all. Since it only records the inputs, all tool invocations with the same inputs will look identical:
will all have the same GitBOM document, with only the derived artifact reference distinguishing them. You could disambiguate this by (effectively) including the build tool as an input - either explicitly (ie hash the compiler binaries and include that OID as an input), or abstracted via some kind of tool identifier. And while it's nice to know what the tool was, I think it's much more important to know what the outputs are. So I'd propose extending the GitBOM document to not only reference the inputs, but also explicitly enumerate all the outputs. And correspondingly change the definitions of inputs to reference a specific output of a specific bomdoc (which could be done with the existing reference, with the constraint that the listed derived artifact oid has to be a listed output of the referenced GitBOM document).
I'm not sure what this means. Do you mean it will affect the OID of the GitBOM document? If the BTID contains an OID or a GitBOM manifest, and it is hashed into the referencing OID, then doesn't that effectively mean you are grafting the artifact tree in? And if it doesn't get hashed into the GitBOM OID, then what effect will it have? |
Beta Was this translation helpful? Give feedback.
-
I'm all for tools emitting as much information as possible when doing their "thing". I think it'd be useful to: 1 - Choose a standard file format for this data (e.g. YAML or JSON) |
Beta Was this translation helpful? Give feedback.
-
Bumping this, what I think we are missing is a temporal ordering of the tools called. However, I don't think OmniBOR should be the thing that necessarily solves this. We could integrate something like in-toto to solve this issue. In-toto with OmniBOR support can give us input => output, order of what was called, and help link this metadata. |
Beta Was this translation helpful? Give feedback.
-
I'm curious what that's useful for? For a concurrent build system it may not be possible to put everything into a total order, only a partial order where write output -> consume input is a "happens before". |
Beta Was this translation helpful? Give feedback.
-
One thought I keep coming back to in these discussions of encoding additional data in an OmniBOR manifest is: can't we instead lean on other attestation formats which can refer to OmniBOR Artifact Identifiers? If you want to know the build process, including configuration of the build tool, which produced some artifact, you could in theory produce a SLSA attestation which refers to the relevant OmniBOR data. Isolating things in this way would help keep OmniBOR focused on solving the identity problem of software artifacts. |
Beta Was this translation helpful? Give feedback.
-
Problem
Currently, GitBOM artifact trees have been represented solely in terms of the input artifact to a build tool at each level
Where each .o file is produce by a build tool step like:
and the executable is produced by a build tool step like:
It has been repeatedly pointed out that this loses two pieces of information that are important for many use cases:
This information is minimally important for:
Unfortunately, the most naive solution, capturing the build tool command line, fails on a number of important counts:
Proposal for Build Tool Information Document
Encourage build tools to create a very simple build tool information document (BTID) of a form:
Where 'Name' is however the build tool canonically choses to refer to itself. It may (and probably should) include its version.
The BTID could be written out to the .bom/metadata/ subdirectory in a distinguished location.
The BTID could be treated as a sibling of the other inputs:
Resulting in a tree like:
Note: This does not graft the build tool's artifact tree into the artifact tree of the output artifact (which would be improper) but merely adds the use of the build tool into the artifact tree.
Proposal for Build Tool Configuration Information
Build tool configuration will vary from build tool to build tool. Further, that build tool configuration which is non-ephemeral will be a subset (usually a proper subset) of that information. Each build tool will have to provide for itself a choice of configuration format and make its own decisions about what matters or doesn't matter.
For example, a C compiler almost certainly does not want to have 'include directories' in its build tool configuration document, but almost certainly does want to include any preprocessor flags provided to the build tool by the command line.
This proposal is to provide guidance to build tools about how to construct build tool configuration documents (BTCDs) and direction that build tools should:
Beta Was this translation helpful? Give feedback.
All reactions