{"id":13804497,"url":"https://github.com/avnu-labs/semgrep-cairo-rules","last_synced_at":"2025-05-13T17:32:24.142Z","repository":{"id":162996618,"uuid":"638199465","full_name":"avnu-labs/semgrep-cairo-rules","owner":"avnu-labs","description":"Semgrep rules for Cairo 1.0","archived":false,"fork":false,"pushed_at":"2023-08-28T07:26:49.000Z","size":25,"stargazers_count":17,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-05T01:11:05.612Z","etag":null,"topics":["cairo","cairo-lang","semgrep"],"latest_commit_sha":null,"homepage":"","language":"Cairo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avnu-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-09T09:38:32.000Z","updated_at":"2024-05-06T09:12:21.000Z","dependencies_parsed_at":"2024-01-21T20:13:56.269Z","dependency_job_id":null,"html_url":"https://github.com/avnu-labs/semgrep-cairo-rules","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avnu-labs%2Fsemgrep-cairo-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avnu-labs%2Fsemgrep-cairo-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avnu-labs%2Fsemgrep-cairo-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avnu-labs%2Fsemgrep-cairo-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avnu-labs","download_url":"https://codeload.github.com/avnu-labs/semgrep-cairo-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225247887,"owners_count":17444135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cairo","cairo-lang","semgrep"],"created_at":"2024-08-04T01:00:48.861Z","updated_at":"2024-11-18T20:32:02.164Z","avatar_url":"https://github.com/avnu-labs.png","language":"Cairo","funding_links":[],"categories":["Additional developer resources"],"sub_categories":[],"readme":"# Semgrep - Cairo Rules\n\n\u003e **Warning** \n\u003e This repository contains highly experimental rules and doesn't guarantee security of your Cairo contract in anyway. We encourage anyone to participate and share their rules. You can find rule ideas [here](RULES.md)\n\nAt present, the majority of the rules located here serve primarily as samples to demonstrate the process of constructing rules for Cairo 1.0.\n\nThis initiative is an inspiration of the awesome job that [Trail Of Bit did for Cairo 0 with Amarna](https://blog.trailofbits.com/2022/04/20/amarna-static-analysis-for-cairo-programs/)\n\n## How to Use\n\nWe assume that you have Semgrep already installed, otherwise you can refer to the following [doc](https://github.com/returntocorp/semgrep).\n\n1. Get the last version of the rules that you can find on the [release page](https://github.com/avnu-labs/semgrep-cairo-rules/releases)\n2. From the terminal, call Semgrep with the rule you've downloaded in 1.\n```\nsemgrep scan --config path/to/rules.yaml path/to/cairo_code\n```\n\n## Contribution\n\nWe strongly encourage anyone who wants to participate in improving the security of Starknet smart contracts to contribute to this repository either by creating new rules or improving existing ones.\n\nHere are the guidelines to contribute\n1. Create/Modify rules in `rules/`\n2. Add in `tests` one or several test case of your rule. We rely on the Semgrep testing facilities for our testing suite so please read the following [doc](https://semgrep.dev/docs/writing-rules/testing-rules) to understand how it works.\n3. To test the rules you need to have Semgrep installed. Run the following command\n```\nsemgrep scan --config rules --test tests\n```\n4. If all tests are `ok`, create a new file in `changelog.d` and document it according to `changelog.d/README.md`\n5. Open a PR where you shortly describe the purpose of your change\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favnu-labs%2Fsemgrep-cairo-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favnu-labs%2Fsemgrep-cairo-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favnu-labs%2Fsemgrep-cairo-rules/lists"}