{"id":19322638,"url":"https://github.com/picatz/rsalint","last_synced_at":"2025-04-22T19:31:40.775Z","repository":{"id":38094103,"uuid":"232264177","full_name":"picatz/rsalint","owner":"picatz","description":"🕵️‍♀️ @golang linter for the crypto/rsa package.","archived":false,"fork":false,"pushed_at":"2025-03-10T12:56:47.000Z","size":32,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T03:05:27.151Z","etag":null,"topics":["cryptography","golang","linter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/picatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-01-07T07:05:32.000Z","updated_at":"2025-02-17T19:01:43.000Z","dependencies_parsed_at":"2024-11-10T01:42:06.334Z","dependency_job_id":"71cfbcb5-d7fa-4f89-b060-ab851c0cc274","html_url":"https://github.com/picatz/rsalint","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Frsalint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Frsalint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Frsalint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Frsalint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picatz","download_url":"https://codeload.github.com/picatz/rsalint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250308423,"owners_count":21409267,"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":["cryptography","golang","linter"],"created_at":"2024-11-10T01:41:55.026Z","updated_at":"2025-04-22T19:31:40.332Z","avatar_url":"https://github.com/picatz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsalint\n\n 🕵️‍♀️ Linter for the [`crypto/rsa`](https://golang.org/pkg/crypto/rsa/) package.\n\n## Install\n\n```console\n$ go install github.com/picatz/rsalint/cmd/rsalint@latest\n```\n\n## Vulnerable Implementation\n\n```go\npackage main\n\nimport (\n    \"crypto/rsa\"\n    \"fmt\"\n    \"math/rand\"\n)\n\nfunc main() {\n    privateKey, err := rsa.GenerateKey(rand.New(rand.NewSource(0)), 1024)\n    if err != nil {\n        panic(err)\n    }\n    fmt.Println(privateKey)\n}\n```\n\n`rsalint` can identify a number of potential security problems:\n\n- Weak entropy source (not using `crypto/rand.Reader`).\n- Weak number of bits (less than `2048`, and not a multiple of `8`).\n- Weak number of primes for the given number of bits.\n- Deprecated functions (`rsa.GenerateMultiPrimeKey`).\n- Insecure encryption schemes (`rsa.EncryptPKCS1v15`).\n\n## Usage\n\n```console\n$ rsalint ./path/to/vulnerable/code/...\n./path/to/vulnerable/code/main.go:10:37: use the crypto/rand.Reader instead for a cryptographically secure random number generator\n./path/to/vulnerable/code/main.go:10:66: use 2048 bits or greater\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Frsalint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicatz%2Frsalint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Frsalint/lists"}