feat(web-security-review): sync semantic LWS web-security review skill - #333
Closed
rwaldron wants to merge 2 commits into
Closed
feat(web-security-review): sync semantic LWS web-security review skill#333rwaldron wants to merge 2 commits into
rwaldron wants to merge 2 commits into
Conversation
Bumps [tsx](https://github.com/privatenumber/tsx) from 4.21.0 to 4.23.12. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.21.0...v4.23.12) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.23.12 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
|
Thanks for the contribution! It looks like @rwaldron is an internal user so signing the CLA is not required. However, we need to confirm this. |
rwaldron
force-pushed
the
rwaldron/sync-web-security-review-0.9.0
branch
from
August 14, 2026 19:21
8195047 to
09a2dbd
Compare
Generated from the lws-agent plugin at v0.9.0 (skill metadata.version = 0.9). Source of truth: agents/lws-agent-reviewer.md + reference/lws-grounding.md. @W-23864602
rwaldron
force-pushed
the
rwaldron/sync-web-security-review-0.9.0
branch
from
August 14, 2026 19:23
09a2dbd to
56b31dc
Compare
Author
|
I have no idea why there is a commit from 7 hours before mine is here. I'm rebased to the upstream main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References: Contributing guide · Skill authoring guide · Agent Skills spec
What changed
Adds a single new Agent Skill,
skills/web-security-review/, that performs semantic Lightning Web Security (LWS) review of JavaScript, TypeScript, and JSX/TSX source. The change is purely additive: no existing skills, scripts, or samples are modified.New files:
SKILL.md: the reviewer procedure plus YAML frontmatter (name: web-security-review,metadata.version: "0.9"), well under the 500-line body limit.references/lws-grounding.md: the complete LWS ruleset (the host-environment definitions and all 30 reviewer groundings, each a labeled security concern with BLOCKED / ALLOWED examples).references/bundle-profile.md: maps framework-specific sinks (for example, React's raw-HTML prop) onto the DOM sinks the groundings already describe, so the same rules apply to React/JSX bundle source.SYNCED-DO-NOT-EDIT.md: a provenance marker (see Notes).Why
Lightning Web Security is Salesforce's platform-level UI security layer: the client-side model that isolates and constrains component code. This skill brings that same Trust-grade scrutiny to code review. It delivers Salesforce Trust-level security scanning of client source, evaluated against the LWS security model and layered on top of the platform's own UI security guarantees. The library has no equivalent today.
dx-apexguru-scancovers Apex and server-side, and generic linters do not reason about client-side security, so this extends Salesforce Trust-level review to the client tier.Its value comes from semantic analysis. Rather than matching patterns, it reasons about what the code means: the provenance of each value (is it attacker-controlled or an author constant?), host objects versus built-ins versus component-local objects, and HTML or URLs assembled dynamically from variables, template literals, concatenation, or unicode escapes. That semantic understanding is what separates a genuine security risk from a benign construct, across concerns such as code-evaluation sinks (
eval, theFunctionconstructor), DOM and HTML injection, script-element creation, iframe and URL-scheme misuse, document write and open, and unsafe global mutation. It applies to any application code, not only LWC, and it recommends fixes without editing code.How this improves the library: it adds the first client-side, Trust-level security dimension to a catalog that today stops at Apex / server-side and generation-oriented skills, and because it follows the Agent Skills specification it is immediately usable from Agentforce Vibes, Claude Code, Codex, Cursor, and any other spec-compatible tool via
npx skills add forcedotcom/sf-skills.Notes
lws-agentClaude Code plugin (the LWS team's source of truth) by that repo'ssync-to-sf-skillsgenerator, andSYNCED-DO-NOT-EDIT.mdrecords this in-tree. Please do not hand-edit the copy here: edits are overwritten on the next sync. The intended change path is to edit the source plugin and re-run the sync. The ruleset inreferences/lws-grounding.mdis itself generated from the LWS team'slws-knowledgerepository.npm run validate:skillspasses locally (139 of 139 skills checked). The only warning is the benign, non-blocking gerund-form name warning, which the Agent Skills spec documents as a warning that does not block merge. The name is kept asweb-security-review(function-first) rather than a gerund form; happy to rename if maintainers prefer the gerund convention.web-security-review, or rename to a gerund form to clear the non-blocking ⚠? Happy to follow the maintainers' convention. (2) Maintenance model: future updates arrive here as automated re-syncs from the source plugin (regenerated by the same generator,metadata.versionbumped), not hand-edits, so expect periodic additive diffs to this one directory. (3) A dynamic LWS runtime verifier lives in the source plugin and is out of scope here; glad to contribute it as a separate runtime-verification skill if that's useful to the library.Skills
Manual checklist
Description quality
Instructions
Context efficiency
references/