MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / sanitizeString

Function sanitizeString

cmd/format/sarif.go:175–183  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

173}
174
175func sanitizeString(s string) string {
176 re := regexp.MustCompile("<[^>]*>")
177 s = re.ReplaceAllString(s, "")
178
179 s = strings.ReplaceAll(s, "\r", "")
180 s = strings.ReplaceAll(s, "\n", "")
181
182 return s
183}
184
185func formatTags(v *detail.VulnInfo) []string {
186 tags := []string{"security", "Use-Vulnerable-and-Outdated-Components", v.Cve, v.Cwe, v.AttackType, v.Language}

Callers 1

formatDescFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected