# go-cve-dictionary-Docker

This is the Git repo of the official Docker image for go-cve-dictionary.
See the [Hub page](https://hub.docker.com/r/vuls/go-cve-dictionary/) for the full readme on how to use the Docker image and for information regarding contributing and issues.

# Supported tags and respective `Dockerfile` links

- [`latest` (*go-cve-dictionary:latest Dockerfile*)](https://github.com/future-architect/vuls/blob/master/setup/docker/go-cve-dictionary/latest/Dockerfile)

# Caution

This image is built per commit.
If you want to use the latest docker image, you should remove the existing image, and pull it once again.

- Remove old docker image

```
$ docker rmi vuls/go-cve-dictionary
```

- Pull new docker image

```
$ docker pull vuls/go-cve-dictionary
```

# What is go-cve-dictionary?

This is tool to build a local copy of the NVD (National Vulnerabilities Database) [1] and the Japanese JVN [2], which contain security vulnerabilities according to their CVE identifiers [3] including exhaustive information and a risk score. The local copy is generated in sqlite format, and the tool has a server mode for easy querying.

[1] https://en.wikipedia.org/wiki/National_Vulnerability_Database  
[2] https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures  
[3] http://jvndb.jvn.jp/apis/termsofuse.html  

# How to use this image

## check vuls version

```
$ docker run --rm vuls/go-cve-dictionary -v
```

## fetchnvd

```console
$ for i in `seq 2002 $(date +"%Y")`; do \
    docker run --rm -it \
    -v $PWD:/vuls \
    -v $PWD/go-cve-dictionary-log:/var/log/vuls \
    vuls/go-cve-dictionary fetchnvd -years $i; \
  done
```

## server

```console
$ docker run -dt \
    --name go-cve-dictionary \
    -v $PWD:/vuls \
    -v $PWD/go-cve-dictionary-log:/var/log/vuls \
    --expose 1323 \
    -p 1323:1323 \
    vuls/go-cve-dictionary server --bind=0.0.0.0
```

Prease refer to [this](https://hub.docker.com/r/vuls/go-cve-dictionary).

## vuls

Please refer to [this](https://hub.docker.com/r/vuls/vuls/).

# User Feedback

## Documentation

Documentation for this image is stored in the [`docker/` directory](https://github.com/future-architect/vuls/tree/master/setup/docker) of the [`future-architect/vuls` GitHub repo](https://github.com/future-architect/vuls). 

## Issues

If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/future-architect/vuls/issues). 

## Contributing

1. fork a repository: github.com/future-architect/vuls to github.com/you/repo
1. get original code: go get github.com/future-architect/vuls
1. work on original code
1. add remote to your repo: git remote add myfork https://github.com/you/repo.git
1. push your changes: git push myfork
1. create a new Pull Request
