Hello,
I made a new plugin, this is not an easy way, there is not so much documentation and I did'nt use perl and php from a long long time :)
but with exemple plugins and inspirited by some others, I think I'm close.
Agent get data, sent to server and I can see them in Miscellaneous tab: Great!
But, because there is always a but! I have 2 fields in database with an ARRAY value instead of string value, and no idea why.
here is what I have in agent log:
<CVESCAN>
<CVE_ID>CVE-2021-26937</CVE_ID>
<FIXED_VERSION>4.8.0-1ubuntu0.1</FIXED_VERSION>
<PACKAGE>screen</PACKAGE>
<PRIORITY>medium</PRIORITY>
<REPOSITORY>Ubuntu Archive</REPOSITORY>
</CVESCAN>
and what I have in DB:
HARDWARE_ID | CVE_ID | PRIORITY | PACKAGE | FIXED_VERSION | REPOSITORY |
---|
1 | CVE-2021-26937 | medium | ARRAY(0x55626ae70688) | 4.8.0-1ubuntu0.1 | ARRAY(0x55626ae706e8) |
and the map file:
$DATA_MAP{cvescan} = {
mask => 0,
multi => 1,
auto => 1,
delOnReplace => 1,
sortBy => 'ID',
writeDiff => 0,
cache => 0,
fields => {
CVE_ID => {},
PRIORITY => {},
PACKAGE => {},
FIXED_VERSION => {},
REPOSITORY => {},
}
};
if someone have an idea!
the aims of this plugin is getting cve info with the Canonical tool and send the result in ocs, of course when the plugin will be functional, I will share it.
thanks for your help
Eric