{"id":13414537,"url":"https://github.com/pottava/trivy-restapi","last_synced_at":"2025-09-03T15:34:32.638Z","repository":{"id":147533335,"uuid":"187690462","full_name":"pottava/trivy-restapi","owner":"pottava","description":"A REST API server for https://github.com/knqyf263/trivy","archived":false,"fork":false,"pushed_at":"2019-06-09T02:37:41.000Z","size":23,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-07-31T21:53:06.758Z","etag":null,"topics":["docker","rest-api","swagger","vulnerability-scanners"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pottava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-20T18:06:57.000Z","updated_at":"2024-03-24T04:16:12.000Z","dependencies_parsed_at":"2024-01-15T23:26:49.055Z","dependency_job_id":"5d3a5451-4b5f-472d-8fbe-dbc15b797cae","html_url":"https://github.com/pottava/trivy-restapi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Ftrivy-restapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Ftrivy-restapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Ftrivy-restapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Ftrivy-restapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pottava","download_url":"https://codeload.github.com/pottava/trivy-restapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223154806,"owners_count":17096813,"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":["docker","rest-api","swagger","vulnerability-scanners"],"created_at":"2024-07-30T21:00:25.533Z","updated_at":"2024-11-05T10:35:23.243Z","avatar_url":"https://github.com/pottava.png","language":"Go","funding_links":[],"categories":["Other respositories"],"sub_categories":[],"readme":"# REST APIs for [Trivy](https://github.com/knqyf263/trivy)\n\n[![CircleCI](https://circleci.com/gh/pottava/trivy-restapi.svg?style=svg)](https://circleci.com/gh/pottava/trivy-restapi)\n\n[![pottava/trivy](http://dockeri.co/image/pottava/trivy)](https://hub.docker.com/r/pottava/trivy/)\n\nSupported tags and respective `Dockerfile` links:  \n・latest ([versions/0.1/Dockerfile](https://github.com/pottava/trivy-restapi/blob/master/versions/0.1/Dockerfile))  \n・0.1 ([versions/0.1/Dockerfile](https://github.com/pottava/trivy-restapi/blob/master/versions/0.1/Dockerfile))  \n・0.1-db ([versions/0.1-db/Dockerfile](https://github.com/pottava/trivy-restapi/blob/master/versions/0.1-db/Dockerfile))  \n\n## Usage\n\n### Run the API server\n\n```bash\n$ docker run --name trivy -d --rm -p 9000:9000 \\\n    -v \"${HOME}/Library/Caches/trivy\":/root/.cache/trivy \\\n    pottava/trivy:0.1\n```\n\nThen wait about 30 minutes for building the vulnerability database.  \nOr\n\n```bash\n$ docker run --name trivy -d --rm -p 9000:9000 \\\n    pottava/trivy:0.1-db\n```\n\n### Consume APIs\n\nget repositories ([API spec](https://raw.githubusercontent.com/pottava/trivy-restapi/master/spec.yaml))\n\n```bash\n$ curl -s -X GET -H 'Content-Type:application/json' \\\n  \"http://localhost:9000/api/v1/images/python%3A3.4.10-alpine3.9/vulnerabilities\" \\\n  | jq .\n{\n  \"Count\": 1,\n  \"Vulnerabilities\": [\n    {\n      \"Description\": \"ChaCha20-Poly1305 is ...\",\n      \"FixedVersion\": \"1.1.1b-r1\",\n      \"InstalledVersion\": \"1.1.1a-r1\",\n      \"PkgName\": \"openssl\",\n      \"References\": [\n        \"https://www.openssl.org/news/secadv/20190306.txt\",\n        \"...\"\n      ],\n      \"Severity\": \"MEDIUM\",\n      \"Title\": \"openssl: ChaCha20-Poly1305 with long nonces\",\n      \"VulnerabilityID\": \"CVE-2019-1543\"\n    }\n  ]\n}\n$ curl -s -X GET -H 'Content-Type:application/json' \\\n  \"http://localhost:9000/api/v1/images/envoyproxy%2Fenvoy-alpine%3Av1.10.0/vulnerabilities?skip-update=yes\" \\\n  | jq -r \".Count\"\n1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpottava%2Ftrivy-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpottava%2Ftrivy-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpottava%2Ftrivy-restapi/lists"}