{"id":15293072,"url":"https://github.com/wreos/dart_secrets_scanner","last_synced_at":"2026-05-18T06:34:27.843Z","repository":{"id":257798648,"uuid":"862971780","full_name":"Wreos/dart_secrets_scanner","owner":"Wreos","description":"dart_secrets_scanner is a command-line tool designed to scan Dart and related files in Flutter projects for hardcoded sensitive information such as API keys, tokens, passwords, and other credentials.","archived":false,"fork":false,"pushed_at":"2024-09-26T20:38:18.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T04:50:50.375Z","etag":null,"topics":["dart","devsecops","flutter","scanner","security","security-tools"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/dart_secrets_scanner","language":"Dart","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/Wreos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-09-25T13:54:12.000Z","updated_at":"2024-10-03T19:17:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"df8d2cbc-b1e9-4824-a122-e7e6b2ad2188","html_url":"https://github.com/Wreos/dart_secrets_scanner","commit_stats":null,"previous_names":["wreos/dart_secrets_scanner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Wreos/dart_secrets_scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wreos%2Fdart_secrets_scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wreos%2Fdart_secrets_scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wreos%2Fdart_secrets_scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wreos%2Fdart_secrets_scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wreos","download_url":"https://codeload.github.com/Wreos/dart_secrets_scanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wreos%2Fdart_secrets_scanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272959415,"owners_count":25022056,"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-08-31T02:00:09.071Z","response_time":79,"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":["dart","devsecops","flutter","scanner","security","security-tools"],"created_at":"2024-09-30T16:39:27.943Z","updated_at":"2026-05-18T06:34:27.832Z","avatar_url":"https://github.com/Wreos.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dart secrets scanner\n\n`dart_secrets_scanner` is a command-line CLI tailored to Dart and Flutter projects. It detects MASVS-aligned hardcoded secrets (API keys, OAuth tokens, config strings, certificates, etc.) across code and configuration files, honors project-level exclusions, and can run automatically via GitHub Actions before publishing.\n\n## Features\n\n- MASVS-first regex detection for known secrets (GitHub/GitLab PATs, AWS keys, Google API keys, Stripe keys, URLs with embedded credentials).\n- Context-aware heuristics that prioritize `.json`, `.yaml`, `.env`, and `.plist` files and flag strings whose keys contain keywords such as `apiKey`, `secrets`, `client_id`, or any custom context keywords defined in your configuration.\n- Config-driven exclusions: adjust which variable names or paths the scanner ignores via `dart_secrets_scanner.yaml`.\n- Sample config in the repository (`dart_secrets_scanner.yaml.example`) that can be copied and tuned for your project.\n- CI-ready: the GitHub Actions workflow runs `dart analyze`, `dart test`, and `dart pub publish --dry-run`, and it can publish automatically when you push a `v*` tag (with `PUB_TOKEN` secret).\n\n## Getting Started\n\n### Installation\n\n1. Add the package to your Dart/Flutter project dependencies:\n   ```yaml\n   dart_secrets_scanner: ^2.0.0\n   ```\n2. Fetch dependencies:\n   ```bash\n   dart pub get\n   ```\n\n### Usage\n\nRun the scanner from your project root:\n\n```bash\ndart run dart_secrets_scanner\n```\n\nOn success the CLI prints `✅ No hardcoded secrets were detected.`; when secrets are found each result shows the file and line context with a 🔒 emoji.\n\n## Configuration\n\nCreate a `dart_secrets_scanner.yaml` file beside your `pubspec.yaml` (you can start from `dart_secrets_scanner.yaml.example`). The scanner loads the `scanner` section with the following options:\n\n- `exclude_variable_names`: list variable names (`apiKey`, `format`, etc.) that should never be reported.\n- `exclude_paths`: list directory fragments (`tool/cache`, `scripts/generated`, etc.) that the scanner should skip entirely.\n- `context_keywords`: extra keywords (for example `firebase_token` or `digicert_cert`) that should trigger MASVS-style context detection when found in config files.\n\nExample:\n\n```yaml\nscanner:\n  exclude_variable_names:\n    - format\n  exclude_paths:\n    - tool/cache\n  context_keywords:\n    - firebase_token\n```\n\n## GitHub Actions\n\nThe repository ships with a workflow that:\n\n1. Runs `dart pub get`, `dart analyze`, and `dart test` for pushes to `main`, PRs, and tags.\n2. When a `v*` tag is pushed, it runs `dart pub publish --dry-run` and, if a `PUB_TOKEN` secret is configured, `dart pub publish --force` so the release can be fully automated.\n\nAdd a `PUB_TOKEN` secret to your repository to enable automatic publishing (see [Publishing to pub.dev](https://dart.dev/tools/pub/publishing)).\n\n## Contribution\n\nFeel free to open an issue or contribute to this repository if you'd like to add new features or improve the existing ones.\n\n## License\n\nThis project is licensed under the MIT License.\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwreos%2Fdart_secrets_scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwreos%2Fdart_secrets_scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwreos%2Fdart_secrets_scanner/lists"}