After analyzing customized Keyword scan (keywordscan.xml) setup, patterns (here, Angular) are not showing up in the dropdown as shown below.
Details
The below error was found in the log-
INFO perl: out: [KeywordScan] ERROR XML: file:/D:/CASTHLKeywordscan/KeywordScan.xml:0: Schemas validity error : Element 'filename': This element is not expected. Expected is one of ( content, regexContent ).
INFO perl: out: file:/D:/CASTHLKeywordscan/KeywordScan.xml:0: Schemas validity error : Element 'filename': This element is not expected. Expected is one of ( content, regexContent ).
INFO perl: out: file:/D:/CASTHLKeywordscan/KeywordScan.xml:0: Schemas validity error : Element 'filename': This element is not expected. Expected is one of ( content, regexContent ).
Workaround
The KeywordScan.xml provided by the user was not correct in certain areas.
- There should not be multiple filenames for a given search id. Please limit it to a single filename for a single search.
-
There are some <> characters in <content> that are interpreted as being a tag. These should be replaced with < and > respectively.
Please find the below.
Example for Incorrect Syntax
<search id="net2">
<filename>*.csproj</filename>
<filename>*.vbproj</filename>
<content><TargetFrameworkVersion>v2.0</TargetFrameworkVersion></content>
</search>
Example fixed<search id="net2">
<filename>*.csproj</filename>
<content><TargetFrameworkVersion>v2.0</TargetFrameworkVersion></content>
</search> - Re-launch the scan once the changes are made and validated.
- You will see the patterns appear in the dropdown.
Zendesk Ticket Number
# 27968
Related Articles
Getting Started Guide for Keyword Scan (PDF)
Comments