{"id":13532099,"url":"https://github.com/yokawasa/action-sqlcheck","last_synced_at":"2025-03-26T14:32:14.119Z","repository":{"id":40416730,"uuid":"242476530","full_name":"yokawasa/action-sqlcheck","owner":"yokawasa","description":"A GitHub Action that automatically identifies anti-patterns in SQL queries using sqlcheck when PR is requested. Please [✩Star] if you're using it!","archived":false,"fork":false,"pushed_at":"2023-11-09T02:52:31.000Z","size":123,"stargazers_count":24,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T05:16:49.463Z","etag":null,"topics":["container","github-action","github-actions","sqlcheck","static-analysis"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/sqlcheck-action","language":"Shell","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/yokawasa.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-02-23T07:42:33.000Z","updated_at":"2024-04-29T23:09:15.000Z","dependencies_parsed_at":"2024-06-19T09:17:04.103Z","dependency_job_id":"e2b15576-49ea-4d7e-ab78-220e0e5cbc37","html_url":"https://github.com/yokawasa/action-sqlcheck","commit_stats":{"total_commits":36,"total_committers":3,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"18ce882bc616bf6d19aeee07b342e648e0653b83"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Faction-sqlcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Faction-sqlcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Faction-sqlcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Faction-sqlcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yokawasa","download_url":"https://codeload.github.com/yokawasa/action-sqlcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245670891,"owners_count":20653447,"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":["container","github-action","github-actions","sqlcheck","static-analysis"],"created_at":"2024-08-01T07:01:08.198Z","updated_at":"2025-03-26T14:32:13.850Z","avatar_url":"https://github.com/yokawasa.png","language":"Shell","funding_links":[],"categories":["Community Resources"],"sub_categories":["Static Analysis"],"readme":"# action-sqlcheck\n\nGitHub Actions that automatically identifies anti-patterns in SQL queries using [sqlcheck](https://github.com/jarulraj/sqlcheck) when PR is requested  and comment on the PR if risks are found in the queries  \n\n![](assets/action-sqlcheck-pr-comment.png)\n\n## Usage\n\nSupports `pull_request` event type.\n\n### Inputs\n|Parameter|Required|Default Value|Description|\n|:--:|:--:|:--:|:--|\n|`post-comment`|false|true|Post comment to PR if it's true|\n|`token`|true|\"\"|GitHub Token in order to add comment to PR|\n|`risk-level`|false|3|Set of SQL anti-patterns to check: 1,2, or 3\u003cbr\u003e- 1 (all anti-patterns, default)\u003cbr\u003e- 2 (only medium and high risk anti-patterns)\u003cbr\u003e - 3 (only high risk anti-patterns) |\n|`verbose`|false|false|Add verbose warnings to SQLCheck analysis result|\n|`postfixes`|false|\"sql\"| List of file postfix to match. Supported separators are comma (deprecating) and retrun in multi-line string |\n|`directories`|false|\"\"| Path(s) of directory under which the action check any files whether they are part of the repository or not. By default, the action checks only files in PR queries. By specifying directories the action no longer check files in PR queries but files under the directories (maxdepth 3). Supported separator is return in multi-line string |\n\n### Outputs\n\n|Parameter|Description|\n|:--:|:--:|\n|`issue-found`| A boolean value to indicate an issue was found in the files that sqlcheck action checked |\n\n## Sample Workflow\n\n### Sample1\n\n\u003e .github/workflows/test1.yml\n\n```yaml\nname: sqlcheck workflow1\non: pull_request\n\njobs:\n  sqlcheck:\n    name: sqlcheck job\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@master\n    - uses: yokawasa/action-sqlcheck@v1.4.0\n      with:\n        post-comment: true\n        risk-level: 3\n        verbose: false\n        token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Sample2 ( postfixes and directories inputs )\n\n\u003e .github/workflows/test2.yml\n\n```yaml\nname: sqlcheck workflow2\non: pull_request\n\njobs:\n  sqlcheck:\n    name: sqlcheck job\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@master\n    - uses: yokawasa/action-sqlcheck@v1.4.0\n      id: sqlcheck\n      with:\n        post-comment: true\n        risk-level: 3\n        verbose: true\n        token: ${{ secrets.GITHUB_TOKEN }}\n        postfixes: |\n          sql\n          sqlx\n          schema\n        directories: |\n          sql\n          build/sql_dir\n          tests/sql_dir\n    - name: Get output\n      run: echo \"Issues found in previous step\"\n      if: steps.sqlcheck.outputs.issue-found\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyokawasa%2Faction-sqlcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyokawasa%2Faction-sqlcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyokawasa%2Faction-sqlcheck/lists"}