mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
009a87d33e
Adds the software installed path property to the proper end-points and third party integrations (webhook, Zendesk and Jira).
35 lines
645 B
Go
35 lines
645 B
Go
package webhooks
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
fleetwebhooks "github.com/fleetdm/fleet/v4/server/webhooks"
|
|
)
|
|
|
|
type Mapper struct {
|
|
fleetwebhooks.Mapper
|
|
}
|
|
|
|
func NewMapper() fleetwebhooks.VulnMapper {
|
|
return &Mapper{}
|
|
}
|
|
|
|
func (m *Mapper) GetPayload(
|
|
hostBaseURL *url.URL,
|
|
hosts []fleet.HostVulnerabilitySummary,
|
|
cve string,
|
|
meta fleet.CVEMeta,
|
|
) fleetwebhooks.WebhookPayload {
|
|
r := m.Mapper.GetPayload(hostBaseURL,
|
|
hosts,
|
|
cve,
|
|
meta,
|
|
)
|
|
r.EPSSProbability = meta.EPSSProbability
|
|
r.CVSSScore = meta.CVSSScore
|
|
r.CISAKnownExploit = meta.CISAKnownExploit
|
|
r.CVEPublished = meta.Published
|
|
return r
|
|
}
|