mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fix(fortify):add SSC project identifier to ouput and JSON report (#3787)
This commit is contained in:
parent
a5fcc7517b
commit
4c2845b79c
@ -312,6 +312,7 @@ func verifyFFProjectCompliance(config fortifyExecuteScanOptions, utils fortifyUt
|
||||
|
||||
log.Entry().Infof("Counted %v violations, details: %v", numberOfViolations, auditStatus)
|
||||
|
||||
influx.fortify_data.fields.projectID = project.ID
|
||||
influx.fortify_data.fields.projectName = *project.Name
|
||||
influx.fortify_data.fields.projectVersion = *projectVersion.Name
|
||||
influx.fortify_data.fields.projectVersionID = projectVersion.ID
|
||||
@ -352,6 +353,7 @@ func verifyFFProjectCompliance(config fortifyExecuteScanOptions, utils fortifyUt
|
||||
func prepareReportData(influx *fortifyExecuteScanInflux) fortify.FortifyReportData {
|
||||
input := influx.fortify_data.fields
|
||||
output := fortify.FortifyReportData{}
|
||||
output.ProjectID = input.projectID
|
||||
output.ProjectName = input.projectName
|
||||
output.ProjectVersion = input.projectVersion
|
||||
output.AuditAllAudited = input.auditAllAudited
|
||||
|
@ -91,6 +91,7 @@ type fortifyExecuteScanInflux struct {
|
||||
}
|
||||
fortify_data struct {
|
||||
fields struct {
|
||||
projectID int64
|
||||
projectName string
|
||||
projectVersion string
|
||||
projectVersionID int64
|
||||
@ -119,6 +120,7 @@ func (i *fortifyExecuteScanInflux) persist(path, resourceName string) {
|
||||
value interface{}
|
||||
}{
|
||||
{valType: config.InfluxField, measurement: "step_data", name: "fortify", value: i.step_data.fields.fortify},
|
||||
{valType: config.InfluxField, measurement: "fortify_data", name: "projectID", value: i.fortify_data.fields.projectID},
|
||||
{valType: config.InfluxField, measurement: "fortify_data", name: "projectName", value: i.fortify_data.fields.projectName},
|
||||
{valType: config.InfluxField, measurement: "fortify_data", name: "projectVersion", value: i.fortify_data.fields.projectVersion},
|
||||
{valType: config.InfluxField, measurement: "fortify_data", name: "projectVersionId", value: i.fortify_data.fields.projectVersionID},
|
||||
@ -979,7 +981,7 @@ func fortifyExecuteScanMetadata() config.StepData {
|
||||
Type: "influx",
|
||||
Parameters: []map[string]interface{}{
|
||||
{"name": "step_data", "fields": []map[string]string{{"name": "fortify"}}},
|
||||
{"name": "fortify_data", "fields": []map[string]string{{"name": "projectName"}, {"name": "projectVersion"}, {"name": "projectVersionId"}, {"name": "violations"}, {"name": "corporateTotal"}, {"name": "corporateAudited"}, {"name": "auditAllTotal"}, {"name": "auditAllAudited"}, {"name": "spotChecksTotal"}, {"name": "spotChecksAudited"}, {"name": "spotChecksGap"}, {"name": "suspicious"}, {"name": "exploitable"}, {"name": "suppressed"}}},
|
||||
{"name": "fortify_data", "fields": []map[string]string{{"name": "projectID"}, {"name": "projectName"}, {"name": "projectVersion"}, {"name": "projectVersionId"}, {"name": "violations"}, {"name": "corporateTotal"}, {"name": "corporateAudited"}, {"name": "auditAllTotal"}, {"name": "auditAllAudited"}, {"name": "spotChecksTotal"}, {"name": "spotChecksAudited"}, {"name": "spotChecksGap"}, {"name": "suspicious"}, {"name": "exploitable"}, {"name": "suppressed"}}},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
type FortifyReportData struct {
|
||||
ToolName string `json:"toolName"`
|
||||
ToolInstance string `json:"toolInstance"`
|
||||
ProjectID int64 `json:"projectID"`
|
||||
ProjectName string `json:"projectName"`
|
||||
ProjectVersion string `json:"projectVersion"`
|
||||
ProjectVersionID int64 `json:"projectVersionID"`
|
||||
|
@ -656,6 +656,8 @@ spec:
|
||||
type: bool
|
||||
- name: fortify_data
|
||||
fields:
|
||||
- name: projectID
|
||||
type: int64
|
||||
- name: projectName
|
||||
- name: projectVersion
|
||||
- name: projectVersionId
|
||||
|
Loading…
Reference in New Issue
Block a user