Skip to content
ai-supply.store
탐색카테고리리더보드커뮤니티Agent APIFAQ
로그인무료 가입
catalog / Coding / ast-grep
◆SkillCodingFree

ast-grep

Fast, language-agnostic structural search, lint, and rewrite tool that runs codemods using AST patterns written like code.

@ai-supply
설치 수17k
⟳ upstream 0.45.1 · updated 10d ago
↗ 소스 저장소
← More CodingCoding leaderboard →How we grade security →Source ↗
! Grade B · 75/100 · ReviewSecurity assessment
✓No compromise signals11capabilities surfaced1known CVE9of 20 OWASP controls clear
External endpoints declaredExternal endpoints declaredExternal endpoints declaredExternal endpoints declared
scanned 9d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

ast-grep

ast-grep is a Rust-based CLI for structural code search and rewriting. Instead of regex, you write patterns that look like the code you want to match, and ast-grep operates on the syntax tree — so a single rule can find and rewrite constructs reliably across an entire codebase. It powers large-scale migrations and custom lint rules for many languages via Tree-sitter.

Key features

  • Pattern matching on the AST, not text — precise and safe rewrites
  • Interactive codemods and batch rewriting from the command line
  • YAML rule files for reusable lint and migration rules
  • Multi-language support (JS/TS, Python, Rust, Go, Java, C, and more)
  • Fast parallel search over huge repositories

Perfect for API migrations, deprecation sweeps, and enforcing codebase-wide conventions — a scriptable engine an agent can drive to apply consistent, verifiable code changes.

Curated mirror of the open-source ast-grep (MIT). Get it from the source.

Rating rank
#1
of 27 in Coding
Install rank
#20
of 27 in Coding
Security score
75/100 · B
review
Security rank
#19
of 27 in Coding
Installs
17k
cat avg 157k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Coding leaderboard →
! Security: Review · 7575/100 · grade Bscanned 9d ago
✓ no compromise signals12 risk-surface · 6/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

