{"id":40369244,"url":"https://github.com/mxab/pre-commit-trivy","last_synced_at":"2026-01-20T11:02:56.481Z","repository":{"id":151275076,"uuid":"568022478","full_name":"mxab/pre-commit-trivy","owner":"mxab","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-03T09:14:09.000Z","size":16,"stargazers_count":22,"open_issues_count":4,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T10:24:12.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/mxab.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":"2022-11-19T07:42:39.000Z","updated_at":"2025-04-03T09:10:40.000Z","dependencies_parsed_at":"2023-11-14T08:42:23.266Z","dependency_job_id":"7ad0639b-32da-4f81-b051-01db7916f1cf","html_url":"https://github.com/mxab/pre-commit-trivy","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/mxab/pre-commit-trivy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxab%2Fpre-commit-trivy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxab%2Fpre-commit-trivy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxab%2Fpre-commit-trivy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxab%2Fpre-commit-trivy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxab","download_url":"https://codeload.github.com/mxab/pre-commit-trivy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxab%2Fpre-commit-trivy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28602175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T10:46:13.255Z","status":"ssl_error","status_checked_at":"2026-01-20T10:42:51.865Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-20T11:02:54.275Z","updated_at":"2026-01-20T11:02:56.468Z","avatar_url":"https://github.com/mxab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# pre-commit-trivy\n\nAdd this to your [pre-commit](https://pre-commit.com/) `.pre-commit-config.yaml` config.\n\nYou can use [trivy fs flags](https://trivy.dev/docs/v0.68/guide/target/filesystem/) to configure Trivy filesytem scans.\nInsert the required flags in the `args` field.\n\nYou can also use the `trivyconfig-docker` to scan for misconfigurations [trivy config](https://trivy.dev/docs/v0.68/guide/scanner/misconfiguration/)\n\n## trivyfs-docker\n\npre-commit will use the `aquasec/trivy:0.68.2` docker image and run it inside a docker container.\n\n```yaml\nrepos:\n  - repo: https://github.com/mxab/pre-commit-trivy.git\n    rev: v0.17.0\n    hooks:\n      - id: trivyfs-docker\n        args:\n          - --skip-dirs\n          - ./tests\n          - . # last arg indicates the path/file to scan\n      - id: trivyconfig-docker\n        args:\n          - --skip-dirs\n          - ./tests\n          - . # last arg indicates the path/file to scan\n```\n\n### Cache\n\nThe hook will create a cache directory `.pre-commit-trivy-cache` in your repo. Add it to the `.gitignore`.\n\n```\necho \".pre-commit-trivy-cache\" \u003e\u003e .gitignore\n```\n\n## Example\n\nYou can find a sample use case here https://github.com/mxab/trivy-pre-commit-demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxab%2Fpre-commit-trivy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxab%2Fpre-commit-trivy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxab%2Fpre-commit-trivy/lists"}