Title
#general
c

cssmason

03/15/2022, 11:04 PM
Hi everyone Is there any person have idea how to add version to osquery extension either C++ or go SDK ? Thanks.
s

seph

03/16/2022, 1:39 PM
I’m not sure I understand your question. What do you mean by “add version”?
c

cssmason

03/25/2022, 11:46 AM
Like a captured picture. When launch the osquery extension, could it add the version number? And when I query the osquery_extensions table can show the version? Is there any method or variable could be used when I develop the extension?
11:46 AM
s

seph

03/25/2022, 2:27 PM
huh. that’s a good question. I have no idea if that’s exposed anywhere
2:27 PM
@Stefano Bonicatti @alessandrogario Do either of you know if extensions can register their version?
Stefano Bonicatti

Stefano Bonicatti

03/25/2022, 2:30 PM
2:40 PM
Although ok, you might also want to look into https://osquery.readthedocs.io/en/latest/development/osquery-sdk/#the-osquery-sdk Because you might be building through the extension group mechanism and the templated main
2:49 PM
I think the Go SDK is hiding that: https://github.com/osquery/osquery-go/blob/99b4efa62ec538b60418cae9af4d227c88b6901d/server.go#L144-L149 Afaik I understand it’s pre-registering a set of extensions with its own info and then when you do Start() it actually registers them to osquery? But it’s not passing a customized ExtensionInfo
2:50 PM
The python bindings are a bit more direct and expose the version (look at the extension example): https://github.com/osquery/osquery-python/blob/master/README.md