تخطَّ إلى المحتوى
إضافةمستورديحتوي سكربتاتترخيص مشاركة بالمثل

static-analysis

Static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

اقرأ هذا قبل أن تنزّل

لا يشغّل تلقين أي شيء من هذا العنصر. لكن ما تنزّله يعمل على جهازك إن شغّلته أنت أو سمحت لكلود كود بتشغيله، فاقرأ الملفات أولاً.

  • في العنصر ملفات سكربت.

الملفات: 60 · الحجم: 567 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

تُثبَّت الإضافات من سوق الإضافات في كلود كود، لا بنسخ الملفات. نزّل الحزمة لتقرأ محتواها وترخيصها.

التعليمات

Static Analysis

A comprehensive static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection.

CodeQL and Semgrep skills are based on the Trail of Bits Testing Handbook:

Author: Axel Mierczuk & Paweł Płatek

Skills Included

SkillPurpose
codeqlDeep security analysis with taint tracking and data flow
semgrepFast pattern-based security scanning
sarif-parsingParse and process results from static analysis tools

When to Use

Use this plugin when you need to:

  • Perform security vulnerability detection on codebases
  • Run CodeQL for interprocedural taint tracking and data flow analysis
  • Use Semgrep for fast pattern-based bug detection
  • Parse SARIF output from security scanners
  • Aggregate and deduplicate findings from multiple tools

What It Does

CodeQL

  • Create databases for Python, JavaScript, Go, Java, C/C++, and more
  • Run security queries with SARIF/CSV output
  • Generate data extension models for project-specific APIs
  • Select and combine query packs (security-extended, Trail of Bits, Community)

Semgrep

  • Quick security scans using built-in rulesets (OWASP, CWE, Trail of Bits)
  • Write custom YAML rules with pattern matching
  • Taint mode for tracking data flow from sources to sinks
  • CI/CD integration with baseline scanning

SARIF Parsing

  • Understand SARIF 2.1.0 structure
  • Resolve a result's severity from the rule it inherits it from, which CodeQL relies on
  • Quick analysis using jq for CLI queries
  • Python scripting with pysarif and sarif-tools
  • Aggregate and deduplicate results from multiple files
  • CI/CD integration patterns

Running a Semgrep scan

Two entry points over one implementation.

/static-analysis:semgrep-scan {"target": "/abs/path", "mode": "run-all"}

runs the scan end to end: detect languages and Pro, select rulesets, scan, merge, report. It does not stop to have the ruleset list approved — invoking it with a target is the opt-in. That is safe because the scan is read-only over the target: no --autofix, every write inside the output directory, and it refuses to run when the output directory is the target.

Ask for the semgrep skill instead when the ruleset selection is the thing that matters. Its five-step path presents the list and waits for approval before anything runs. Both paths read the same references/, so a ruleset added to rulesets.md reaches both.

Workflows Included

WorkflowPurpose
workflows/semgrep-scan.jsShips as /static-analysis:semgrep-scan. Four phases: Detect, Select, Scan, Report
workflows/codeql-build.jsShips as /static-analysis:codeql-build. Three phases: Detect, Build, Assess. Walks the build-method ladder — autobuild, custom command, multi-step, no-build — diagnosing and retrying at each rung, then enforces the quality gate

Scripts Included

ScriptPurpose
skills/semgrep/scripts/run-scans.shBuilds every semgrep command from the selected rulesets, clones the third-party rule repos, runs the scans in batches and writes scans.json
skills/semgrep/scripts/merge_sarif.pyMerges the per-scan SARIF into one results.sarif

Generating the commands in one place is what makes --metrics=off, the --include scoping rule, and the output-directory --exclude properties of the code rather than instructions a model can drop.

No subagent runs any part of the scan — the workflow's Scan phase calls run-scans.sh. Exit codes come from the semgrep processes and finding counts from the JSON they wrote, so nothing in the result is a self-report that a later step has to go behind and verify.

Tests

Both suites are hermetic, reach no network, and are discovered by CI's existing shell-suite step.

SuiteCovers
tests/run_scan_tests.shrun-scans.sh: command generation via --dry-run, plus execution, exit codes and clone failures against stub semgrep and git binaries
tests/run_workflow_tests.shsemgrep-scan.js, via tests/workflow-harness.js, which compiles it with stubbed globals. --self-test mutates the workflow and requires every mutation to turn a scenario red

Installation

/plugin install trailofbits/skills/plugins/static-analysis

Related Skills

  • variant-analysis - Use CodeQL/Semgrep patterns to find bug variants

