{"id":25428338,"url":"https://github.com/homoluctus/pyinsights","last_synced_at":"2025-09-13T12:35:58.631Z","repository":{"id":62581029,"uuid":"230361050","full_name":"homoluctus/pyinsights","owner":"homoluctus","description":"The CLI tool to query AWS CloudWatch Logs Insights :mag:","archived":false,"fork":false,"pushed_at":"2020-05-02T16:49:03.000Z","size":1126,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-29T19:52:55.002Z","etag":null,"topics":["aws","cloudwatch","insights","log","python","python3"],"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/homoluctus.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}},"created_at":"2019-12-27T02:46:16.000Z","updated_at":"2022-09-15T09:57:57.000Z","dependencies_parsed_at":"2022-11-03T20:14:53.795Z","dependency_job_id":null,"html_url":"https://github.com/homoluctus/pyinsights","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/homoluctus/pyinsights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fpyinsights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fpyinsights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fpyinsights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fpyinsights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homoluctus","download_url":"https://codeload.github.com/homoluctus/pyinsights/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fpyinsights/sbom","scorecard":{"id":468378,"data":{"date":"2025-08-11","repo":{"name":"github.com/homoluctus/pyinsights","commit":"51f23665d1e60c5994227285bca1d071412d9a59"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pull_request.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/pull_request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/pyinsights/release.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pull_request.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/pull_request.yml:50","Warn: pipCommand not pinned by hash: .github/workflows/pull_request.yml:72","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:21","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T13:07:09.231Z","repository_id":62581029,"created_at":"2025-08-19T13:07:09.231Z","updated_at":"2025-08-19T13:07:09.231Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274961571,"owners_count":25381844,"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-09-13T02:00:10.085Z","response_time":70,"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":["aws","cloudwatch","insights","log","python","python3"],"created_at":"2025-02-17T01:38:34.636Z","updated_at":"2025-09-13T12:35:58.578Z","avatar_url":"https://github.com/homoluctus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyInsights\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyinsights)\n![PyPI](https://img.shields.io/pypi/v/pyinsights?color=blue)\n![GitHub](https://img.shields.io/github/license/homoluctus/pyinsights)\n\nA CLI tool To query CloudWatch Logs Insights.\n\n![usage1](https://raw.githubusercontent.com/homoluctus/pyinsights/master/images/usage1.png)\n\n![usage2](https://raw.githubusercontent.com/homoluctus/pyinsights/master/images/usage2.png)\n\n**ToC**\n\n\u003c!-- TOC depthFrom:2 --\u003e\n\n- [Usage](#usage)\n  - [Write Configuration](#write-configuration)\n  - [Execute command](#execute-command)\n- [Configuration](#configuration)\n  - [version](#version)\n  - [log_group_name](#log_group_name)\n  - [query_string](#query_string)\n  - [duration](#duration)\n    - [type: string](#type-string)\n    - [type: object](#type-object)\n  - [limit](#limit)\n- [CLI Options](#cli-options)\n- [Environment Variable](#environment-variable)\n\n\u003c!-- /TOC --\u003e\n\n## Usage\n\n### Write Configuration\n\nWrite configuration to `pyinsights.yml` like:\n\n```yaml\nversion: '1.0'\nlog_group_name:\n  - '/ecs/sample'\nquery_string: 'field @message | filter @message like /ERROR/'\nduration: '30m'\nlimit: 10\n```\n\nI wrote examples, so see [examples folder](https://github.com/homoluctus/pyinsights/tree/master/examples).\n\n### Execute command\n\n```bash\npyinsights -c pyinsights.yml -p aws_profile -r region\n```\n\n## Configuration\n\n### version\n\n|Type|Required|\n|:--:|:--:|\n|string|true|\n\nChoose configuration version from ['1.0']\n\n### log_group_name\n\n|Type|Required|\n|:--:|:--:|\n|array|true|\n\nTarget log group names to query\n\n### query_string\n\n|Type|Required|\n|:--:|:--:|\n|string or array|true|\n\nSpecify CloudWatch Logs Insights query commands.\nPlease see [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).\n\n:warning: If query_string type is array, Unix-style pipe `|` is not required. Execute in order from the top.\n\nex)\n\n```yml\nquery_string:\n  - 'field @message'\n  - 'fileter @message like /WARN/'\n```\n\nEqual to\n\n```yml\nquery_string: 'field @message | fileter @message like /WARN/'\n```\n\n### duration\n\n|Type|Required|\n|:--:|:--:|\n|string or object|true|\n\n#### type: string\n\nSpecify weeks, days, hours, minutes or seconds unit.\n\n```\nweeks = w\ndays = d\nhours = h\nminutes = m\nseconds = s\n```\n\nex)\n\n```yml\nduration: 10h\n```\n\n#### type: object\n\nSpecify `start_time` and `end_time`.\nThe format must be `YYYY-MM-DD HH:MM:SS`.\n\nex)\n\n```yml\nduration:\n  start_time: '2020-01-01 00:00:00'\n  end_time: '2020-01-01 01:00:00'\n```\n\n### limit\n\n|Type|Required|\n|:--:|:--:|\n|integer|false|\n\nThe number of log to fetch.\nOf course, you can specify `limit` in [query_string](#query_string).\n\n## CLI Options\n\n|Option|Required|Description|\n|:--:|:--:|:--|\n|-c, --config|true|Specify yaml configuration by absolute or relative path|\n|-f, --format|false|Choose from json or table|\n|-p, --profile|false|AWS profile name|\n|-r, --region|false|AWS region|\n|-q, --quiet|false|Suppress progress message|\n|-o, --output|false|Specify the filename to output the query result|\n|-v, --version|false|Show version|\n\n## Environment Variable\n\nIf `profile` and `region` options are not specified, AWS Credentials must be set as environment variables.\n\n- AWS_ACCESS_KEY_ID\n- AWS_SECRET_ACCESS_KEY\n- AWS_DEFAULT_REGION\n\nPlease see [Environment Variable Configuration](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#environment-variable-configuration) for the detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomoluctus%2Fpyinsights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomoluctus%2Fpyinsights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomoluctus%2Fpyinsights/lists"}