Commit Graph

37 Commits

Author SHA1 Message Date
Sida Chen
fb32dcfa58 Clair Logic, Extensions: updated mock tests, extensions, basic logic
Main Clair logic is changed in worker, updater, notifier for better adapting
ancestry schema. Extensions are updated with the new model and feature lister
 and namespace detector drivers are able to specify the specific listers and
detectors used to process layer's content. InRange and GetFixedIn interfaces
are added to Version format for adapting ranged affected features and next
available fixed in in the future. Tests for worker, updater and extensions
are fixed.
2017-08-10 11:24:40 -04:00
Jimmy Zelinskie
04847a016d Merge pull request #418 from KeyboardNerd/multiplens
use namespace's versionfmt to specify listers scanning features
2017-06-28 13:53:21 -04:00
Sida Chen
9561d623c2 featurefmt: use namespace's versionfmt to specify listers
use namespace's versionfmt to specify listers used to scan features
the content detection functions are changed accordingly in worker
2017-06-22 15:36:07 -04:00
Sida Chen
50437f32a1 featurens: fix detecting duplicated namespaces problem 2017-06-22 11:41:18 -04:00
alinar
d4a967e6e6 Fixing always revision 0 for ubuntu 2017-06-07 12:37:24 +01:00
Jimmy Zelinskie
abd7d2e013 Merge pull request #394 from KeyboardNerd/multiplens
added support for detecting multiple namespaces in a layer
2017-05-24 17:22:08 -04:00
Sida Chen
75d5d40d79 featurens: added multiple namespace testing for namespace detector 2017-05-24 17:18:11 -04:00
Sida Chen
bffa6499b7 added support for detect multiple namespaces in a layer
created table layer_namespace to store the many to many unique mapping of layers and namespaces
changed v1 api to provide a list of namespaces for each layer
changed namespace detector to use all registered detectors to detect namespaces
updated tests for multiple namespaces

Fixes #150
2017-05-24 17:01:51 -04:00
Jimmy Zelinskie
f2f213470b Merge pull request #395 from knqyf263/handle_tilde
versionfmt/rpm: handle a tilde correctly
2017-05-15 14:52:31 -04:00
knqyf263
db8a133d21 versionfmt/rpm: handle a tilde correctly 2017-05-14 19:18:57 +09:00
Jimmy Zelinskie
0891bbac00 ext/vulnsrc/alpine: use HTTPS 2017-05-11 15:18:37 -04:00
Sida Chen
9306e99368 converted to structured logging by using logrus
changed from capnslog to logrus for logging JSON structured message.

finished issue #383
2017-05-04 13:59:57 -04:00
Jimmy Zelinskie
09cbfe325b ext/vulnsrc/oracle: ensure flag is largest elsa
If the Oracle Linux directory is ever in the wrong order, this should
ensure that the updaterFlag is always set the latest ELSA value.
2017-04-27 18:57:19 -04:00
Jimmy Zelinskie
34bc722794 ext/featurens: add empty filesmap tests for all 2017-04-21 15:08:47 -04:00
Jimmy Zelinskie
bcf47f53ee ext/vulnsrc/oracle: fix ELSA version comparison
Previously we naively compared integers. However, not all versions have
the same length.
2017-04-19 15:15:41 -04:00
Jimmy Zelinskie
b2f2b2c854 ext/featurefmt/apk: handle malformed packages 2017-04-11 15:48:27 -04:00
Jimmy Zelinskie
590e7e2602 ext/featurefmt/dpkg: handle malformed packages 2017-04-11 15:48:27 -04:00
Jimmy Zelinskie
300fe980ef ext/vulnsrc/ubuntu: add missing version format 2017-03-01 01:12:27 -05:00
supereagle
3f51191d23 configurable for TLS server's certificate chain and hostname verification when pulling layers 2017-02-26 07:30:23 +08:00
Quentin Machu
d606d85afe
ext/vulnsrc/rhel: fix logging namespace 2017-02-22 10:50:42 -08:00
Jimmy Zelinskie
1e9f14ae33 versionfmt/dpkg: remove leading digit requirement
This is not strictly a requirement and affects some tracked Alpine Linux
packages.
2017-02-07 13:31:28 -08:00
Jimmy Zelinskie
c8622d5f34 vulnsrc/alpine: unify schema and parse v3.5
HEAD of Alpine SecDB now uses one consistent schema for all of their
vulnerabilities, so the logic around parsing different versions can now
be removed. This change also crawls the directory structure to parse all
files due to the addition of community.yaml tracking community Alpine
Linux packages.
2017-02-07 13:31:28 -08:00
Jimmy Zelinskie
6a569fd945 move config to main / decentralize config
This puts config in its relevant location and moves functions around
loading config files into the main package.

As a side effect of removing cyclic imports for the API config, the
context library is no longer used.
2017-01-27 00:36:13 -05:00
Jimmy Zelinskie
9c63a63944 clair: mv updater clair and mv severity to db 2017-01-22 23:20:56 -05:00
Jimmy Zelinskie
c2f4a44068 utils: rm exec.go
This change also adds a dependency check at startup, rather than
runtime.
2017-01-22 23:02:51 -05:00
Jimmy Zelinskie
343e24eb7e clair: remove types package
This removes the `types` package instead moving the contents to the
top-level clair package.
This change also renames the `Priority` type to `Severity` in order to
reduce confusion.
This change also removes the IsValid method and replaces it with a safe
constructor to avoid the creation of invalid values.
Many docstrings were tweaked in the making of this commit.
2017-01-22 23:02:51 -05:00
Jimmy Zelinskie
03b8cd9a45 ext/featurens: add missing lock 2017-01-22 23:02:51 -05:00
Jimmy Zelinskie
cda3d4819c ext: feature detector -> featurefmt 2017-01-22 23:02:51 -05:00
Jimmy Zelinskie
71a8b542f9 ext: misc doc comment fixes 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
fb193e1fde ext: namespace detector -> featurens 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
d9be34c3c4 ext: data detector -> imagefmt 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
f9b319089d ext: lock all drivers 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
78cef02fda pkg: cerrors -> commonerr 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
4a990372ff refactor: move updaters and notifier into ext 2017-01-22 23:02:50 -05:00
Jimmy Zelinskie
8d29bf860d versionfmt: convert to using constant over literal 2017-01-03 16:00:20 -05:00
Jimmy Zelinskie
6864a8efea versionfmt: init rpm versionfmt 2016-12-30 12:51:25 -05:00
Jimmy Zelinskie
033709eaea add registerable version formats
Since we only ever used dpkg, this change shims everything into using
dpkg.
2016-12-30 12:51:24 -05:00