[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-semgrep-rule-creator":3,"mdc--rd47ru-key":38,"related-org-trail-of-bits-semgrep-rule-creator":1251,"related-repo-trail-of-bits-semgrep-rule-creator":1406},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":33,"sourceUrl":36,"mdContent":37},"semgrep-rule-creator","create custom Semgrep security rules","Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20,23],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"Static Analysis","static-analysis",{"name":21,"slug":22,"type":16},"Semgrep","semgrep",{"name":24,"slug":25,"type":16},"Code Analysis","code-analysis",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-07-18T05:47:51.675777",null,541,[32],"agent-skills",{"repoUrl":27,"stars":26,"forks":30,"topics":34,"description":35},[32],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fsemgrep-rule-creator\u002Fskills\u002Fsemgrep-rule-creator","---\nname: semgrep-rule-creator\ndescription: Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.\nallowed-tools: Bash Read Write Edit Glob Grep WebFetch\n---\n\n# Semgrep Rule Creator\n\nCreate production-quality Semgrep rules with proper testing and validation.\n\n## When to Use\n\n**Ideal scenarios:**\n- Writing Semgrep rules for specific bug patterns\n- Writing rules to detect security vulnerabilities in your codebase\n- Writing taint mode rules for data flow vulnerabilities\n- Writing rules to enforce coding standards\n\n## When NOT to Use\n\nDo NOT use this skill for:\n- Running existing Semgrep rulesets\n- General static analysis without custom rules (use `static-analysis` skill)\n\n## Rationalizations to Reject\n\nWhen writing Semgrep rules, reject these common shortcuts:\n\n- **\"The pattern looks complete\"** → Still run `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>` to verify. Untested rules have hidden false positives\u002Fnegatives.\n- **\"It matches the vulnerable case\"** → Matching vulnerabilities is half the job. Verify safe cases don't match (false positives break trust).\n- **\"Taint mode is overkill for this\"** → If data flows from user input to a dangerous sink, taint mode gives better precision than pattern matching.\n- **\"One test is enough\"** → Include edge cases: different coding styles, sanitized inputs, safe alternatives, and boundary conditions.\n- **\"I'll optimize the patterns first\"** → Write correct patterns first, optimize after all tests pass. Premature optimization causes regressions.\n- **\"The AST dump is too complex\"** → The AST reveals exactly how Semgrep sees code. Skipping it leads to patterns that miss syntactic variations.\n\n## Anti-Patterns\n\n**Too broad** - matches everything, useless for detection:\n```yaml\n# BAD: Matches any function call\npattern: $FUNC(...)\n\n# GOOD: Specific dangerous function\npattern: eval(...)\n```\n\n**Missing safe cases in tests** - leads to undetected false positives:\n```python\n# BAD: Only tests vulnerable case\n# ruleid: my-rule\ndangerous(user_input)\n\n# GOOD: Include safe cases to verify no false positives\n# ruleid: my-rule\ndangerous(user_input)\n\n# ok: my-rule\ndangerous(sanitize(user_input))\n\n# ok: my-rule\ndangerous(\"hardcoded_safe_value\")\n```\n\n**Overly specific patterns** - misses variations:\n```yaml\n# BAD: Only matches exact format\npattern: os.system(\"rm \" + $VAR)\n\n# GOOD: Matches all os.system calls with taint tracking\nmode: taint\npattern-sources:\n  - pattern: input(...)\npattern-sinks:\n  - pattern: os.system(...)\n```\n\n## Strictness Level\n\nThis workflow is **strict** - do not skip steps:\n- **Read documentation first**: See [Documentation](#documentation) before writing Semgrep rules\n- **Test-first is mandatory**: Never write a rule without tests\n- **100% test pass is required**: \"Most tests pass\" is not acceptable\n- **Optimization comes last**: Only simplify patterns after all tests pass\n- **Avoid generic patterns**: Rules must be specific, not match broad patterns\n- **Prioritize taint mode**: For data flow vulnerabilities\n- **One YAML file - one Semgrep rule**: Each YAML file must contain only one Semgrep rule; don't combine multiple rules in a single file\n- **No generic rules**: When targeting a specific language for Semgrep rules - avoid generic pattern matching (`languages: generic`)\n- **Forbidden `todook` and `todoruleid` test annotations**: `todoruleid: \u003Crule-id>` and `todook: \u003Crule-id>` annotations in tests files for future rule improvements are forbidden\n\n## Overview\n\nThis skill guides creation of Semgrep rules that detect security vulnerabilities and code patterns. Rules are created iteratively: analyze the problem, write tests first, analyze AST structure, write the rule, iterate until all tests pass, optimize the rule.\n\n**Approach selection:**\n- **Taint mode** (prioritize): Data flow issues where untrusted input reaches dangerous sinks\n- **Pattern matching**: Simple syntactic patterns without data flow requirements\n\n**Why prioritize taint mode?** Pattern matching finds syntax but misses context. A pattern `eval($X)` matches both `eval(user_input)` (vulnerable) and `eval(\"safe_literal\")` (safe). Taint mode tracks data flow, so it only alerts when untrusted data actually reaches the sink—dramatically reducing false positives for injection vulnerabilities.\n\n**Iterating between approaches:** It's okay to experiment. If you start with taint mode and it's not working well (e.g., taint doesn't propagate as expected, too many false positives\u002Fnegatives), switch to pattern matching. Conversely, if pattern matching produces too many false positives on safe cases, try taint mode instead. The goal is a working rule—not rigid adherence to one approach.\n\n**Output structure** - exactly 2 files in a directory named after the rule-id:\n```\n\u003Crule-id>\u002F\n├── \u003Crule-id>.yaml     # Semgrep rule\n└── \u003Crule-id>.\u003Cext>    # Test file with ruleid\u002Fok annotations\n```\n\n## Quick Start\n\n```yaml\nrules:\n  - id: insecure-eval\n    languages: [python]\n    severity: HIGH\n    message: User input passed to eval() allows code execution\n    mode: taint\n    pattern-sources:\n      - pattern: request.args.get(...)\n    pattern-sinks:\n      - pattern: eval(...)\n```\n\nTest file (`insecure-eval.py`):\n```python\n# ruleid: insecure-eval\neval(request.args.get('code'))\n\n# ok: insecure-eval\neval(\"print('safe')\")\n```\n\nRun tests (from rule directory): `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>`\n\n## Quick Reference\n\n- For commands, pattern operators, and taint mode syntax, see [quick-reference.md]({baseDir}\u002Freferences\u002Fquick-reference.md).\n- For detailed workflow and examples, you MUST see [workflow.md]({baseDir}\u002Freferences\u002Fworkflow.md)\n\n## Workflow\n\nCopy this checklist and track progress:\n\n```\nSemgrep Rule Progress:\n- [ ] Step 1: Analyze the Problem\n- [ ] Step 2: Write Tests First\n- [ ] Step 3: Analyze AST structure\n- [ ] Step 4: Write the rule\n- [ ] Step 5: Iterate until all tests pass (semgrep --test)\n- [ ] Step 6: Optimize the rule (remove redundancies, re-test)\n- [ ] Step 7: Final Run\n```\n\n## Documentation\n\n**REQUIRED**: Before writing any rule, use WebFetch to read **all** of these 7 links with Semgrep documentation:\n\n1. [Rule Syntax](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Frule-syntax.mdx)\n2. [Pattern Syntax](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fpattern-syntax.mdx)\n3. [Testing Rules](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Ftesting-rules.mdx)\n4. [Taint analysis](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Ftaint-mode\u002Foverview.mdx)\n5. [Advanced techniques for taint analysis](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Ftaint-mode\u002Fadvanced.mdx)\n6. [Constant propagation](https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Fconstant-propagation.mdx)\n7. [Trail of Bits Testing Handbook - Semgrep chapter](https:\u002F\u002Fraw.githubusercontent.com\u002Ftrailofbits\u002Ftesting-handbook\u002Frefs\u002Fheads\u002Fmain\u002Fcontent\u002Fdocs\u002Fstatic-analysis\u002Fsemgrep\u002F10-advanced.md)\n",{"data":39,"body":41},{"name":4,"description":6,"allowed-tools":40},"Bash Read Write Edit Glob Grep WebFetch",{"type":42,"children":43},"root",[44,52,58,65,74,99,105,110,131,137,142,213,219,229,310,320,435,445,575,581,593,734,740,745,753,776,810,820,830,840,846,1026,1039,1085,1095,1101,1128,1134,1139,1148,1153,1170,1245],{"type":45,"tag":46,"props":47,"children":48},"element","h1",{"id":4},[49],{"type":50,"value":51},"text","Semgrep Rule Creator",{"type":45,"tag":53,"props":54,"children":55},"p",{},[56],{"type":50,"value":57},"Create production-quality Semgrep rules with proper testing and validation.",{"type":45,"tag":59,"props":60,"children":62},"h2",{"id":61},"when-to-use",[63],{"type":50,"value":64},"When to Use",{"type":45,"tag":53,"props":66,"children":67},{},[68],{"type":45,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":50,"value":73},"Ideal scenarios:",{"type":45,"tag":75,"props":76,"children":77},"ul",{},[78,84,89,94],{"type":45,"tag":79,"props":80,"children":81},"li",{},[82],{"type":50,"value":83},"Writing Semgrep rules for specific bug patterns",{"type":45,"tag":79,"props":85,"children":86},{},[87],{"type":50,"value":88},"Writing rules to detect security vulnerabilities in your codebase",{"type":45,"tag":79,"props":90,"children":91},{},[92],{"type":50,"value":93},"Writing taint mode rules for data flow vulnerabilities",{"type":45,"tag":79,"props":95,"children":96},{},[97],{"type":50,"value":98},"Writing rules to enforce coding standards",{"type":45,"tag":59,"props":100,"children":102},{"id":101},"when-not-to-use",[103],{"type":50,"value":104},"When NOT to Use",{"type":45,"tag":53,"props":106,"children":107},{},[108],{"type":50,"value":109},"Do NOT use this skill for:",{"type":45,"tag":75,"props":111,"children":112},{},[113,118],{"type":45,"tag":79,"props":114,"children":115},{},[116],{"type":50,"value":117},"Running existing Semgrep rulesets",{"type":45,"tag":79,"props":119,"children":120},{},[121,123,129],{"type":50,"value":122},"General static analysis without custom rules (use ",{"type":45,"tag":124,"props":125,"children":127},"code",{"className":126},[],[128],{"type":50,"value":19},{"type":50,"value":130}," skill)",{"type":45,"tag":59,"props":132,"children":134},{"id":133},"rationalizations-to-reject",[135],{"type":50,"value":136},"Rationalizations to Reject",{"type":45,"tag":53,"props":138,"children":139},{},[140],{"type":50,"value":141},"When writing Semgrep rules, reject these common shortcuts:",{"type":45,"tag":75,"props":143,"children":144},{},[145,163,173,183,193,203],{"type":45,"tag":79,"props":146,"children":147},{},[148,153,155,161],{"type":45,"tag":69,"props":149,"children":150},{},[151],{"type":50,"value":152},"\"The pattern looks complete\"",{"type":50,"value":154}," → Still run ",{"type":45,"tag":124,"props":156,"children":158},{"className":157},[],[159],{"type":50,"value":160},"semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>",{"type":50,"value":162}," to verify. Untested rules have hidden false positives\u002Fnegatives.",{"type":45,"tag":79,"props":164,"children":165},{},[166,171],{"type":45,"tag":69,"props":167,"children":168},{},[169],{"type":50,"value":170},"\"It matches the vulnerable case\"",{"type":50,"value":172}," → Matching vulnerabilities is half the job. Verify safe cases don't match (false positives break trust).",{"type":45,"tag":79,"props":174,"children":175},{},[176,181],{"type":45,"tag":69,"props":177,"children":178},{},[179],{"type":50,"value":180},"\"Taint mode is overkill for this\"",{"type":50,"value":182}," → If data flows from user input to a dangerous sink, taint mode gives better precision than pattern matching.",{"type":45,"tag":79,"props":184,"children":185},{},[186,191],{"type":45,"tag":69,"props":187,"children":188},{},[189],{"type":50,"value":190},"\"One test is enough\"",{"type":50,"value":192}," → Include edge cases: different coding styles, sanitized inputs, safe alternatives, and boundary conditions.",{"type":45,"tag":79,"props":194,"children":195},{},[196,201],{"type":45,"tag":69,"props":197,"children":198},{},[199],{"type":50,"value":200},"\"I'll optimize the patterns first\"",{"type":50,"value":202}," → Write correct patterns first, optimize after all tests pass. Premature optimization causes regressions.",{"type":45,"tag":79,"props":204,"children":205},{},[206,211],{"type":45,"tag":69,"props":207,"children":208},{},[209],{"type":50,"value":210},"\"The AST dump is too complex\"",{"type":50,"value":212}," → The AST reveals exactly how Semgrep sees code. Skipping it leads to patterns that miss syntactic variations.",{"type":45,"tag":59,"props":214,"children":216},{"id":215},"anti-patterns",[217],{"type":50,"value":218},"Anti-Patterns",{"type":45,"tag":53,"props":220,"children":221},{},[222,227],{"type":45,"tag":69,"props":223,"children":224},{},[225],{"type":50,"value":226},"Too broad",{"type":50,"value":228}," - matches everything, useless for detection:",{"type":45,"tag":230,"props":231,"children":236},"pre",{"className":232,"code":233,"language":234,"meta":235,"style":235},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# BAD: Matches any function call\npattern: $FUNC(...)\n\n# GOOD: Specific dangerous function\npattern: eval(...)\n","yaml","",[237],{"type":45,"tag":124,"props":238,"children":239},{"__ignoreMap":235},[240,252,274,284,293],{"type":45,"tag":241,"props":242,"children":245},"span",{"class":243,"line":244},"line",1,[246],{"type":45,"tag":241,"props":247,"children":249},{"style":248},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[250],{"type":50,"value":251},"# BAD: Matches any function call\n",{"type":45,"tag":241,"props":253,"children":255},{"class":243,"line":254},2,[256,262,268],{"type":45,"tag":241,"props":257,"children":259},{"style":258},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[260],{"type":50,"value":261},"pattern",{"type":45,"tag":241,"props":263,"children":265},{"style":264},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[266],{"type":50,"value":267},":",{"type":45,"tag":241,"props":269,"children":271},{"style":270},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[272],{"type":50,"value":273}," $FUNC(...)\n",{"type":45,"tag":241,"props":275,"children":277},{"class":243,"line":276},3,[278],{"type":45,"tag":241,"props":279,"children":281},{"emptyLinePlaceholder":280},true,[282],{"type":50,"value":283},"\n",{"type":45,"tag":241,"props":285,"children":287},{"class":243,"line":286},4,[288],{"type":45,"tag":241,"props":289,"children":290},{"style":248},[291],{"type":50,"value":292},"# GOOD: Specific dangerous function\n",{"type":45,"tag":241,"props":294,"children":296},{"class":243,"line":295},5,[297,301,305],{"type":45,"tag":241,"props":298,"children":299},{"style":258},[300],{"type":50,"value":261},{"type":45,"tag":241,"props":302,"children":303},{"style":264},[304],{"type":50,"value":267},{"type":45,"tag":241,"props":306,"children":307},{"style":270},[308],{"type":50,"value":309}," eval(...)\n",{"type":45,"tag":53,"props":311,"children":312},{},[313,318],{"type":45,"tag":69,"props":314,"children":315},{},[316],{"type":50,"value":317},"Missing safe cases in tests",{"type":50,"value":319}," - leads to undetected false positives:",{"type":45,"tag":230,"props":321,"children":325},{"className":322,"code":323,"language":324,"meta":235,"style":235},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# BAD: Only tests vulnerable case\n# ruleid: my-rule\ndangerous(user_input)\n\n# GOOD: Include safe cases to verify no false positives\n# ruleid: my-rule\ndangerous(user_input)\n\n# ok: my-rule\ndangerous(sanitize(user_input))\n\n# ok: my-rule\ndangerous(\"hardcoded_safe_value\")\n","python",[326],{"type":45,"tag":124,"props":327,"children":328},{"__ignoreMap":235},[329,337,345,353,360,368,376,384,392,401,410,418,426],{"type":45,"tag":241,"props":330,"children":331},{"class":243,"line":244},[332],{"type":45,"tag":241,"props":333,"children":334},{},[335],{"type":50,"value":336},"# BAD: Only tests vulnerable case\n",{"type":45,"tag":241,"props":338,"children":339},{"class":243,"line":254},[340],{"type":45,"tag":241,"props":341,"children":342},{},[343],{"type":50,"value":344},"# ruleid: my-rule\n",{"type":45,"tag":241,"props":346,"children":347},{"class":243,"line":276},[348],{"type":45,"tag":241,"props":349,"children":350},{},[351],{"type":50,"value":352},"dangerous(user_input)\n",{"type":45,"tag":241,"props":354,"children":355},{"class":243,"line":286},[356],{"type":45,"tag":241,"props":357,"children":358},{"emptyLinePlaceholder":280},[359],{"type":50,"value":283},{"type":45,"tag":241,"props":361,"children":362},{"class":243,"line":295},[363],{"type":45,"tag":241,"props":364,"children":365},{},[366],{"type":50,"value":367},"# GOOD: Include safe cases to verify no false positives\n",{"type":45,"tag":241,"props":369,"children":371},{"class":243,"line":370},6,[372],{"type":45,"tag":241,"props":373,"children":374},{},[375],{"type":50,"value":344},{"type":45,"tag":241,"props":377,"children":379},{"class":243,"line":378},7,[380],{"type":45,"tag":241,"props":381,"children":382},{},[383],{"type":50,"value":352},{"type":45,"tag":241,"props":385,"children":387},{"class":243,"line":386},8,[388],{"type":45,"tag":241,"props":389,"children":390},{"emptyLinePlaceholder":280},[391],{"type":50,"value":283},{"type":45,"tag":241,"props":393,"children":395},{"class":243,"line":394},9,[396],{"type":45,"tag":241,"props":397,"children":398},{},[399],{"type":50,"value":400},"# ok: my-rule\n",{"type":45,"tag":241,"props":402,"children":404},{"class":243,"line":403},10,[405],{"type":45,"tag":241,"props":406,"children":407},{},[408],{"type":50,"value":409},"dangerous(sanitize(user_input))\n",{"type":45,"tag":241,"props":411,"children":413},{"class":243,"line":412},11,[414],{"type":45,"tag":241,"props":415,"children":416},{"emptyLinePlaceholder":280},[417],{"type":50,"value":283},{"type":45,"tag":241,"props":419,"children":421},{"class":243,"line":420},12,[422],{"type":45,"tag":241,"props":423,"children":424},{},[425],{"type":50,"value":400},{"type":45,"tag":241,"props":427,"children":429},{"class":243,"line":428},13,[430],{"type":45,"tag":241,"props":431,"children":432},{},[433],{"type":50,"value":434},"dangerous(\"hardcoded_safe_value\")\n",{"type":45,"tag":53,"props":436,"children":437},{},[438,443],{"type":45,"tag":69,"props":439,"children":440},{},[441],{"type":50,"value":442},"Overly specific patterns",{"type":50,"value":444}," - misses variations:",{"type":45,"tag":230,"props":446,"children":448},{"className":232,"code":447,"language":234,"meta":235,"style":235},"# BAD: Only matches exact format\npattern: os.system(\"rm \" + $VAR)\n\n# GOOD: Matches all os.system calls with taint tracking\nmode: taint\npattern-sources:\n  - pattern: input(...)\npattern-sinks:\n  - pattern: os.system(...)\n",[449],{"type":45,"tag":124,"props":450,"children":451},{"__ignoreMap":235},[452,460,476,483,491,508,521,543,555],{"type":45,"tag":241,"props":453,"children":454},{"class":243,"line":244},[455],{"type":45,"tag":241,"props":456,"children":457},{"style":248},[458],{"type":50,"value":459},"# BAD: Only matches exact format\n",{"type":45,"tag":241,"props":461,"children":462},{"class":243,"line":254},[463,467,471],{"type":45,"tag":241,"props":464,"children":465},{"style":258},[466],{"type":50,"value":261},{"type":45,"tag":241,"props":468,"children":469},{"style":264},[470],{"type":50,"value":267},{"type":45,"tag":241,"props":472,"children":473},{"style":270},[474],{"type":50,"value":475}," os.system(\"rm \" + $VAR)\n",{"type":45,"tag":241,"props":477,"children":478},{"class":243,"line":276},[479],{"type":45,"tag":241,"props":480,"children":481},{"emptyLinePlaceholder":280},[482],{"type":50,"value":283},{"type":45,"tag":241,"props":484,"children":485},{"class":243,"line":286},[486],{"type":45,"tag":241,"props":487,"children":488},{"style":248},[489],{"type":50,"value":490},"# GOOD: Matches all os.system calls with taint tracking\n",{"type":45,"tag":241,"props":492,"children":493},{"class":243,"line":295},[494,499,503],{"type":45,"tag":241,"props":495,"children":496},{"style":258},[497],{"type":50,"value":498},"mode",{"type":45,"tag":241,"props":500,"children":501},{"style":264},[502],{"type":50,"value":267},{"type":45,"tag":241,"props":504,"children":505},{"style":270},[506],{"type":50,"value":507}," taint\n",{"type":45,"tag":241,"props":509,"children":510},{"class":243,"line":370},[511,516],{"type":45,"tag":241,"props":512,"children":513},{"style":258},[514],{"type":50,"value":515},"pattern-sources",{"type":45,"tag":241,"props":517,"children":518},{"style":264},[519],{"type":50,"value":520},":\n",{"type":45,"tag":241,"props":522,"children":523},{"class":243,"line":378},[524,529,534,538],{"type":45,"tag":241,"props":525,"children":526},{"style":264},[527],{"type":50,"value":528},"  -",{"type":45,"tag":241,"props":530,"children":531},{"style":258},[532],{"type":50,"value":533}," pattern",{"type":45,"tag":241,"props":535,"children":536},{"style":264},[537],{"type":50,"value":267},{"type":45,"tag":241,"props":539,"children":540},{"style":270},[541],{"type":50,"value":542}," input(...)\n",{"type":45,"tag":241,"props":544,"children":545},{"class":243,"line":386},[546,551],{"type":45,"tag":241,"props":547,"children":548},{"style":258},[549],{"type":50,"value":550},"pattern-sinks",{"type":45,"tag":241,"props":552,"children":553},{"style":264},[554],{"type":50,"value":520},{"type":45,"tag":241,"props":556,"children":557},{"class":243,"line":394},[558,562,566,570],{"type":45,"tag":241,"props":559,"children":560},{"style":264},[561],{"type":50,"value":528},{"type":45,"tag":241,"props":563,"children":564},{"style":258},[565],{"type":50,"value":533},{"type":45,"tag":241,"props":567,"children":568},{"style":264},[569],{"type":50,"value":267},{"type":45,"tag":241,"props":571,"children":572},{"style":270},[573],{"type":50,"value":574}," os.system(...)\n",{"type":45,"tag":59,"props":576,"children":578},{"id":577},"strictness-level",[579],{"type":50,"value":580},"Strictness Level",{"type":45,"tag":53,"props":582,"children":583},{},[584,586,591],{"type":50,"value":585},"This workflow is ",{"type":45,"tag":69,"props":587,"children":588},{},[589],{"type":50,"value":590},"strict",{"type":50,"value":592}," - do not skip steps:",{"type":45,"tag":75,"props":594,"children":595},{},[596,615,625,635,645,655,665,675,693],{"type":45,"tag":79,"props":597,"children":598},{},[599,604,606,613],{"type":45,"tag":69,"props":600,"children":601},{},[602],{"type":50,"value":603},"Read documentation first",{"type":50,"value":605},": See ",{"type":45,"tag":607,"props":608,"children":610},"a",{"href":609},"#documentation",[611],{"type":50,"value":612},"Documentation",{"type":50,"value":614}," before writing Semgrep rules",{"type":45,"tag":79,"props":616,"children":617},{},[618,623],{"type":45,"tag":69,"props":619,"children":620},{},[621],{"type":50,"value":622},"Test-first is mandatory",{"type":50,"value":624},": Never write a rule without tests",{"type":45,"tag":79,"props":626,"children":627},{},[628,633],{"type":45,"tag":69,"props":629,"children":630},{},[631],{"type":50,"value":632},"100% test pass is required",{"type":50,"value":634},": \"Most tests pass\" is not acceptable",{"type":45,"tag":79,"props":636,"children":637},{},[638,643],{"type":45,"tag":69,"props":639,"children":640},{},[641],{"type":50,"value":642},"Optimization comes last",{"type":50,"value":644},": Only simplify patterns after all tests pass",{"type":45,"tag":79,"props":646,"children":647},{},[648,653],{"type":45,"tag":69,"props":649,"children":650},{},[651],{"type":50,"value":652},"Avoid generic patterns",{"type":50,"value":654},": Rules must be specific, not match broad patterns",{"type":45,"tag":79,"props":656,"children":657},{},[658,663],{"type":45,"tag":69,"props":659,"children":660},{},[661],{"type":50,"value":662},"Prioritize taint mode",{"type":50,"value":664},": For data flow vulnerabilities",{"type":45,"tag":79,"props":666,"children":667},{},[668,673],{"type":45,"tag":69,"props":669,"children":670},{},[671],{"type":50,"value":672},"One YAML file - one Semgrep rule",{"type":50,"value":674},": Each YAML file must contain only one Semgrep rule; don't combine multiple rules in a single file",{"type":45,"tag":79,"props":676,"children":677},{},[678,683,685,691],{"type":45,"tag":69,"props":679,"children":680},{},[681],{"type":50,"value":682},"No generic rules",{"type":50,"value":684},": When targeting a specific language for Semgrep rules - avoid generic pattern matching (",{"type":45,"tag":124,"props":686,"children":688},{"className":687},[],[689],{"type":50,"value":690},"languages: generic",{"type":50,"value":692},")",{"type":45,"tag":79,"props":694,"children":695},{},[696,717,719,725,726,732],{"type":45,"tag":69,"props":697,"children":698},{},[699,701,707,709,715],{"type":50,"value":700},"Forbidden ",{"type":45,"tag":124,"props":702,"children":704},{"className":703},[],[705],{"type":50,"value":706},"todook",{"type":50,"value":708}," and ",{"type":45,"tag":124,"props":710,"children":712},{"className":711},[],[713],{"type":50,"value":714},"todoruleid",{"type":50,"value":716}," test annotations",{"type":50,"value":718},": ",{"type":45,"tag":124,"props":720,"children":722},{"className":721},[],[723],{"type":50,"value":724},"todoruleid: \u003Crule-id>",{"type":50,"value":708},{"type":45,"tag":124,"props":727,"children":729},{"className":728},[],[730],{"type":50,"value":731},"todook: \u003Crule-id>",{"type":50,"value":733}," annotations in tests files for future rule improvements are forbidden",{"type":45,"tag":59,"props":735,"children":737},{"id":736},"overview",[738],{"type":50,"value":739},"Overview",{"type":45,"tag":53,"props":741,"children":742},{},[743],{"type":50,"value":744},"This skill guides creation of Semgrep rules that detect security vulnerabilities and code patterns. Rules are created iteratively: analyze the problem, write tests first, analyze AST structure, write the rule, iterate until all tests pass, optimize the rule.",{"type":45,"tag":53,"props":746,"children":747},{},[748],{"type":45,"tag":69,"props":749,"children":750},{},[751],{"type":50,"value":752},"Approach selection:",{"type":45,"tag":75,"props":754,"children":755},{},[756,766],{"type":45,"tag":79,"props":757,"children":758},{},[759,764],{"type":45,"tag":69,"props":760,"children":761},{},[762],{"type":50,"value":763},"Taint mode",{"type":50,"value":765}," (prioritize): Data flow issues where untrusted input reaches dangerous sinks",{"type":45,"tag":79,"props":767,"children":768},{},[769,774],{"type":45,"tag":69,"props":770,"children":771},{},[772],{"type":50,"value":773},"Pattern matching",{"type":50,"value":775},": Simple syntactic patterns without data flow requirements",{"type":45,"tag":53,"props":777,"children":778},{},[779,784,786,792,794,800,802,808],{"type":45,"tag":69,"props":780,"children":781},{},[782],{"type":50,"value":783},"Why prioritize taint mode?",{"type":50,"value":785}," Pattern matching finds syntax but misses context. A pattern ",{"type":45,"tag":124,"props":787,"children":789},{"className":788},[],[790],{"type":50,"value":791},"eval($X)",{"type":50,"value":793}," matches both ",{"type":45,"tag":124,"props":795,"children":797},{"className":796},[],[798],{"type":50,"value":799},"eval(user_input)",{"type":50,"value":801}," (vulnerable) and ",{"type":45,"tag":124,"props":803,"children":805},{"className":804},[],[806],{"type":50,"value":807},"eval(\"safe_literal\")",{"type":50,"value":809}," (safe). Taint mode tracks data flow, so it only alerts when untrusted data actually reaches the sink—dramatically reducing false positives for injection vulnerabilities.",{"type":45,"tag":53,"props":811,"children":812},{},[813,818],{"type":45,"tag":69,"props":814,"children":815},{},[816],{"type":50,"value":817},"Iterating between approaches:",{"type":50,"value":819}," It's okay to experiment. If you start with taint mode and it's not working well (e.g., taint doesn't propagate as expected, too many false positives\u002Fnegatives), switch to pattern matching. Conversely, if pattern matching produces too many false positives on safe cases, try taint mode instead. The goal is a working rule—not rigid adherence to one approach.",{"type":45,"tag":53,"props":821,"children":822},{},[823,828],{"type":45,"tag":69,"props":824,"children":825},{},[826],{"type":50,"value":827},"Output structure",{"type":50,"value":829}," - exactly 2 files in a directory named after the rule-id:",{"type":45,"tag":230,"props":831,"children":835},{"className":832,"code":834,"language":50},[833],"language-text","\u003Crule-id>\u002F\n├── \u003Crule-id>.yaml     # Semgrep rule\n└── \u003Crule-id>.\u003Cext>    # Test file with ruleid\u002Fok annotations\n",[836],{"type":45,"tag":124,"props":837,"children":838},{"__ignoreMap":235},[839],{"type":50,"value":834},{"type":45,"tag":59,"props":841,"children":843},{"id":842},"quick-start",[844],{"type":50,"value":845},"Quick Start",{"type":45,"tag":230,"props":847,"children":849},{"className":232,"code":848,"language":234,"meta":235,"style":235},"rules:\n  - id: insecure-eval\n    languages: [python]\n    severity: HIGH\n    message: User input passed to eval() allows code execution\n    mode: taint\n    pattern-sources:\n      - pattern: request.args.get(...)\n    pattern-sinks:\n      - pattern: eval(...)\n",[850],{"type":45,"tag":124,"props":851,"children":852},{"__ignoreMap":235},[853,865,886,912,929,946,962,974,995,1007],{"type":45,"tag":241,"props":854,"children":855},{"class":243,"line":244},[856,861],{"type":45,"tag":241,"props":857,"children":858},{"style":258},[859],{"type":50,"value":860},"rules",{"type":45,"tag":241,"props":862,"children":863},{"style":264},[864],{"type":50,"value":520},{"type":45,"tag":241,"props":866,"children":867},{"class":243,"line":254},[868,872,877,881],{"type":45,"tag":241,"props":869,"children":870},{"style":264},[871],{"type":50,"value":528},{"type":45,"tag":241,"props":873,"children":874},{"style":258},[875],{"type":50,"value":876}," id",{"type":45,"tag":241,"props":878,"children":879},{"style":264},[880],{"type":50,"value":267},{"type":45,"tag":241,"props":882,"children":883},{"style":270},[884],{"type":50,"value":885}," insecure-eval\n",{"type":45,"tag":241,"props":887,"children":888},{"class":243,"line":276},[889,894,898,903,907],{"type":45,"tag":241,"props":890,"children":891},{"style":258},[892],{"type":50,"value":893},"    languages",{"type":45,"tag":241,"props":895,"children":896},{"style":264},[897],{"type":50,"value":267},{"type":45,"tag":241,"props":899,"children":900},{"style":264},[901],{"type":50,"value":902}," [",{"type":45,"tag":241,"props":904,"children":905},{"style":270},[906],{"type":50,"value":324},{"type":45,"tag":241,"props":908,"children":909},{"style":264},[910],{"type":50,"value":911},"]\n",{"type":45,"tag":241,"props":913,"children":914},{"class":243,"line":286},[915,920,924],{"type":45,"tag":241,"props":916,"children":917},{"style":258},[918],{"type":50,"value":919},"    severity",{"type":45,"tag":241,"props":921,"children":922},{"style":264},[923],{"type":50,"value":267},{"type":45,"tag":241,"props":925,"children":926},{"style":270},[927],{"type":50,"value":928}," HIGH\n",{"type":45,"tag":241,"props":930,"children":931},{"class":243,"line":295},[932,937,941],{"type":45,"tag":241,"props":933,"children":934},{"style":258},[935],{"type":50,"value":936},"    message",{"type":45,"tag":241,"props":938,"children":939},{"style":264},[940],{"type":50,"value":267},{"type":45,"tag":241,"props":942,"children":943},{"style":270},[944],{"type":50,"value":945}," User input passed to eval() allows code execution\n",{"type":45,"tag":241,"props":947,"children":948},{"class":243,"line":370},[949,954,958],{"type":45,"tag":241,"props":950,"children":951},{"style":258},[952],{"type":50,"value":953},"    mode",{"type":45,"tag":241,"props":955,"children":956},{"style":264},[957],{"type":50,"value":267},{"type":45,"tag":241,"props":959,"children":960},{"style":270},[961],{"type":50,"value":507},{"type":45,"tag":241,"props":963,"children":964},{"class":243,"line":378},[965,970],{"type":45,"tag":241,"props":966,"children":967},{"style":258},[968],{"type":50,"value":969},"    pattern-sources",{"type":45,"tag":241,"props":971,"children":972},{"style":264},[973],{"type":50,"value":520},{"type":45,"tag":241,"props":975,"children":976},{"class":243,"line":386},[977,982,986,990],{"type":45,"tag":241,"props":978,"children":979},{"style":264},[980],{"type":50,"value":981},"      -",{"type":45,"tag":241,"props":983,"children":984},{"style":258},[985],{"type":50,"value":533},{"type":45,"tag":241,"props":987,"children":988},{"style":264},[989],{"type":50,"value":267},{"type":45,"tag":241,"props":991,"children":992},{"style":270},[993],{"type":50,"value":994}," request.args.get(...)\n",{"type":45,"tag":241,"props":996,"children":997},{"class":243,"line":394},[998,1003],{"type":45,"tag":241,"props":999,"children":1000},{"style":258},[1001],{"type":50,"value":1002},"    pattern-sinks",{"type":45,"tag":241,"props":1004,"children":1005},{"style":264},[1006],{"type":50,"value":520},{"type":45,"tag":241,"props":1008,"children":1009},{"class":243,"line":403},[1010,1014,1018,1022],{"type":45,"tag":241,"props":1011,"children":1012},{"style":264},[1013],{"type":50,"value":981},{"type":45,"tag":241,"props":1015,"children":1016},{"style":258},[1017],{"type":50,"value":533},{"type":45,"tag":241,"props":1019,"children":1020},{"style":264},[1021],{"type":50,"value":267},{"type":45,"tag":241,"props":1023,"children":1024},{"style":270},[1025],{"type":50,"value":309},{"type":45,"tag":53,"props":1027,"children":1028},{},[1029,1031,1037],{"type":50,"value":1030},"Test file (",{"type":45,"tag":124,"props":1032,"children":1034},{"className":1033},[],[1035],{"type":50,"value":1036},"insecure-eval.py",{"type":50,"value":1038},"):",{"type":45,"tag":230,"props":1040,"children":1042},{"className":322,"code":1041,"language":324,"meta":235,"style":235},"# ruleid: insecure-eval\neval(request.args.get('code'))\n\n# ok: insecure-eval\neval(\"print('safe')\")\n",[1043],{"type":45,"tag":124,"props":1044,"children":1045},{"__ignoreMap":235},[1046,1054,1062,1069,1077],{"type":45,"tag":241,"props":1047,"children":1048},{"class":243,"line":244},[1049],{"type":45,"tag":241,"props":1050,"children":1051},{},[1052],{"type":50,"value":1053},"# ruleid: insecure-eval\n",{"type":45,"tag":241,"props":1055,"children":1056},{"class":243,"line":254},[1057],{"type":45,"tag":241,"props":1058,"children":1059},{},[1060],{"type":50,"value":1061},"eval(request.args.get('code'))\n",{"type":45,"tag":241,"props":1063,"children":1064},{"class":243,"line":276},[1065],{"type":45,"tag":241,"props":1066,"children":1067},{"emptyLinePlaceholder":280},[1068],{"type":50,"value":283},{"type":45,"tag":241,"props":1070,"children":1071},{"class":243,"line":286},[1072],{"type":45,"tag":241,"props":1073,"children":1074},{},[1075],{"type":50,"value":1076},"# ok: insecure-eval\n",{"type":45,"tag":241,"props":1078,"children":1079},{"class":243,"line":295},[1080],{"type":45,"tag":241,"props":1081,"children":1082},{},[1083],{"type":50,"value":1084},"eval(\"print('safe')\")\n",{"type":45,"tag":53,"props":1086,"children":1087},{},[1088,1090],{"type":50,"value":1089},"Run tests (from rule directory): ",{"type":45,"tag":124,"props":1091,"children":1093},{"className":1092},[],[1094],{"type":50,"value":160},{"type":45,"tag":59,"props":1096,"children":1098},{"id":1097},"quick-reference",[1099],{"type":50,"value":1100},"Quick Reference",{"type":45,"tag":75,"props":1102,"children":1103},{},[1104,1117],{"type":45,"tag":79,"props":1105,"children":1106},{},[1107,1109,1115],{"type":50,"value":1108},"For commands, pattern operators, and taint mode syntax, see ",{"type":45,"tag":607,"props":1110,"children":1112},{"href":1111},"%7BbaseDir%7D\u002Freferences\u002Fquick-reference.md",[1113],{"type":50,"value":1114},"quick-reference.md",{"type":50,"value":1116},".",{"type":45,"tag":79,"props":1118,"children":1119},{},[1120,1122],{"type":50,"value":1121},"For detailed workflow and examples, you MUST see ",{"type":45,"tag":607,"props":1123,"children":1125},{"href":1124},"%7BbaseDir%7D\u002Freferences\u002Fworkflow.md",[1126],{"type":50,"value":1127},"workflow.md",{"type":45,"tag":59,"props":1129,"children":1131},{"id":1130},"workflow",[1132],{"type":50,"value":1133},"Workflow",{"type":45,"tag":53,"props":1135,"children":1136},{},[1137],{"type":50,"value":1138},"Copy this checklist and track progress:",{"type":45,"tag":230,"props":1140,"children":1143},{"className":1141,"code":1142,"language":50},[833],"Semgrep Rule Progress:\n- [ ] Step 1: Analyze the Problem\n- [ ] Step 2: Write Tests First\n- [ ] Step 3: Analyze AST structure\n- [ ] Step 4: Write the rule\n- [ ] Step 5: Iterate until all tests pass (semgrep --test)\n- [ ] Step 6: Optimize the rule (remove redundancies, re-test)\n- [ ] Step 7: Final Run\n",[1144],{"type":45,"tag":124,"props":1145,"children":1146},{"__ignoreMap":235},[1147],{"type":50,"value":1142},{"type":45,"tag":59,"props":1149,"children":1151},{"id":1150},"documentation",[1152],{"type":50,"value":612},{"type":45,"tag":53,"props":1154,"children":1155},{},[1156,1161,1163,1168],{"type":45,"tag":69,"props":1157,"children":1158},{},[1159],{"type":50,"value":1160},"REQUIRED",{"type":50,"value":1162},": Before writing any rule, use WebFetch to read ",{"type":45,"tag":69,"props":1164,"children":1165},{},[1166],{"type":50,"value":1167},"all",{"type":50,"value":1169}," of these 7 links with Semgrep documentation:",{"type":45,"tag":1171,"props":1172,"children":1173},"ol",{},[1174,1185,1195,1205,1215,1225,1235],{"type":45,"tag":79,"props":1175,"children":1176},{},[1177],{"type":45,"tag":607,"props":1178,"children":1182},{"href":1179,"rel":1180},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Frule-syntax.mdx",[1181],"nofollow",[1183],{"type":50,"value":1184},"Rule Syntax",{"type":45,"tag":79,"props":1186,"children":1187},{},[1188],{"type":45,"tag":607,"props":1189,"children":1192},{"href":1190,"rel":1191},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fpattern-syntax.mdx",[1181],[1193],{"type":50,"value":1194},"Pattern Syntax",{"type":45,"tag":79,"props":1196,"children":1197},{},[1198],{"type":45,"tag":607,"props":1199,"children":1202},{"href":1200,"rel":1201},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Ftesting-rules.mdx",[1181],[1203],{"type":50,"value":1204},"Testing Rules",{"type":45,"tag":79,"props":1206,"children":1207},{},[1208],{"type":45,"tag":607,"props":1209,"children":1212},{"href":1210,"rel":1211},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Ftaint-mode\u002Foverview.mdx",[1181],[1213],{"type":50,"value":1214},"Taint analysis",{"type":45,"tag":79,"props":1216,"children":1217},{},[1218],{"type":45,"tag":607,"props":1219,"children":1222},{"href":1220,"rel":1221},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Ftaint-mode\u002Fadvanced.mdx",[1181],[1223],{"type":50,"value":1224},"Advanced techniques for taint analysis",{"type":45,"tag":79,"props":1226,"children":1227},{},[1228],{"type":45,"tag":607,"props":1229,"children":1232},{"href":1230,"rel":1231},"https:\u002F\u002Fraw.githubusercontent.com\u002Fsemgrep\u002Fsemgrep-docs\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Fconstant-propagation.mdx",[1181],[1233],{"type":50,"value":1234},"Constant propagation",{"type":45,"tag":79,"props":1236,"children":1237},{},[1238],{"type":45,"tag":607,"props":1239,"children":1242},{"href":1240,"rel":1241},"https:\u002F\u002Fraw.githubusercontent.com\u002Ftrailofbits\u002Ftesting-handbook\u002Frefs\u002Fheads\u002Fmain\u002Fcontent\u002Fdocs\u002Fstatic-analysis\u002Fsemgrep\u002F10-advanced.md",[1181],[1243],{"type":50,"value":1244},"Trail of Bits Testing Handbook - Semgrep chapter",{"type":45,"tag":1246,"props":1247,"children":1248},"style",{},[1249],{"type":50,"value":1250},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1252,"total":1405},[1253,1270,1280,1298,1313,1326,1337,1347,1360,1371,1383,1394],{"slug":1254,"name":1254,"fn":1255,"description":1256,"org":1257,"tags":1258,"stars":26,"repoUrl":27,"updatedAt":1269},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1259,1262,1265,1266],{"name":1260,"slug":1261,"type":16},"C#","c",{"name":1263,"slug":1264,"type":16},"Debugging","debugging",{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},"Testing","testing","2026-07-17T06:05:14.925095",{"slug":1271,"name":1271,"fn":1272,"description":1273,"org":1274,"tags":1275,"stars":26,"repoUrl":27,"updatedAt":1279},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1276,1277,1278],{"name":1260,"slug":1261,"type":16},{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},"2026-07-17T06:05:12.433192",{"slug":1281,"name":1281,"fn":1282,"description":1283,"org":1284,"tags":1285,"stars":26,"repoUrl":27,"updatedAt":1297},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1286,1289,1292,1293,1296],{"name":1287,"slug":1288,"type":16},"Agents","agents",{"name":1290,"slug":1291,"type":16},"CI\u002FCD","ci-cd",{"name":24,"slug":25,"type":16},{"name":1294,"slug":1295,"type":16},"GitHub Actions","github-actions",{"name":14,"slug":15,"type":16},"2026-07-18T05:47:48.564744",{"slug":1299,"name":1299,"fn":1300,"description":1301,"org":1302,"tags":1303,"stars":26,"repoUrl":27,"updatedAt":1312},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1304,1307,1308,1309],{"name":1305,"slug":1306,"type":16},"Audit","audit",{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"name":1310,"slug":1311,"type":16},"Smart Contracts","smart-contracts","2026-07-18T05:47:43.989063",{"slug":1314,"name":1314,"fn":1315,"description":1316,"org":1317,"tags":1318,"stars":26,"repoUrl":27,"updatedAt":1325},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1319,1322],{"name":1320,"slug":1321,"type":16},"Engineering","engineering",{"name":1323,"slug":1324,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":1327,"name":1327,"fn":1328,"description":1329,"org":1330,"tags":1331,"stars":26,"repoUrl":27,"updatedAt":1336},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1332,1334,1335],{"name":1333,"slug":324,"type":16},"Python",{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},"2026-07-17T06:05:14.575191",{"slug":1338,"name":1338,"fn":1339,"description":1340,"org":1341,"tags":1342,"stars":26,"repoUrl":27,"updatedAt":1346},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1343,1344,1345],{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},"2026-08-01T05:44:54.920542",{"slug":1348,"name":1348,"fn":1349,"description":1350,"org":1351,"tags":1352,"stars":26,"repoUrl":27,"updatedAt":1359},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1353,1356,1357,1358],{"name":1354,"slug":1355,"type":16},"Architecture","architecture",{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":1320,"slug":1321,"type":16},"2026-07-18T05:47:40.122449",{"slug":1361,"name":1361,"fn":1362,"description":1363,"org":1364,"tags":1365,"stars":26,"repoUrl":27,"updatedAt":1370},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1366,1367,1368,1369],{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":1320,"slug":1321,"type":16},{"name":14,"slug":15,"type":16},"2026-07-18T05:47:39.210985",{"slug":1372,"name":1372,"fn":1373,"description":1374,"org":1375,"tags":1376,"stars":26,"repoUrl":27,"updatedAt":1382},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1377,1378,1381],{"name":1305,"slug":1306,"type":16},{"name":1379,"slug":1380,"type":16},"CLI","cli",{"name":14,"slug":15,"type":16},"2026-07-17T06:05:33.198077",{"slug":1384,"name":1384,"fn":1385,"description":1386,"org":1387,"tags":1388,"stars":26,"repoUrl":27,"updatedAt":1393},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1389,1390,1391,1392],{"name":1305,"slug":1306,"type":16},{"name":1260,"slug":1261,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},"2026-07-17T06:05:11.333374",{"slug":1395,"name":1395,"fn":1396,"description":1397,"org":1398,"tags":1399,"stars":26,"repoUrl":27,"updatedAt":1404},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1400,1401,1402,1403],{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"name":1310,"slug":1311,"type":16},"2026-07-18T05:47:42.84568",111,{"items":1407,"total":1453},[1408,1415,1421,1429,1436,1441,1447],{"slug":1254,"name":1254,"fn":1255,"description":1256,"org":1409,"tags":1410,"stars":26,"repoUrl":27,"updatedAt":1269},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1411,1412,1413,1414],{"name":1260,"slug":1261,"type":16},{"name":1263,"slug":1264,"type":16},{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},{"slug":1271,"name":1271,"fn":1272,"description":1273,"org":1416,"tags":1417,"stars":26,"repoUrl":27,"updatedAt":1279},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1418,1419,1420],{"name":1260,"slug":1261,"type":16},{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},{"slug":1281,"name":1281,"fn":1282,"description":1283,"org":1422,"tags":1423,"stars":26,"repoUrl":27,"updatedAt":1297},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1424,1425,1426,1427,1428],{"name":1287,"slug":1288,"type":16},{"name":1290,"slug":1291,"type":16},{"name":24,"slug":25,"type":16},{"name":1294,"slug":1295,"type":16},{"name":14,"slug":15,"type":16},{"slug":1299,"name":1299,"fn":1300,"description":1301,"org":1430,"tags":1431,"stars":26,"repoUrl":27,"updatedAt":1312},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1432,1433,1434,1435],{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"name":1310,"slug":1311,"type":16},{"slug":1314,"name":1314,"fn":1315,"description":1316,"org":1437,"tags":1438,"stars":26,"repoUrl":27,"updatedAt":1325},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1439,1440],{"name":1320,"slug":1321,"type":16},{"name":1323,"slug":1324,"type":16},{"slug":1327,"name":1327,"fn":1328,"description":1329,"org":1442,"tags":1443,"stars":26,"repoUrl":27,"updatedAt":1336},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1444,1445,1446],{"name":1333,"slug":324,"type":16},{"name":14,"slug":15,"type":16},{"name":1267,"slug":1268,"type":16},{"slug":1338,"name":1338,"fn":1339,"description":1340,"org":1448,"tags":1449,"stars":26,"repoUrl":27,"updatedAt":1346},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1450,1451,1452],{"name":1305,"slug":1306,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},77]