Skip to content
New issue

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

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

Already on GitHub? # to your account

Adding OWASP API 2023 Compliance #42

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions appknox/analyses.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ type Analysis struct {
Cwe []string `json:"cwe,omitempty"`
Gdpr []string `json:"gdpr,omitempty"`
Mstg []string `json:"mstg,omitempty"`
Owaspapi2023 []string `json:"owaspapi2023,omitempty"`
UpdatedOn *time.Time `json:"updated_on,omitempty"`
VulnerabilityID int `json:"vulnerability,omitempty"`
}
Expand Down
2 changes: 2 additions & 0 deletions appknox/analyses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestAnalysesCompliance_marshall(t *testing.T) {
Cwe: []string{"C_1"},
Gdpr: []string{"G_1", "G_2"},
Mstg: []string{"M_1"},
Owaspapi2023: []string{"API_2023_8"},
VulnerabilityID: 1,
}
want := `{
Expand All @@ -56,6 +57,7 @@ func TestAnalysesCompliance_marshall(t *testing.T) {
"cwe": ["C_1"],
"gdpr": ["G_1", "G_2"],
"mstg": ["M_1"],
"owaspapi2023": ["API_2023_8"],
"vulnerability": 1
}`
testJSONMarshal(t, u, want)
Expand Down
3 changes: 2 additions & 1 deletion helper/analyses.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ProcessAnalyses(fileID int) {
// header is an interface because t.AddHeader only supports
// interface elements
header := []interface{}{"ID", "RISK", "STATUS", "CVSS-VECTOR", "CVSS-BASE", "CVSS-VERSION", "OWASP", "ASVS", "CWE",
"MSTG"}
"MSTG", "OWASP API 2023"}
if profileReportPref.ShowPcidss.Value {
header = append(header, "PCI-DSS")
}
Expand All @@ -62,6 +62,7 @@ func ProcessAnalyses(fileID int) {
finalAnalyses[i].Asvs,
finalAnalyses[i].Cwe,
finalAnalyses[i].Mstg,
finalAnalyses[i].Owaspapi2023,
}
if profileReportPref.ShowPcidss.Value {
row = append(row, finalAnalyses[i].Pcidss)
Expand Down
Loading