Skip to content

Commit

Permalink
Adding OWASP API 2023 Compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
poseidontor authored and cosmosgenius committed Jan 8, 2024
1 parent 08799ee commit c413a37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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

0 comments on commit c413a37

Please # to comment.