Producers
A producer is a program that parses the output of a tool and converts it into Dracon compatible output that can be used by enrichers and consumers.
Producers can be written in any language that supports protobufs. We currently have examples in Golang and Python. They are all structured in the same way:
- Parse program arguments:
in
: the raw tool results file location.out
: where to place the Dracon compatible output file location.
- Parse the
in
file into Protobufs (LaunchToolResponse
). - Add metadata to Protobufs (e.g. git/source-code information).
- Write the protobuf bytes to the
out
file. - Create a Tekton Task
task.yaml
with.metadata.labels["v1.dracon.ocurity.com/component"] = producer
.
Producer API
For convenience, there are helper functions in the ./producers
pkg/module for
Golang/Python.
See the godoc for more information.