https://github.com/osquery/osquery logo
#general
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?
s

seph

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

Stefano Bonicatti

03/25/2022, 2:30 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
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
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
9 Views