Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-1789: Adding filename and removing unused fields #1798

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions deepfence_worker/tasks/reports/xlsx.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,14 @@ var (
}
malwareHeader = map[string]string{
"A1": "Rule Name",
"B1": "Severity",
"C1": "Meta",
"D1": "Meta Rules",
"E1": "File Severity Score",
"F1": "File Severity",
"G1": "Summary",
"H1": "Node Name",
"I1": "Container Name",
"J1": "Kubernetes Cluster Name",
"K1": "NodeType",
"B1": "Class",
"C1": "File Name",
"D1": "Summary",
"E1": "Severity",
"F1": "Node Name",
"G1": "NodeType",
"H1": "Container Name",
"I1": "Kubernetes Cluster Name",
}
complianceHeader = map[string]string{
"A1": "@timestamp",
Expand Down Expand Up @@ -251,16 +249,14 @@ func malwareXLSX(ctx context.Context, params utils.ReportParams) (string, error)
}
value := []interface{}{
m.RuleName,
m.SeverityScore,
"",
m.RuleID,
m.FileSevScore,
m.FileSeverity,
m.Class,
m.CompleteFilename,
m.Summary,
m.FileSeverity,
nodeScanData.ScanInfo.NodeName,
nodeScanData.ScanInfo.NodeType,
nodeScanData.ScanInfo.ContainerName,
nodeScanData.ScanInfo.KubernetesClusterName,
nodeScanData.ScanInfo.NodeType,
}
err = xlsx.SetSheetRow("Sheet1", cellName, &value)
if err != nil {
Expand Down
Loading