https://github.com/truemilk/go-defectdojo
Go client library for accessing the DefectDojo API
https://github.com/truemilk/go-defectdojo
defectdojo go golang
Last synced: 4 months ago
JSON representation
Go client library for accessing the DefectDojo API
- Host: GitHub
- URL: https://github.com/truemilk/go-defectdojo
- Owner: truemilk
- License: mit
- Created: 2022-01-25T18:41:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-09T21:46:12.000Z (4 months ago)
- Last Synced: 2026-03-10T03:50:15.445Z (4 months ago)
- Topics: defectdojo, go, golang
- Language: Go
- Homepage: https://pkg.go.dev/github.com/truemilk/go-defectdojo/defectdojo
- Size: 138 KB
- Stars: 4
- Watchers: 1
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-defectdojo
__go-defectdojo__ is a Go client library for accessing the [DefectDojo API](https://defectdojo.github.io/django-DefectDojo/integrations/api-v2-docs/)
## Requirements ##
- Minimum tested Go version is `1.17`
- The latest version of DefectDojo the APIs are have been tested with is `v2.6.2`
## Basic Usage ##
Import the module in your source code:
```go
import "github.com/truemilk/go-defectdojo/defectdojo"
```
Create a client:
```go
url := os.Getenv("DOJO_URI")
token := os.Getenv("DOJO_APIKEY")
client := &http.Client{
Timeout: time.Minute,
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
},
}
dj, err := defectdojo.NewDojoClient(url, token, client)
```
Reference the provided methods to call the API:
```go
ctx := context.Background()
opts := &defectdojo.FindingsOptions{
Limit: 20,
Offset: 5,
Prefetch: "duplicate_finding",
}
resp, err := dj.Findings.List(ctx, opts)
```
More detailed documentation is available at: https://pkg.go.dev/github.com/truemilk/go-defectdojo/defectdojo
For additional usage examples, browse the [example](example) folder.
## Roadmap ##
This library is being initially developed for personal use, so API methods will likely be implemented in the order that they are needed.
Eventually, it would be ideal to cover the entire DefectDojo API, so contributions are of course always welcome.
The calling pattern is pretty well established, so adding new methods is relatively straightforward.
## License ##
MIT licensed, see [LICENSE][LICENSE] file.
[LICENSE]: ./LICENSE