الملفات

  • مجلد.claude-plugin239 بايت
    • plugin.json239 بايت
  • مجلدskills427 ك.بسكربت
    • مجلدcodeql240 ك.بسكربت
      • مجلدagents239 بايت
        • openai.yaml239 بايت
      • مجلدassets3 ك.ب
        • trail-of-bits-mark.svg3 ك.ب
      • مجلدreferences62 ك.ب
        • build-fixes.md3.2 ك.ب
        • diagnostic-query-templates.md9.5 ك.ب
        • extension-yaml-format.md7.4 ك.ب
        • important-only-suite.md5.1 ك.ب
        • language-details.md5.7 ك.ب
        • macos-arm64e-workaround.md7.3 ك.ب
        • performance-tuning.md2.8 ك.ب
        • quality-assessment.md7.8 ك.ب
        • ruleset-catalog.md2.1 ك.ب
        • run-all-suite.md5.4 ك.ب
        • sarif-processing.md3 ك.ب
        • threat-models.md2.7 ك.ب
      • مجلدscripts120 ك.بسكربت
        • build_log.sh2.1 ك.بسكربت
        • check_db_quality.py15 ك.بسكربت
        • find_databases.sh2.5 ك.بسكربت
        • generate_suite.sh3.3 ك.بسكربت
        • pyproject.toml585 بايت
        • test_build_log.py3.2 ك.بسكربت
        • test_build_mode_claims.py3.6 ك.بسكربت
        • test_check_db_quality.py20 ك.بسكربت
        • test_find_databases.py6 ك.بسكربت
        • test_generation_scripts.py12 ك.بسكربت
        • test_script_flags.py6.3 ك.بسكربت
        • test_section_pointers.py7.9 ك.بسكربت
        • test_shell_blocks.py29 ك.بسكربت
        • test_suite_templates.py5 ك.بسكربت
        • test_verify_query_suite.py1.9 ك.بسكربت
        • verify_query_suite.py2.7 ك.بسكربت
      • مجلدworkflows37 ك.ب
        • build-database.md13 ك.ب
        • create-data-extensions.md10 ك.ب
        • run-analysis.md13 ك.ب
      • SKILL.md18 ك.ب
    • مجلدsarif-parsing59 ك.بسكربت
      • مجلدagents231 بايت
        • openai.yaml231 بايت
      • مجلدassets3 ك.ب
        • trail-of-bits-mark.svg3 ك.ب
      • مجلدresources38 ك.بسكربت
        • مجلدfixtures4 ك.ب
          • codeql-no-level.sarif2.2 ك.ب
          • levels-on-results.sarif1.7 ك.ب
        • jq-queries.md7.7 ك.ب
        • sarif_helpers.py13 ك.بسكربت
        • test_sarif_helpers.py14 ك.بسكربت
      • SKILL.md18 ك.ب
    • مجلدsemgrep128 ك.بسكربت
      • مجلدagents229 بايت
        • openai.yaml229 بايت
      • مجلدassets3 ك.ب
        • trail-of-bits-mark.svg3 ك.ب
      • مجلدreferences16 ك.ب
        • rulesets.md7.5 ك.ب
        • scan-modes.md8.5 ك.ب
      • مجلدscripts70 ك.بسكربت
        • merge_sarif.py14 ك.بسكربت
        • run-scans.sh34 ك.بسكربت
        • test_merge_sarif.py22 ك.بسكربت
      • مجلدworkflows24 ك.ب
        • scan-workflow.md24 ك.ب
      • SKILL.md15 ك.ب
  • مجلدtests67 ك.بسكربت
    • codeql_build_harness.js13 ك.بسكربت
    • run_codeql_build_tests.sh770 بايتسكربت
    • run_scan_tests.sh32 ك.بسكربت
    • run_workflow_tests.sh754 بايتسكربت
    • workflow-harness.js20 ك.بسكربت
  • مجلدworkflows48 ك.بسكربت
    • codeql-build.js19 ك.بسكربت
    • semgrep-scan.js29 ك.بسكربت
  • LICENSE20 ك.ب
  • README.md4.7 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةملف سكربت

    في الملف plugins/static-analysis/skills/codeql/scripts/build_log.sh

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/static-analysis/skills/codeql/references/build-fixes.md، السطر 14

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/static-analysis/skills/semgrep/scripts/run-scans.sh، السطر 309

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/static-analysis/skills/semgrep/workflows/scan-workflow.md، السطر 392

  • يحتاج مراجعةتعمية أو تقييم ديناميكي للنص

    في الملف plugins/static-analysis/tests/codeql_build_harness.js، السطر 25

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/static-analysis/tests/run_scan_tests.sh، السطر 69

  • يحتاج مراجعةتعمية أو تقييم ديناميكي للنص

    في الملف plugins/static-analysis/tests/run_scan_tests.sh، السطر 391

  • يحتاج مراجعةتعمية أو تقييم ديناميكي للنص

    في الملف plugins/static-analysis/tests/workflow-harness.js، السطر 25

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/static-analysis/workflows/semgrep-scan.js، السطر 464

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • إضافةمستورد

    blockchain-web3

    Smart contract development with Solidity, DeFi protocol implementation, NFT platforms, and Web3 application architecture

    MITالملفات: 11

  • إضافةمستورد

    building-secure-contracts

    Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework. Includes vulnerability scanners for 6 blockchains and 5 development guideline assistants.

    CC-BY-SA-4.0الملفات: 58

  • إضافةمستورديحتوي سكربتات

    burpsuite-project-parser

    Search and extract data from Burp Suite project files (.burp) for security analysis

    CC-BY-SA-4.0الملفات: 8

  • إضافةمستورديحتوي سكربتات

    c-review

    Comprehensive C/C++ security code review, with coverage verified against a parse of the source

    CC-BY-SA-4.0الملفات: 24

  • إضافةمستورد

    claude-md-management

    Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.

    Apache-2.0الملفات: 10

  • إضافةمستورد

    comprehensive-review

    Multi-perspective code analysis covering architecture, security, and best practices

    MITالملفات: 6