{"id":14263247,"url":"https://github.com/coderabbitai/ast-grep-essentials","last_synced_at":"2026-03-06T15:28:05.983Z","repository":{"id":227542581,"uuid":"771209529","full_name":"coderabbitai/ast-grep-essentials","owner":"coderabbitai","description":"Community-led collection of essential ast-grep rules.","archived":false,"fork":false,"pushed_at":"2025-07-24T12:15:51.000Z","size":597,"stargazers_count":59,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-13T09:45:07.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderabbitai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-12T22:14:31.000Z","updated_at":"2025-08-11T07:05:27.000Z","dependencies_parsed_at":"2024-03-13T22:30:53.188Z","dependency_job_id":"d1abc339-d888-4a12-9828-7e9a25b5eb01","html_url":"https://github.com/coderabbitai/ast-grep-essentials","commit_stats":null,"previous_names":["coderabbitai/ast-grep-rules","coderabbitai/ast-grep-essentials"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderabbitai/ast-grep-essentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderabbitai%2Fast-grep-essentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderabbitai%2Fast-grep-essentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderabbitai%2Fast-grep-essentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderabbitai%2Fast-grep-essentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderabbitai","download_url":"https://codeload.github.com/coderabbitai/ast-grep-essentials/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderabbitai%2Fast-grep-essentials/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30183199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-22T13:04:46.800Z","updated_at":"2026-03-06T15:28:05.965Z","avatar_url":"https://github.com/coderabbitai.png","language":null,"funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# AST-GREP Essentials\n\n[![CodeRabbit Reviews](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.coderabbit.ai%2Fstats%2Fgithub%2Fcoderabbitai%2Fast-grep-essentials\u0026query=%24.reviews\u0026suffix=%20Reviews\u0026style=for-the-badge\u0026label=CodeRabbit\u0026labelColor=%23FF570A\u0026color=%2325BAB1)](https://app.coderabbit.ai/login)\n\n## Overview\n\n`ast-grep-essentials` is a community-led collection of\n[`ast-grep`](https://ast-grep.github.io) rules to help developers mitigate\nsecurity vulnerabilities and enforce best practices in their codebases.\n\n\u003e [!TIP]\n\u003e\n\u003e Please read the CodeRabbit\n\u003e [documentation](https://docs.coderabbit.ai/guides/review-instructions) to\n\u003e understand how to use `ast-grep` in [CodeRabbit](https://coderabbit.ai)\n\u003e reviews.\n\n## Structure\n\n```plaintext\nast-grep-essentials\n│\n├── rules\n│   ├── javascript\n│   │   ├── jwt\n│   │   │   ├── rule1.yml\n│   │   │   ├── rule2.yml\n│   │   │   └── ...\n│   │   ├── ...\n│   │   └── ...\n│   └── go\n│       ├── jwt-go\n│       │   ├── rule1.yml\n│\n├── utils\n│   ├── script1.yml\n│   ├── script2.yml\n│   └── ...\n│\n└── tests\n    ├── javascript\n    │   ├── rule1-test.yml\n    │   ├── rule2-test.yml\n    │   └── ...\n    ├── ...\n    └── ...\n```\n\nThe package is organized into three main directories:\n\n- `rules`: Contains `ast-grep` rules categorized by language and security\n  category.\n- `utils`: Houses utility configs to support rule management.\n- `tests`: Includes test cases for validating the effectiveness of the rules\n  across different languages.\n\n### Rules Structure\n\nWithin the `rules` directory, you'll find the following structure:\n\n- `language`: Each language supported by `ast-grep` (e.g., Python, JavaScript).\n- `category`: Rules categorized based on security concerns (e.g., Input\n  Validation, Authentication).\n\n#### Rule file structure\n\n\u003e [!TIP]\n\u003e\n\u003e Read the `ast-grep` \u003e documentation to understand the\n\u003e [rule configuration](https://ast-grep.github.io/reference/yaml.html) and the\n\u003e [rule object properties](https://ast-grep.github.io/reference/rule.html).\n\nEach rule file should have the following structure:\n\n```yaml\n# Unique across the package, not just the language\nid: rule-id\n# The language property that the rule is going to get matched against\nlanguage: \"language\" # e.g., javaScript, go\n# A short description of the rule\nmessage: \"Rule message\"\n# A more detailed explanation of the rule\nnote: \"Rule note\"\n# Severity level of the rule (e.g., hint, warning)\nseverity: \"severity\"\n# ast-grep rule property, check documentation for more information\nrule: ...\n```\n\n### Tests Structure\n\nInside the `tests` directory, tests are organized by language:\n\n- `language`: Test cases specific to the corresponding language's rules.\n- `rule-file`: each test rule file should have by convention the\n  `rule-file-name-test.yml` format.\n\n\u003e [!NOTE]\n\u003e\n\u003e Tests should follow the `ast-grep` testing rules format. Please refer to the\n\u003e `ast-grep`\n\u003e [documentation](https://ast-grep.github.io/guide/test-rule.html#test-case-configuration)\n\n## Contributing\n\nThis project relies on the community to contribute rules. Please open a pull\nrequest with your rules and tests. Please ensure that the rules are truly\nessential and have a low false positive rate.\n\n## Community\n\nJoin the discussion on our [Discord server](https://discord.gg/C3rGCxHn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderabbitai%2Fast-grep-essentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderabbitai%2Fast-grep-essentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderabbitai%2Fast-grep-essentials/lists"}