Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

experience-lwc-security-validate

Skill by forcedotcom

Reviews a Lightning Web Component bundle for Lightning Web Security (LWS) compliance. It returns severity-ranked fixes or a SARIF 2.1.0 score report for LWC developers.

  • Score 83
  • 1.2k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install experience-lwc-security-validate

Built from the published package, never by AI.

git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.claude/skills && cp -r /tmp/sf-skills/skills/experience-lwc-security-validate ~/.claude/skills/experience-lwc-security-validate

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install experience-lwc-security-validate in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill runs a Lightning Web Security (LWS) and Product Security compliance pass over a Lightning Web Component bundle. It works in two modes. Review mode returns severity-ranked findings and applies code fixes. Score mode emits a SARIF 2.1.0 JSON report keyed by the lws-001 to lws-023b rule catalog and does not modify code.

The skill checks the JavaScript or TypeScript, HTML templates, CSS and js-meta.xml files. It looks for blocked DOM APIs such as eval, innerHTML and document.write, and for unsafe URL schemes. It is meant for developers preparing LWCs for release or feeding CI gates. It does not cover building new components, accessibility, RTL review, or Apex and Aura server-side code.

Written from the project's SKILL.md and checked against it.

What it can do

  • LWS catalog walkRuns every rule from lws-001 through lws-023b against the component bundle.
  • Severity-ranked reviewLists findings from Critical to Low with code-level remediations in review mode.
  • SARIF score reportEmits a SARIF 2.1.0 JSON report with one result per match, returned inline.
  • Template inspectionChecks lwc:inner-html usage, sensitive attributes and iframes without sandboxing.
  • Meta and config inspectionChecks js-meta.xml for broad API access and sensitive exposed properties.
  • Apply fixesEdits component files to apply accepted findings while keeping feature-flag gates.
  • SARIF validationRuns a validation script to confirm the SARIF output matches the catalog before returning it.

What you need

  • jq 1.6 or later
  • python3 3.8 or later

Try asking

  • Run an LWS security review on my accountCard LWC and suggest fixes.
  • Score the security compliance of this component and return a SARIF 2.1.0 report.
  • Find any innerHTML, eval or document.write uses in this LWC bundle.

Good to know

  • Score mode is read-only and returns the SARIF inline without writing a file.
  • Does not cover accessibility, RTL or i18n review.
  • Does not cover Apex, Aura or other server-side code.
  • New feature-flag gates for phased rollout are out of scope and must be applied separately.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/experience-lwc-security-validate/SKILL.md, skills/experience-lwc-security-validate/scripts/check-lwc-import.sh, skills/experience-lwc-security-validate/scripts/validate-sarif.sh. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB
  • examples/review-report.md174 B
  • examples/score-report.sarif.json1 KB
  • references/lws-security-expert.md56 KB
  • references/security-analysis.md20 KB
Show all 7 files
  • scripts/check-lwc-import.sh5 KB
  • scripts/validate-sarif.sh4 KB

Alternatives to experience-lwc-security-validate

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

experience-lwc-security-validate: common questions

What is Lightning Web Security?

The source describes LWS as the security model this skill checks Lightning Web Components against. The skill uses a reference catalog of blocked APIs and their allowed alternatives.

What is the difference between review mode and score mode?

Review mode lists findings and applies code fixes. Score mode emits a SARIF 2.1.0 JSON report keyed by the rule catalog and does not change any code.

When should I not use this skill?

The source says not to use it for building new LWCs, for WCAG 2.2 accessibility, for RTL or i18n review, or for Apex, Aura and server-side security.

How do I install experience-lwc-security-validate?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is experience-lwc-security-validate free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is experience-lwc-security-validate safe to use?

It scores 83 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to experience-lwc-security-validate?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

experience-lwc-security-validate Install

Add to stack

Loading.