self-serve-security-review

Reviews LFX One pull request diffs for authorization, session, and data-exposure vulnerabilities.

12|6|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill self-serve-security-review-linuxfoundation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: self-serve-security-review
Source: https://github.com/linuxfoundation/lfx-self-serve/tree/main/.github/skills/self-serve-security-review
Command: npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill self-serve-security-review-linuxfoundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security review of pull requests in the LFX One application is easy to get wrong: reviewers either miss real authorization bypasses and token leaks or flood authors with speculative low-confidence findings. This Skill applies a diff-aware, high-confidence methodology tuned to the application's actual threat model so reviews catch real vulnerabilities without false-positive noise. ## Core Features & Use Cases - Diff-aware three-pass review: Context, comparative, and assessment passes trace attacker-controlled input to sensitive sinks, reporting only findings with confidence 8 or higher. - Durable threat anchors: Covers route classification in auth.middleware.ts, user-token vs M2M-token misuse, impersonation and effective-identity helpers, persona-based authorization, SSRF and redirect guards, XSS via DomSanitizer bypasses, PII logging, and secrets crossing the SSR boundary. - Per-fact data-exposure pass: Inventories every new or changed payload field, identifies its enforcement gate, and compares sibling read/write paths for parity gaps. - Use Case: A PR adds a new /public/api endpoint returning meeting data. The Skill checks the route's auth class, verifies private records are filtered before pagination, and confirms no user token or PII leaks to anonymous callers. ## Quick Start Review the security impact of the current pull request diff against the LFX One threat anchors and report only high-confidence findings.

Frequently Asked Questions about self-serve-security-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a security review on a pull request diff?▼

Run a diff-aware review that only assesses risk the PR introduces or weakens. Trace each attacker-controlled input such as request params, body, headers, and returnTo URLs to its sensitive sink, and report only findings where a concrete exploit path exists with confidence 8 or higher.

What security issues should I check in an Express auth middleware?▼

Check the route classification mapping of public, optional, and required routes for fail-open pattern ordering, routes moved to a weaker class, and new unauthenticated routes outside the documented public surface. Also verify M2M tokens are not used where a user bearer token is required.

When is using an M2M token instead of a user token acceptable?▼

M2M tokens are legitimate on public-surface routes with no user session or as scoped sub-calls from authenticated routes where the user token is preserved and restored. Using M2M to skip per-user authorization or for normal /api work is a finding.

Does Angular's sanitizer protect innerHTML from XSS?▼

Angular's default sanitizer strips script tags from [innerHTML] bindings, so plain usage is safe. The real risk is DomSanitizer.bypassSecurityTrustHtml or bypassSecurityTrustResourceUrl applied to user- or project-supplied content, which the review flags.

What findings should a security review not report?▼

Do not report denial of service, missing rate limiting, outdated dependencies, theoretical race conditions, test-only files, or hardening suggestions without a concrete vulnerability. A committed secret is always a finding, even in test fixtures.