fleet/ee/vulnerability-dashboard/api/models/VulnerabilityInstall.js
Eric b1945b2128
Add fleet-vulnerability-dashboard repo to ee/ folder (#17428)
Closes: https://github.com/fleetdm/confidential/issues/4057

Changes:
- Added the contents of the fleet-vulnerability-dashboard repo to
ee/vulnerability-dashboard
- Added a github workflow to deploy the vulnerability dashboard on
Heroku
- Added a github workflow to test changes to the vulnerability-dashboard
- Updated the website's custom configuration to enable
auto-approvals/review requests to files in the
ee/vulnerability-dashboard folder
2024-03-13 13:06:11 -05:00

75 lines
2.3 KiB
JavaScript

/**
* VulnerabilityInstall.js
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
installedAt: {
example: 1670152500000,
description: 'JS timestamp representing when this installation began on the host.',
type: 'number',
isInteger: true,
required: true,
},
uninstalledAt: {
example: 1670152500000,
description: 'JS timestamp representing when this installation ended on the host (i.e. the vuln was patched).',
extendedDescription: 'If not resolved, then this is `0`. (Which is ok, since 1970 is too long ago to be a relevant value.)',
type: 'number',
isInteger: true,
defaultsTo: 0,
},
versionName: {
type: 'string',
description: 'The version of the vulnerable softare that was installed.',
},
softwareName: {
type: 'string',
description: 'The name of the vulnerable software that was installed.',
},
fleetApid: {
type: 'number',
description: 'The Fleet API ID of the vulnerable software that was installed.',
required: true,
},
resolvedInVersion: {
type: 'string',
description: 'The name of the version of this software that is no longer vulnerable.',
extendedDescription: 'This is the resolved_in_version value from the Fleet API.'
},
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
vulnerability: {
model: 'Vulnerability',
required: true
},
host: {
model: 'Host',
required: true,
},
},
};