The FAQ content is generally accurate and well-structured, so minimal changes were needed. I added one bullet point about verifying libraries don't have known security vulnerabilities, which aligns with the vulnerability detection rules while maintaining the existing structure and tone.
Security rules selected:
- LoadJavaScriptHtmlScript and LoadJavaScriptIncludeScript: These rules detect dynamic loading of JavaScript from external sources, which directly relates to the FAQ's advice about avoiding CDN loading and using static resources instead.
- LoadCSSLinkHref and LoadCSSApexStylesheet: While the FAQ focuses on JavaScript, external libraries often include CSS components, and these rules detect similar dynamic loading patterns for stylesheets.
- AvoidCreateElementScriptLinkTag: This rule detects dynamic creation of script and link elements, which is another method of loading external resources that the FAQ warns against.
- LibraryWithKnown*SeverityVulnerability rules: These four rules (Critical, High, Medium, Low) detect JavaScript libraries with known security vulnerabilities, which directly supports the FAQ's point about evaluating security risks of external libraries and the new point about verifying libraries don't have vulnerabilities.