{"id":14449383,"url":"https://github.com/frappe/semgrep-rules","last_synced_at":"2025-04-09T12:04:13.345Z","repository":{"id":38314461,"uuid":"420141502","full_name":"frappe/semgrep-rules","owner":"frappe","description":"Semgrep rules specific to Frappe Framework","archived":false,"fork":false,"pushed_at":"2025-03-21T11:31:15.000Z","size":53,"stargazers_count":45,"open_issues_count":4,"forks_count":32,"subscribers_count":17,"default_branch":"develop","last_synced_at":"2025-04-02T11:05:14.707Z","etag":null,"topics":["erpnext","frappe-framework","lint","semgrep"],"latest_commit_sha":null,"homepage":"","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/frappe.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}},"created_at":"2021-10-22T15:03:10.000Z","updated_at":"2025-03-21T11:31:19.000Z","dependencies_parsed_at":"2023-12-27T14:30:21.990Z","dependency_job_id":"e12bfe4c-eea9-4c9a-953e-c222a3e1d85a","html_url":"https://github.com/frappe/semgrep-rules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fsemgrep-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fsemgrep-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fsemgrep-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fsemgrep-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frappe","download_url":"https://codeload.github.com/frappe/semgrep-rules/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036064,"owners_count":21037092,"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":["erpnext","frappe-framework","lint","semgrep"],"created_at":"2024-09-01T08:01:15.579Z","updated_at":"2025-04-09T12:04:13.326Z","avatar_url":"https://github.com/frappe.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Frappe Semgrep rules\n\nSemgrep rules specific to [Frappe Framework](https://github.com/frappe/frappe)\n\nThese rules guard against typical mistakes or bad practices while working on Frappe Framework apps. Frappe's own apps also use this to simplify repetitive checks in code review process.\n\n## How to Use in my app\n\n### Github Action\n\nYou can use a GitHub Action to automatically validate changes with semgrep rules on all PRs. \n\n```yaml\nname: Linters\n\non:\n  pull_request: { }\n\njobs:\n  linters:\n    name: Frappe Linter\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n\n      - name: Set up Python\n        uses: actions/setup-python@v4\n        with:\n          python-version: '3.10'\n\n      - name: Download Semgrep rules\n        run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules\n\n      - name: Download semgrep\n        run: pip install semgrep\n\n      - name: Run Semgrep rules\n        run: semgrep ci --config ./frappe-semgrep-rules/rules\n```\n\n\n### Manually / running semgrep locally\n\n- Install and verify that semgrep works `semgrep --version`\n- clone the rules repository with `git clone`\n- Run semgrep specifying rules folder as config `semgrep --config=~/path/to/frappe-semgrep-rules/rules your_app_folder`\n\n\nTip: You can optionally pass `--severity=ERROR` to ignore rules that produce warnings and only catch errors. \n\n\n## How to contribute new rules\n\n- Read how Semgrep works: [Getting started with semgrep rules](https://semgrep.dev/docs/writing-rules/overview/)\n- Write a rule. Make sure it doesn't have too many false positives.\n- Write positive and negative test cases for rule you are adding: [Testing rules](https://semgrep.dev/docs/writing-rules/testing-rules/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Fsemgrep-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrappe%2Fsemgrep-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Fsemgrep-rules/lists"}