What this capability can do · med confidence (static)
⚑ filesystem⚑ shell⚑ network⚑ secretsinstall: postinstall
egress → ast-grep.github.io, stackoverflow.com, discord.gg, app.codecov.io, codecov.io, img.shields.io, repology.org, gurubase.io +31
skill: Feature Request12 scripts

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM03Supply Chaincritical
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 10 npm dependencies declared · ast-grep-ast-grep-e8c70a7/crates/napi/package.jsonrisk surface
•Dependency manifest — 4 npm dependencies declared · ast-grep-ast-grep-e8c70a7/crates/wasm/package.jsonrisk surface
•Dependency manifest — 1 npm dependencies declared · ast-grep-ast-grep-e8c70a7/npm/package.jsonrisk surface
•npm install-lifecycle script — postinstall run on install — executes arbitrary code · ast-grep-ast-grep-e8c70a7/npm/package.json (CWE-506)risk surface
•Vulnerable dependencies — 58 known vulnerabilities in: ansi_term@0.12.1, brace-expansion@2.0.3, brace-expansion@5.0.4, js-yaml@3.14.1, js-yaml@4.2.0, lodash@4.17.21, picomatch@2.3.1, picomatch@4.0.2 (CWE-1395)known CVE · -25 pts
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — child_process exec · ast-grep-ast-grep-e8c70a7/crates/napi/index.js (CWE-78)risk surface
⚠LLM06Excessive Agencymedium
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · ast-grep-ast-grep-e8c70a7/.editorconfigrisk surface
•External endpoints declared — 4 distinct host(s) · ast-grep-ast-grep-e8c70a7/.github/ISSUE_TEMPLATE/config.ymlrisk surface
•External endpoints declared — 6 distinct host(s) · ast-grep-ast-grep-e8c70a7/.gitignorerisk surface
•External endpoints declared — 2 distinct host(s) · ast-grep-ast-grep-e8c70a7/Cargo.tomlrisk surface
•External endpoints declared — 19 distinct host(s) · ast-grep-ast-grep-e8c70a7/README.mdrisk surface
•External endpoints declared — 5 distinct host(s) · ast-grep-ast-grep-e8c70a7/crates/cli/src/utils/error_context.rsrisk surface
•External endpoints declared — 3 distinct host(s) · ast-grep-ast-grep-e8c70a7/crates/core/src/source.rsrisk surface
•External endpoints declared — 13 distinct host(s) · ast-grep-ast-grep-e8c70a7/crates/language/src/lib.rsrisk surface
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · ast-grep-ast-grep-e8c70a7/crates/config/src/rule/relational_rule.rs (CWE-835)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM01Prompt InjectionPassed
✓LLM02Sensitive Information DisclosurePassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM07System Prompt LeakagePassed
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chaincritical
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 10 npm dependencies declared · ast-grep-ast-grep-e8c70a7/crates/napi/package.jsonrisk surface
•Dependency manifest — 4 npm dependencies declared · ast-grep-ast-grep-e8c70a7/crates/wasm/package.jsonrisk surface
•Dependency manifest — 1 npm dependencies declared · ast-grep-ast-grep-e8c70a7/npm/package.jsonrisk surface
•npm install-lifecycle script — postinstall run on install — executes arbitrary code · ast-grep-ast-grep-e8c70a7/npm/package.json (CWE-506)risk surface
•Vulnerable dependencies — 58 known vulnerabilities in: ansi_term@0.12.1, brace-expansion@2.0.3, brace-expansion@5.0.4, js-yaml@3.14.1, js-yaml@4.2.0, lodash@4.17.21, picomatch@2.3.1, picomatch@4.0.2 (CWE-1395)known CVE · -25 pts
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — child_process exec · ast-grep-ast-grep-e8c70a7/crates/napi/index.js (CWE-78)risk surface
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (7) · hygiene / uncategorized
•Unrecognized file type — '.editorconfig' is not on the allowlist · ast-grep-ast-grep-e8c70a7/.editorconfigrisk surface
•Unrecognized file type — '.gitignore' is not on the allowlist · ast-grep-ast-grep-e8c70a7/.gitignorerisk surface
•Unrecognized file type — '.?' is not on the allowlist · ast-grep-ast-grep-e8c70a7/LICENSErisk surface
•Unrecognized file type — '.gitattributes' is not on the allowlist · ast-grep-ast-grep-e8c70a7/crates/napi/.gitattributesrisk surface
•Unrecognized file type — '.vue' is not on the allowlist · ast-grep-ast-grep-e8c70a7/crates/napi/__test__/test.vuerisk surface
•Unrecognized file type — '.pyi' is not on the allowlist · ast-grep-ast-grep-e8c70a7/crates/pyo3/ast_grep_py/ast_grep_py.pyirisk surface
•Unrecognized file type — '.mjs' is not on the allowlist · ast-grep-ast-grep-e8c70a7/crates/wasm/__test__/index.spec.mjsrisk surface
✔ verified source · pinned ast-grep-ast-grep-e8c70a7
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/ast-grep-structural-codemod/check). Click a policy:

Consume ast-grep programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/ast-grep-structural-codemod

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/ast-grep-structural-codemod/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add ast-grep-structural-codemod

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/ast-grep-structural-codemod/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "ast-grep-structural-codemod" })
OpenAPI spec →
vlatest
! Security: Review · 751mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

무료로 제공하는 보안 검증 AI 역량 — skill, MCP, plugin, agent, 데이터셋을 비롯한 모든 항목에 보안 점수를 매기고 최신성을 추적하며, 사람과 agent 모두를 위해 만들었습니다.

api · v3.1status · all green
문의하기
support@ai-supply.storesecurity@ai-supply.store
카탈로그
  • 탐색
  • 카테고리
  • 리더보드
  • 벤치마크
  • 보안
  • Scan a repo
커뮤니티
  • 커뮤니티
  • FAQ
에이전트용
  • 빠른 시작 (60s)
  • 에이전트 승인
  • Agent API
  • OpenAPI 사양
빌더용
  • 게시
  • 대시보드
계정
  • 계정 만들기
  • 로그인
  • 설정
법적 정보
  • 이용약관
  • 게시자 계약
  • 이용 정책
  • 개인정보 처리방침