Skip to content

Commit a0ad087

Browse files
committed
docs(faq): trim Q3 answer — drop "Two layers." opener and Semgrep-compat repeat
Two cleanups to the "What are AST-pattern rules?" answer: - Removed the meta-framing opener "Two layers." — the two-layer structure (rules + engine) reads clearly from the first two sentences without the heading. - Removed the duplicate Semgrep/ast-grep compatibility claim. The first sentence already establishes the rule format is shared with Semgrep and ast-grep; the closing clause "the rule format is the same one you'd write for Semgrep or ast-grep" repeats it. Final closing: "When a rule fires on safe code, you refine it directly." Dropped the obsolete "opens with the two-layer framing" vitest assertion that hard-coded the removed opener. The remaining five assertions still hold — AST-pattern rules, Whole-program taint analysis, AST-pattern matchers, ast-grep, and Semgrep all still appear in the text.
1 parent 281dada commit a0ad087

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/lib/__tests__/faq.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ describe("faq Q3 — AST-pattern rules answer", () => {
88
expect(q3).toBeDefined();
99
});
1010

11-
it("opens with the two-layer framing", () => {
12-
expect(q3?.answer).toMatch(/^Two layers\./);
13-
});
14-
1511
it("names AST-pattern rules as one layer", () => {
1612
expect(q3?.answer).toMatch(/AST-pattern rules/);
1713
});

src/lib/faq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const faqItems: readonly FaqItem[] = [
1515
},
1616
{
1717
question: "What are AST-pattern rules?",
18-
answer: "Two layers. AST-pattern rules describe the shape of vulnerable code — the same rule format Semgrep and ast-grep use, readable by humans and AI agents alike. Whole-program taint analysis is what reads them: the engine models data flow across the entire program — through function boundaries, fields, async code, and persistence layers — and follows each rule's metavariables as values moving through that flow. AST-pattern matchers stop at the syntactic match; OpenTaint keeps tracing the data through them. When a rule fires on safe code, you refine it directly — the rule format is the same one you'd write for Semgrep or ast-grep.",
18+
answer: "AST-pattern rules describe the shape of vulnerable code — the same rule format Semgrep and ast-grep use, readable by humans and AI agents alike. Whole-program taint analysis is what reads them: the engine models data flow across the entire program — through function boundaries, fields, async code, and persistence layers — and follows each rule's metavariables as values moving through that flow. AST-pattern matchers stop at the syntactic match; OpenTaint keeps tracing the data through them. When a rule fires on safe code, you refine it directly.",
1919
},
2020
{
2121
question: "Why not just use an LLM agent for security scanning?",

0 commit comments

Comments
 (0)