{"id":19830720,"url":"https://github.com/crytic/solana-lints","last_synced_at":"2025-10-13T05:33:30.867Z","repository":{"id":47023849,"uuid":"497158720","full_name":"crytic/solana-lints","owner":"crytic","description":"Lints based on the Sealevel Attacks","archived":false,"fork":false,"pushed_at":"2025-09-04T10:39:40.000Z","size":1764,"stargazers_count":44,"open_issues_count":13,"forks_count":10,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-10T06:37:12.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/crytic.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-27T22:56:26.000Z","updated_at":"2025-07-28T16:01:25.000Z","dependencies_parsed_at":"2024-06-14T04:26:35.438Z","dependency_job_id":"4128da8a-2087-46cf-be01-0fea0fe18707","html_url":"https://github.com/crytic/solana-lints","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crytic/solana-lints","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fsolana-lints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fsolana-lints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fsolana-lints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fsolana-lints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crytic","download_url":"https://codeload.github.com/crytic/solana-lints/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fsolana-lints/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013705,"owners_count":26085393,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-12T11:25:00.582Z","updated_at":"2025-10-13T05:33:30.845Z","avatar_url":"https://github.com/crytic.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Trail of Bits Solana lints\n\nSolana Breakpoint 2022 [slides] [video]\n\nEach subdirectory of [`lints`] contains a Solana lint in the form of a [Dylint] library.\n\nThe lints are inspired by the [Sealevel Attacks]. (See also @pencilflip's [Twitter thread].)\n\nThe current lints are:\n\n| Library                                                          | Description                                                                                                                              | Anchor             | Non Anchor         |\n| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------ |\n| [`arbitrary_cpi`](lints/arbitrary_cpi)                           | lint for [5-arbitrary-cpi](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/5-arbitrary-cpi)                           | :heavy_check_mark: | :heavy_check_mark: |\n| [`bump_seed_canonicalization`](lints/bump_seed_canonicalization) | lint for [6-bump-seed-canonicalization](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/7-bump-seed-canonicalization) |                    | :heavy_check_mark: |\n| [`insecure_account_close`](lints/insecure_account_close)         | lint for [9-closing-accounts](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/9-closing-accounts)                     | :heavy_check_mark: | :heavy_check_mark: |\n| [`missing_owner_check`](lints/missing_owner_check)               | lint for [2-owner-checks](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/2-owner-checks)                             | :heavy_check_mark: | :heavy_check_mark: |\n| [`missing_signer_check`](lints/missing_signer_check)             | lint for [0-signer-authorization](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/0-signer-authorization)             | :heavy_check_mark: | :heavy_check_mark: |\n| [`sysvar_get`](lints/sysvar_get)                                 | Reports uses of `Sysvar::from_account_info` instead of `Sysvar::get`                                                                     | :heavy_check_mark: | :heavy_check_mark: |\n| [`type_cosplay`](lints/type_cosplay)                             | lint for [3-type-cosplay](https://github.com/coral-xyz/sealevel-attacks/tree/master/programs/3-type-cosplay)                             |                    | :heavy_check_mark: |\n\n## Usage\n\nTo use these lints, do the following:\n\n1. Install `cargo-dylint` and `dylint-link`:\n\n   ```sh\n   cargo install cargo-dylint dylint-link\n   ```\n\n2. Add the following to your workspace's `Cargo.toml` file:\n\n   ```toml\n   [workspace.metadata.dylint]\n   libraries = [\n       { git = \"https://github.com/crytic/solana-lints\", pattern = \"lints/*\" },\n   ]\n   ```\n\n3. Run `cargo-dylint`:\n   ```sh\n   cargo dylint --all --workspace\n   ```\n\n[`lints`]: lints\n[dylint]: https://github.com/trailofbits/dylint\n[sealevel attacks]: https://github.com/coral-xyz/sealevel-attacks\n[slides]: docs/Dylint%20Can%20Help%20you%20Write%20More%20Secure%20Solana%20Contracts.pdf\n[twitter thread]: https://threadreaderapp.com/thread/1483880018858201090.html\n[video]: https://www.youtube.com/watch?v=AulT4TaPf1M\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fsolana-lints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrytic%2Fsolana-lints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fsolana-lints/lists"}