{"id":19626115,"url":"https://github.com/deepsourcecorp/community-analyzers","last_synced_at":"2025-06-11T15:12:22.875Z","repository":{"id":197780166,"uuid":"679159766","full_name":"DeepSourceCorp/community-analyzers","owner":"DeepSourceCorp","description":"Hub of all open-source third party static analyzers supported by DeepSource.","archived":false,"fork":false,"pushed_at":"2024-09-13T07:10:39.000Z","size":391,"stargazers_count":5,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-14T00:03:55.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.deepsource.com/docs/community-analyzers","language":"Python","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/DeepSourceCorp.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":"2023-08-16T08:19:51.000Z","updated_at":"2024-04-02T17:42:33.000Z","dependencies_parsed_at":"2023-12-20T12:35:32.852Z","dependency_job_id":"24bc5930-782f-4714-a779-112867adc35c","html_url":"https://github.com/DeepSourceCorp/community-analyzers","commit_stats":null,"previous_names":["deepsourcecorp/community-analyzers"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSourceCorp%2Fcommunity-analyzers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSourceCorp%2Fcommunity-analyzers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSourceCorp%2Fcommunity-analyzers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSourceCorp%2Fcommunity-analyzers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepSourceCorp","download_url":"https://codeload.github.com/DeepSourceCorp/community-analyzers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224098466,"owners_count":17255507,"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":[],"created_at":"2024-11-11T11:45:00.219Z","updated_at":"2024-11-11T11:45:01.397Z","avatar_url":"https://github.com/DeepSourceCorp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepSource Community Analyzers\n\nHub of all open-source third-party static analyzers supported by DeepSource. Usage docs can be found at [docs.deepsource.com/docs/community-analyzers](https://docs.deepsource.com/docs/community-analyzers)\n\n## Supported Analyzers\n\n| Analyzer name                                                                 | Latest version | Language / Technology |\n| :---------------------------------------------------------------------------- | :------------- | :-------------------- |\n| [stackrox/kube-linter](https://github.com/stackrox/kube-linter)               | 0.6.4          | Kubernetes, Helm      |\n| [aws-cloudformation/cfn-lint](https://github.com/aws-cloudformation/cfn-lint) | 0.83.3         | AWS CloudFormation    |\n| [dart-lang/linter](https://github.com/dart-lang/sdk/tree/main/pkg/linter)     | 3.2.0          | Dart, Flutter         |\n| [crytic/slither](https://github.com/crytic/slither)                           | 0.10.0         | Solidity, Vyper       |\n| [protofire/solhint](https://github.com/protofire/solhint)                     | 4.1.1          | Solidity              |\n\n---\n\n## Development Guide\n\n### Adding a new analyzer\n\nTo add a new analyzer, create a new directory with the analyzer shortcode under the `analyzers` folder.\nThe following are very important to sync analyzers with DeepSource:\n\n1. `.deepsource/analyzer` directory under `analyzer/\u003canalyzer-shortcode\u003e` directory.\n\n   a. It should contain an `analyzer.toml` file with the following fields:\n\n   - `category`: One of \"conf\" (Configuration-as-code), \"lang\" (Language), \"covg\" (Coverage), \"sec\" (security)\n   - `name`: Name for the Analyzer. Analyzer on DeepSource dashboard and the checks on VCS would show up as this name.\n   - `shortcode`: shortcode for the analyzer. This should be same as of the analyzer's directory name. This is the name of the analyzer in the `.deepsource.toml` file.\n   - `status`: \"active\" if analyzer should be live else \"draft\".\n   - `tool_latest_version`: Analyzer's latest version for which issues are synced on DeepSource.\n   - `description`: A readable descrioption for this analyzer.\n\n   b. It should contain am `example.toml` file with a snippet to activate this analyzer in `.deepsource.toml` config.\n\n   c. `logo.svg` file.\n\n2. `.deepsource/issues` directory. This contains all issues detected by the analyzer. Each issue's filemane should be `\u003cissue-shortcode\u003e.toml` or `\u003cissue-shortcode.md\u003e` with the following fields:\n\n   - `title`: Title of the issue. No periods are allowed in the title.\n   - `category`: Category of the issue. Allowed values are: \"bug-risk\", \"doc\", \"style\", \"antipattern\", \"coverage\", \"security\", \"performance\", \"typecheck\", and, \"secrets\".\n   - `description`: Description of the issue. This showld explain the problem in as much detail as possible with possible remediation steps.\n   - `severity`: Severity of the issue. Allowed values are: \"critical\", \"major\" and \"minor\".\n\n3. `CI` directory:\n\nPut example configs of all CIs under this directory. These worlflow / CI configs should run the analyzer, create a sarif report and send it to DeepSource.\n\nEach file should be names as `\u003cprovider\u003e.\u003cextention\u003e`. Example: `github.yml`, `circleci.yml`, etc.`\n\n4. `utils` directory:\n\nIt should contain all the utilities required for the analyzer like issue genrator, issue-map, etc.\nFor example, please check out `analyzers/kube-linter/utils`.\n\n5. Add a sample sarif report from the analyzer in `tests/fixtures` directory. The file should be named as `\u003canalyzer-shortcode\u003e.sarif`.\n   `test_report_parsing` parses all sarif reports under the given directory and checks if the issues are parsed correctly. It is important for that particular test to pass.\n\n### Syncing analyzers and their issues with DeepSource\n\nPush a tag after merging all the changes to the default (master) branch. The `Sync community analyzers` workflow triggers on tag pushes matching `v*` and will sync the analyzers and their issues with DeepSource.\n\n\u003e Note: This action will be done by a member of the DeepSource team; contributors need not create a tag.\n\n### Running tests\n\n- Create and activate a virtual environment\n- Run `pip install -r requirements-dev.txt` to do an editable install\n- Run `pytest` to run tests, and ensure that the coverage report has no missing\n  lines.\n\n### The test suite\n\nThere are minimal tests for the `run_community_analyzer.py` wrapper in\n`tests/test_community_analyzer.py` that do sanity checks, to ensure that the\nissue map is being respected, etc.\n\nFor the SARIF parser itself, the test suite expects you to create two files in\n`sarif-parser/tests/sarif_files`, a SARIF input file with `.sarif` extension,\nand the expected DeepSource output file with the same name, but `.sarif.json`\nextension.\n\n### Type Checking\n\nRun `mypy .`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsourcecorp%2Fcommunity-analyzers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepsourcecorp%2Fcommunity-analyzers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsourcecorp%2Fcommunity-analyzers/lists"}