Commit Graph

822 Commits

Author SHA1 Message Date
Jimmy Zelinskie
dc6be5d1b0 api: remove handleShutdown func
This function was used for handling errors in the graceful library and
was never necessary for the v3 API.
2018-09-10 13:26:53 -04:00
Sida Chen
5d725e67b0 Replace Ancestry with AncestryWithContent struct in database models
As one of the steps to simplifies the codebase, the AncestryWithContent
struct is renamed to Ancestry, and Ancestry is removed. It will cause
the PostAncestry request to be slower.
2018-09-10 12:48:23 -04:00
Jimmy Zelinskie
e5c2e378a2
Merge pull request #613 from jzelinskie/pkg-pagination
Introduce pkg/pagination
2018-09-07 16:34:59 -04:00
Jimmy Zelinskie
0565938956 pkg/pagination: add token type
This change pulls as much pagination logic out of the database
implementation as possible. Database implementations should now be able
to marshal whatever state they need into opaque tokens with the
utilities in the pagination package.
2018-09-07 16:26:56 -04:00
Jimmy Zelinskie
d193b46449 pkg/pagination: init
This change refactors a lot of the code dealing with pagination so that
fernet implementation details do not leak.

- Deletes database/pgsql/token
- Introduces a pagination package
- Renames idPageNumber to Page and add a constructor and method.
2018-09-07 16:13:51 -04:00
Jimmy Zelinskie
b20482e0ae cmd/clair: document constants 2018-09-06 17:40:01 -04:00
Jimmy Zelinskie
fffb67f137
Merge pull request #611 from jzelinskie/drop-graceful
Remove dependency on graceful
2018-09-06 17:10:01 -04:00
Jimmy Zelinskie
55ecf1e58a vendor: regenerate after removing graceful 2018-09-06 16:56:33 -04:00
Jimmy Zelinskie
30644fcc01 api: remove dependency on graceful
This library has no longer been needed since Go 1.8.
2018-09-06 16:56:33 -04:00
Sida Chen
2bbbad393b
Merge pull request #605 from KeyboardNerd/sidchen/feature
Implement Ancestry Layer-wise feature API
2018-09-06 14:08:56 -04:00
Sida Chen
2827b9342b Update Database and Worker implementation for layer-wise feature
Feature extraction algorithm is changed to associate features with
ancestry layer. Database is updated to keep the relationship.
2018-09-06 13:56:03 -04:00
Jimmy Zelinskie
06b257cc97
Merge pull request #606 from MackJM/wip/master_httputil
Adding httputil and version packages to master
2018-09-06 11:27:35 -04:00
Jimmy Zelinskie
4fd86fd518
Merge pull request #607 from jzelinskie/gofmt
enforce gofmt in travis
2018-09-06 09:27:28 -04:00
Jimmy Zelinskie
ce15f73501 *: gofmt -s 2018-09-05 19:20:35 -04:00
Jimmy Zelinskie
52ecf35ca6 travis: fail if not gofmt -s 2018-09-05 18:57:10 -04:00
Jean Michel MacKay
9df4f5bd70 Adding httputil and version packages
- Debian/RHEL/Oracle vulnsrc now use httputil to download files
- httputil sets the User-Agent to the requests as Clair/<version> (https://github.com/coreos/clair/)
- httputil holds Status2xx() which returns if the response is a http success (2xx)
- GetClientAddr moved from api/httputil to pkg/httputil
- the version packge holds a Version string which is set at build time from the git tag and sha
- the .git directory was removed from .dockerignore so that we can use the git tag to set the version
2018-09-05 14:56:39 -04:00
Sida Chen
4b64151330 Update gRPC server implementation 2018-09-05 11:34:06 -04:00
Sida Chen
6a44052e31 Update Clair V3 API to provide layer-wise feature 2018-09-05 11:33:27 -04:00
Jimmy Zelinskie
9f2cc4e533
Merge pull request #604 from jzelinskie/nvd-urls
vulnmdsrc: update NVD URLs
2018-09-04 14:07:56 -04:00
Jimmy Zelinskie
ce6b00887b vulnmdsrc: update NVD URLs
This connects us via a domain hosted on AWS which should provide
performance benefits for users running Clair on AWS and alleviate load
from the NIST campus network.

Fixes #575.
2018-09-04 11:55:19 -04:00
Sida Chen
dfc3023372
Merge pull request #601 from KeyboardNerd/sidchen/status
Add Status endpoint with Clair configuration
2018-08-31 13:28:38 -04:00
Sida Chen
d28f3214ce Add Status endpoint with Clair configuration
Implement a status endpoint providing the current lister/detector in
the current instance of Clair.
2018-08-30 16:55:18 -04:00
Jimmy Zelinskie
7f9c0b1b07
Merge pull request #594 from reasonerjt/fix-alpine-url
Quickfix to the URL for fetching alpine's vuln data.
2018-08-29 15:23:07 -04:00
Daniel Jiang
9e4a347ecd Quickfix to the URL for fetching alpine's vuln data.
Fixes #593

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-08-23 13:39:26 +08:00
Jimmy Zelinskie
ddeb64339d
Merge pull request #578 from naibaf0/fix/helmtemplate/configmap/postgresql
Helm: change postgresql connection string format in configmap template
2018-08-13 14:35:46 -04:00
Fabian Hinz
690d26edba Helm: change postgresql connection string format in configmap template
The PostgreSQL connection string in the configmap template for helm was
changed to a key-value format to reflect the currently used format in
the sample config file

Fixes #561
2018-08-13 15:24:33 +02:00
Jimmy Zelinskie
1d690bbacf
Merge pull request #586 from robertomlsoares/update-helm-chart
Helm Chart: Use Secret for config file. Fix some minor issues
2018-08-09 15:06:07 -04:00
Roberto Soares
bc6f37f1ae Helm Chart: Use Secret for config file. Fix some minor issues
- Config file for Clair now is inside a Secret. Fixes #581.

- Update helper template to use latest Helm conventions for "name" and
"fullname".

- Update labels to use the recommended labels by Helm. See:
https://docs.helm.sh/chart_best_practices/#standard-labels

- Remove service.name from values file because it is not used.
Service discovery for parent charts can be made by using the
"clair.fullname" template since template functions are shared
between charts.
2018-08-08 14:54:35 +02:00
Jimmy Zelinskie
c26154ab74
Merge pull request #582 from brosander/helm-alpine-postgres
Using alpine postgres image
2018-08-06 14:14:18 -04:00
Bryan Rosander
f3e156a46e
Using alpine postgres image 2018-08-03 11:19:48 -04:00
Jimmy Zelinskie
b1cd092319
Merge pull request #571 from ErikThoreson/nvdupdates
adding publisher datetime and updating nvd feed download
2018-07-17 19:57:26 -04:00
Jimmy Zelinskie
f32f438a98
Merge branch 'master' into nvdupdates 2018-07-17 10:36:08 -04:00
Jimmy Zelinskie
3babbafb2f
Merge pull request #574 from hongli-my/fix-nvd-path
not use path.Join,  stop clair, left  nvd xml like nvd-data3260521972007.xml
2018-07-17 10:32:52 -04:00
honglichang(常红立)
0d5f300c5b fix nvd path
1. stop clair, not del nvd xml
2018-07-17 20:11:24 +08:00
Jimmy Zelinskie
9a9b1f7a13
Merge pull request #572 from arno01/multi-stage
use multi-stage build
2018-07-14 13:02:39 -04:00
921ba54152
use multi-stage build 2018-07-14 15:49:07 +02:00
ErikThoreson
df1dd5c149 adding publisher datetime and updating nvd feed download 2018-07-12 16:40:05 -05:00
Jimmy Zelinskie
158bb31b77
Merge pull request #540 from jzelinskie/document-proto
api/v3/clairpb: document and regenerate protos
2018-07-10 17:30:04 -04:00
Jimmy Zelinskie
027f239e1f
Merge pull request #569 from jzelinskie/ubuntu-git
v3: use new git-based ubuntu tracker
2018-07-10 17:29:50 -04:00
Jimmy Zelinskie
5caa821c80 *: remove bzr dependency 2018-07-10 16:46:46 -04:00
Jimmy Zelinskie
456af5f48c vulnsrc/ubuntu: use new git-based ubuntu tracker 2018-07-10 16:46:46 -04:00
Jimmy Zelinskie
c031f8ea0c vulnsrc/alpine: s/pull/clone 2018-07-05 19:11:30 -04:00
Jimmy Zelinskie
4c2be5285e vulnsrc/alpine: avoid shadowing vars 2018-07-05 19:09:45 -04:00
Jimmy Zelinskie
e907e4d263
Merge pull request #553 from qeqar/master
mapping: add ubuntu mapping
2018-05-07 15:16:36 -07:00
Mark Eisenblaetter
07a08a4f53 mapping: add ubuntu mapping
add new ubuntu 18.03 bionic beaver mapping

Fixes #552
2018-05-07 08:26:46 +02:00
Jimmy Zelinskie
34c1382d9e
Merge pull request #551 from usr42/upgrade_to_1.10-alpine
Upgrade to go 1.10
2018-05-06 20:42:31 +02:00
usr42
db5dbbe4e9 Upgrade to golang:1.10-alpine 2018-04-24 16:14:57 +02:00
Jimmy Zelinskie
7492aa31ba travis: fail unformatted protos 2018-04-23 15:49:34 -04:00
Jimmy Zelinskie
f550dd16a0 api/v3: remove dependency on google empty message 2018-04-23 15:49:34 -04:00
Jimmy Zelinskie
d7a751e0d4 api/v3: prototool format 2018-04-23 15:32:03 -04:00