{"id":13712556,"url":"https://github.com/filewalkwithme/go-gmp","last_synced_at":"2025-12-15T11:59:39.493Z","repository":{"id":57534514,"uuid":"282270369","full_name":"filewalkwithme/go-gmp","owner":"filewalkwithme","description":"Go library to interact with the Greenbone Vulnerability Manager 11 using the GMP protocol (Greenbone Management Protocol, version 9.0)","archived":false,"fork":false,"pushed_at":"2020-07-28T14:21:43.000Z","size":2027,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T23:32:21.099Z","etag":null,"topics":["automation","gmp","go","golang","greenbone-management-protocol","gvm","openvas","security","security-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","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/filewalkwithme.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":"2020-07-24T16:40:49.000Z","updated_at":"2024-09-30T18:09:52.000Z","dependencies_parsed_at":"2022-09-26T18:20:17.559Z","dependency_job_id":null,"html_url":"https://github.com/filewalkwithme/go-gmp","commit_stats":null,"previous_names":["filewalkwithme/go-openvas-gmp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filewalkwithme%2Fgo-gmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filewalkwithme%2Fgo-gmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filewalkwithme%2Fgo-gmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filewalkwithme%2Fgo-gmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filewalkwithme","download_url":"https://codeload.github.com/filewalkwithme/go-gmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779023,"owners_count":21802866,"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":["automation","gmp","go","golang","greenbone-management-protocol","gvm","openvas","security","security-tools"],"created_at":"2024-08-02T23:01:19.818Z","updated_at":"2025-12-15T11:59:39.428Z","avatar_url":"https://github.com/filewalkwithme.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# GO-GMP\n\n[![Build Status](https://travis-ci.org/filewalkwithme/go-gmp.svg?branch=master)](https://travis-ci.org/filewalkwithme/go-gmp)\n\nLibrary to interact with the Greenbone Vulnerability Manager using the [gmp protocol](https://docs.greenbone.net/API/GMP/gmp-9.0.html) (Greenbone Management Protocol, `version 9.0`)\n\nHere you willl find methods to create tasks, targets, scanners and retrieve results generated by the Openvas scanner.\n\n* This library is compatible with the latest version of GVM: 11.0\n\n# Reference\n\nhttps://docs.greenbone.net/API/GMP/gmp-9.0.html\n\n# Documentation\n- https://godoc.org/github.com/filewalkwithme/go-gmp/pkg/9/gmp\n- https://godoc.org/github.com/filewalkwithme/go-gmp/pkg/9/gmp/client\n- https://godoc.org/github.com/filewalkwithme/go-gmp/pkg/9/gmp/connections\n\n# Sample Usage\n\n```\nimport (\n\t\"github.com/filewalkwithme/go-gmp/pkg/9/gmp\"\n\t\"github.com/filewalkwithme/go-gmp/pkg/9/gmp/client\"\n\t\"github.com/filewalkwithme/go-gmp/pkg/9/gmp/connections\"\n)\n```\n\n```\n// Connect to GVMD\nconn, err := connections.NewUnixConnection(\"/tmp/openvas-socks/gvmd.sock\")\nif err != nil {\n    panic(err)\n}\ndefer conn.Close()\n\n// Instantiate  a new GMP Client\ngmpClient := client.New(conn)\n\n// Authenticate\nauth := \u0026gmp.AuthenticateCommand{}\nauth.Credentials.Username = \"openvas\"\nauth.Credentials.Password = \"openvas\"\n_, err = gmpClient.Authenticate(auth)\nif err != nil {\n    panic(err)\n}\n\n// Create a new task\nnewTask := \u0026gmp.CreateTaskCommand{}\nnewTask.Name = \"New Task\"\n\nnewTask.Config = new(gmp.CreateTaskConfig)\nnewTask.Config.ID = \"b9407b88-7b3c-47f3-a684-3605db80e5fd\"\n\nnewTask.Target = new(gmp.CreateTaskTarget)\nnewTask.Target.ID = \"a2a964f8-daa7-4e1c-ae3a-a72f06d49dbe\"\n\nnewTask.Scanner = new(gmp.CreateTaskScanner)\nnewTask.Scanner.ID = \"8abd321a-2eb1-4a7a-a368-fc118dc99a85\"\n\nnewTaskResp, err := gmpClient.CreateTask(newTask)\nif err != nil {\n    panic(err)\n}\n\n// Start the task\nst := \u0026gmp.StartTaskCommand{}\nst.TaskID = newTaskResp.ID\n_, err = gmpClient.StartTask(st)\nif err != nil {\n    panic(err)\n}\n```\n\n# Sample Application\n\nFirst, you will need to start an Greenbone Security Assistant instance. For this example we will use [gvm-openvas-docker](https://github.com/filewalkwithme/gvm-openvas-docker.git), a ready to use GSA Docker image. We are going to expose the GVMD Unix Socket under `/tmp/openvas-socks/gvmd.sock`\n\n```\ngit clone https://github.com/filewalkwithme/openvas-in-the-box.git\nsudo docker build openvas-in-the-box -t openvas\nsudo docker run -d --rm -ti -p 80:80 -p 443:443 -v /tmp/openvas-socks:/var/run --name openvas openvas\n```\n\nWait some seconds until `/tmp/openvas-socks/gvmd.sock` gets created by the container.\n```\nsleep 60\nls /tmp/openvas-socks/gvmd.sock\n```\n\nConfirm that GSA is available at https://127.0.0.1\n\nNext, we will execute the sample application avaible under the `examples` folder:\n```\ncd examples\ngo build -o go-gmp\n./go-gmp\n```\n\nThe sample application will generate an output like this:\n\n```\nConnecting to GVMD...\n-\u003e ok\nInstantiate  a new GMP Client\n-\u003e ok\nAuthenticating...\n-\u003e ok\nGetting the Default scanner...\n-\u003e ok (scanner id: 08b69003-5fc2-4037-a479-93b440211c73)\nGetting the configuration named \"Full and fast\"...\n-\u003e ok (config id: daba56c8-73ec-11df-a475-002264764cea)\nCreating a new target...\n-\u003e ok (target id: 34e34484-2dfa-4f01-b9fe-2b90e4a38fba)\nCreating a new task...\n-\u003e ok (task id: d82a368f-acfa-422e-a78a-63727861f5a9)\nStart the task\n\nMonitoring task progress...\nMonitoring task progress: 1%\nMonitoring task progress: 2%\nMonitoring task progress: 6%\nMonitoring task progress: 8%\nMonitoring task progress: 14%\nMonitoring task progress: 52%\nMonitoring task progress: 80%\nMonitoring task progress: 90%\nMonitoring task progress: 98%\nMonitoring task progress: 100%\n\n\nResult[0]: CGI Scanning Consolidation (score: 0.0)\n...\nResult[7]: HTTP Security Headers Detection (score: 0.0)\n...\nResult[15]: Services (score: 0.0)\n...\nResult[20]: SSL/TLS: Diffie-Hellman Key Exchange Insufficient DH Group Strength Vulnerability (score: 4.0)\nResult[37]: SSL/TLS: Report Vulnerable Cipher Suites for HTTPS (score: 5.0)\nResult[38]: SSL/TLS: Report Weak Cipher Suites (score: 4.3)\nResult[39]: Traceroute (score: 0.0)\nResult[40]: Unknown OS and Service Banner Reporting (score: 0.0)\n```\n\n# Tests\n```\ngo test ./... -coverprofile=coverage.out\n\n?       github.com/filewalkwithme/go-gmp/examples       [no test files]\nok      github.com/filewalkwithme/go-gmp/pkg/9/gmp      0.004s  coverage: [no statements]\nok      github.com/filewalkwithme/go-gmp/pkg/9/gmp/client       0.017s  coverage: 100.0% of statements\nok      github.com/filewalkwithme/go-gmp/pkg/9/gmp/connections  0.009s  coverage: 100.0% of statements\nok      github.com/filewalkwithme/go-gmp/pkg/9/gmp/connections/internal/implementation  0.003s  coverage: 100.0% of statements\n```\n\nHTML Report:\n```\ngo tool cover -html=coverage.out\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilewalkwithme%2Fgo-gmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilewalkwithme%2Fgo-gmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilewalkwithme%2Fgo-gmp/lists"}