├── .chglog
├── CHANGELOG.tpl.md
└── config.yml
├── .clang-format
├── .dockerignore
├── .gitattributes
├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── actions
│ ├── documentation
│ │ └── action.yml
│ ├── go-cache
│ │ └── action.yml
│ ├── go-tidy
│ │ └── action.yml
│ └── set-image-expiration
│ │ └── action.yml
├── dependabot.yml
├── issue-close-app.yml
├── script
│ └── nightly-module.sh
└── workflows
│ ├── .gitignore
│ ├── .yamllint
│ ├── Makefile
│ ├── check-fast-forward.yml
│ ├── config-ci.yml
│ ├── cut-release.yml
│ ├── documentation.yml
│ ├── fast-forward.yml
│ ├── main.yml
│ ├── nightly-ci.yml
│ ├── nightly.yml
│ ├── prepare-release.yml
│ ├── tests.yml
│ └── v2-issues.yml
├── .gitignore
├── CHANGELOG.md
├── CODEOWNERS
├── DCO
├── Dockerfile
├── Documentation
├── SUMMARY.md
├── clairv4_arch.png
├── concepts.md
├── concepts
│ ├── api_internal.md
│ ├── authentication.md
│ ├── indexing.md
│ ├── matching.md
│ ├── notifications.md
│ ├── operation.md
│ └── updatersandairgap.md
├── contribution.md
├── contribution
│ ├── building.md
│ ├── commit_style.md
│ └── releases.md
├── howto.md
├── howto
│ ├── api.md
│ ├── clairv4_combo_multi_db.png
│ ├── clairv4_combo_single_db.png
│ ├── clairv4_distributed_multi_db.png
│ ├── clairv4_distributed_single_db.png
│ ├── deployment.md
│ ├── getting_started.md
│ └── testing.md
├── listing_test.go
├── reference.md
├── reference
│ ├── api.md
│ ├── clairctl.md
│ ├── config.md
│ ├── indexer.md
│ ├── matcher.md
│ ├── metrics.md
│ └── notifier.md
├── reference_test.go
└── whatis.md
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── ROADMAP.md
├── book.toml
├── clair-error
├── errors.go
└── notifications.go
├── cmd
├── build.go
├── clair
│ ├── main.go
│ ├── os_other.go
│ └── os_unix.go
├── clairctl
│ ├── admin.go
│ ├── client.go
│ ├── config.go
│ ├── delete.go
│ ├── export.go
│ ├── import.go
│ ├── import_test.go
│ ├── jsonformatter.go
│ ├── main.go
│ ├── manifest.go
│ ├── report.go
│ ├── textformatter.go
│ └── xmlformatter.go
├── config.go
├── config_test.go
└── testdata
│ ├── ComplexJSON
│ ├── config.json
│ ├── config.json.d
│ │ └── dropin.json
│ └── want.json
│ ├── ComplexYAML
│ ├── config.yaml
│ ├── config.yaml.d
│ │ ├── dropin.yaml
│ │ ├── empty.yaml
│ │ ├── ignored.json-patch
│ │ ├── later.yaml
│ │ └── updater.yaml-patch
│ └── want.json
│ ├── Error
│ ├── BadKind.toml
│ ├── BadPatch.json
│ ├── BadPatch.json.d
│ │ ├── decode.json-patch
│ │ └── invalid.json-patch
│ ├── Indents.yaml
│ ├── NotAnArray.json
│ ├── NotAnArray.json.d
│ │ └── badpatch.json-patch
│ ├── NotAnObject.json
│ ├── NotYAML.yaml
│ └── TooShort.json
│ ├── SimpleJSON
│ ├── config.json
│ └── want.json
│ └── SimpleYAML
│ ├── config.yaml
│ └── want.json
├── code-of-conduct.md
├── config.yaml.sample
├── config
├── auth.go
├── auth_test.go
├── config.go
├── config_test.go
├── database.go
├── defaults.go
├── doc.go
├── enums.go
├── enums_string.go
├── enums_test.go
├── go.mod
├── go.sum
├── indexer.go
├── introspection.go
├── lint.go
├── lint_test.go
├── matcher.go
├── matchers.go
├── notifier.go
├── otlp.go
├── otlpcompressor_string.go
├── reflect.go
├── tags_test.go
├── tls.go
├── updaters.go
└── validate.go
├── contrib
├── cmd
│ └── quaybackstop
│ │ ├── Dockerfile
│ │ ├── clair.go
│ │ ├── main.go
│ │ ├── main_old.go
│ │ ├── quay.go
│ │ ├── sig_linux.go
│ │ └── sig_other.go
└── openshift
│ ├── build_and_deploy.sh
│ ├── grafana
│ ├── dashboard-clair.configmap.yaml.tpl
│ └── dashboards
│ │ └── dashboard-clair.configmap.yaml
│ ├── manifests
│ ├── backstop.yaml
│ ├── db-job.yaml
│ └── manifests.yaml
│ └── pr_check.sh
├── docker-compose.yaml
├── etc
├── .gitignore
├── config.mk
├── container.mk
├── dev.mk
├── dist.mk
└── doc.mk
├── go.mod
├── go.sum
├── health
├── readinesshandler.go
└── readinesshandler_test.go
├── httptransport
├── auth.go
├── auth_test.go
├── client
│ ├── httpclient.go
│ ├── indexer.go
│ ├── matcher.go
│ └── matcher_test.go
├── common.go
├── concurrentlimit.go
├── concurrentlimit_test.go
├── discoveryhandler.go
├── discoveryhandler_test.go
├── error.go
├── error_test.go
├── gone.go
├── indexer_v1.go
├── indexer_v1_test.go
├── instrumentation.go
├── instrumentation_test.go
├── matcher_v1.go
├── matcher_v1_test.go
├── notification_v1.go
├── notification_v1_test.go
├── openapi.etag
├── openapi.json
├── openapigen.go
├── robotshandler.go
├── robotshandler_test.go
├── server.go
└── server_test.go
├── indexer
├── mock.go
└── service.go
├── initialize
├── auto
│ ├── auto.go
│ ├── auto_test.go
│ ├── cpu.go
│ ├── cpu_linux.go
│ ├── cpu_linux_test.go
│ ├── memory.go
│ ├── memory_linux.go
│ ├── memory_linux_test.go
│ └── profiling.go
├── logging.go
└── services.go
├── internal
├── codec
│ ├── codec.go
│ ├── codec_test.go
│ └── reader.go
└── httputil
│ ├── client.go
│ ├── client_test.go
│ ├── ratelimiter.go
│ ├── ratelimiter_test.go
│ ├── responserecorder.go
│ ├── responserecorder_test.go
│ └── signer.go
├── introspection
├── otlp.go
└── server.go
├── local-dev
├── clair
│ ├── .gitignore
│ ├── config.yaml
│ ├── config.yaml.d
│ │ └── .gitignore
│ ├── init.sql
│ └── quay.yaml.d
│ │ └── .gitignore
├── grafana
│ └── provisioning
│ │ ├── dashboards
│ │ ├── dashboard.json
│ │ └── dashboard.yml
│ │ └── datasources
│ │ └── datasource.yml
├── pgadmin
│ ├── passfile.txt
│ └── servers.json
├── prometheus
│ └── prometheus.yml
├── pyroscope
│ └── server.yml
├── quay
│ └── config.yaml
└── traefik
│ ├── config
│ ├── clair.yaml
│ ├── dashboard.yaml
│ ├── grafana.yaml
│ ├── jaeger.yaml
│ ├── pgadmin.yaml
│ ├── postgresql.yaml
│ ├── prom.yaml
│ ├── pyroscope.yaml
│ ├── quay.yaml
│ └── rabbitmq.yaml
│ └── traefik.yaml
├── matcher
├── mock.go
└── service.go
├── middleware
├── auth
│ ├── handler.go
│ ├── httpauth_psk.go
│ └── httpauth_psk_test.go
└── compress
│ ├── handler.go
│ └── handler_test.go
├── notifier
├── amqp
│ ├── deliverer.go
│ ├── deliverer_integration_test.go
│ ├── directdeliverer.go
│ ├── directdeliverer_integration_test.go
│ ├── doc.go
│ └── failover.go
├── callback.go
├── callback_test.go
├── deliverer.go
├── delivery.go
├── locker.go
├── migrations
│ ├── 01-init.sql
│ ├── 02-constraints.sql
│ ├── 03-constraints.sql
│ ├── 04-drop-key.sql
│ └── migrations.go
├── mockstore.go
├── notification.go
├── notificationhandle.go
├── pager.go
├── poller.go
├── postgres
│ ├── e2e_test.go
│ ├── get_status.go
│ ├── notifications.go
│ ├── notifications_test.go
│ ├── pagination_test.go
│ ├── postgres_test.go
│ ├── receipt.go
│ ├── set_status.go
│ ├── store.go
│ ├── store_test.go
│ └── testdata
│ │ └── .gitignore
├── processor.go
├── processor_create_test.go
├── processor_safe_test.go
├── receipt.go
├── service.go
├── service
│ ├── mock.go
│ ├── notifier.go
│ └── testmode.go
├── stomp
│ ├── deliverer.go
│ ├── directdeliverer.go
│ ├── doc.go
│ ├── failover.go
│ └── integration_test.go
├── store.go
├── summary_test.go
├── vulnsummary.go
└── webhook
│ ├── cmd
│ └── webhookd
│ │ └── main.go
│ ├── deliverer.go
│ └── deliverer_test.go
└── openapi.yaml
/.chglog/CHANGELOG.tpl.md:
--------------------------------------------------------------------------------
1 | {{ if .Versions -}}
2 |
3 | ## [Unreleased]
4 |
5 | {{ if .Unreleased.CommitGroups -}}
6 | {{ range .Unreleased.CommitGroups -}}
7 | ### {{ .Title }}
8 | {{ range .Commits -}}
9 | - [{{.Hash.Short}}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}): {{ .Subject }}
10 | {{ if .Refs -}}{{ range .Refs }} -{{if .Action}}{{ .Action }} {{ end }} [#{{ .Ref }}]({{ $.Info.RepositoryURL }}/issues/{{ .Ref }}){{ end -}}
11 | {{ end -}}
12 | {{ end -}}
13 | {{ end -}}
14 | {{ end -}}
15 |
16 | {{ range .Versions }}
17 |
18 | ## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
19 | {{ range .CommitGroups -}}
20 | ### {{ .Title }}
21 | {{ range .Commits -}}
22 | - [{{.Hash.Short}}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}): {{ .Subject }}
23 | {{ if .Refs -}}{{ range .Refs }} - {{if .Action}}{{ .Action }}{{ end }} [#{{ .Ref }}]({{ $.Info.RepositoryURL }}/issues/{{ .Ref }}){{ end -}}
24 | {{ end -}}
25 | {{ end -}}
26 | {{ end -}}
27 |
28 | {{- if .RevertCommits -}}
29 | ### Reverts
30 | {{ range .RevertCommits -}}
31 | - {{ .Revert.Header }}
32 | {{ end }}
33 | {{ end -}}
34 |
35 | {{- if .MergeCommits -}}
36 | ### Pull Requests
37 | {{ range .MergeCommits -}}
38 | - {{ .Header }}
39 | {{ end }}
40 | {{ end -}}
41 |
42 | {{- if .NoteGroups -}}
43 | {{ range .NoteGroups -}}
44 | ### {{ .Title }}
45 | {{ range .Notes }}
46 | {{ .Body }}
47 | {{ end }}
48 | {{ end -}}
49 | {{ end -}}
50 | {{ end -}}
51 |
52 | {{- if .Versions }}
53 | [Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
54 | {{ range .Versions -}}
55 | {{ if .Tag.Previous -}}
56 | [{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
57 | {{ end -}}
58 | {{ end -}}
59 | {{ end -}}
60 | {{ end -}}
61 |
--------------------------------------------------------------------------------
/.chglog/config.yml:
--------------------------------------------------------------------------------
1 | style: github
2 | template: CHANGELOG.tpl.md
3 | info:
4 | title: CHANGELOG
5 | repository_url: https://github.com/quay/clair
6 | options:
7 | tag_filter_pattern: '^v'
8 | sort: semver
9 | commits:
10 | sort_by: Scope
11 | commit_groups:
12 | group_by: Scope
13 | header:
14 | pattern: '^(.*?):\s*(.*)$'
15 | pattern_maps:
16 | - Scope
17 | - Subject
18 | issues:
19 | prefix:
20 | - "#"
21 |
22 | refs:
23 | actions:
24 | - Closes
25 | - Fixes
26 | - PullRequest
27 |
28 | notes:
29 | keywords:
30 | - BREAKING CHANGE
31 | - NOTE
32 |
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Proto
3 | BasedOnStyle: Google
4 | ...
5 |
6 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # Files
2 | DCO
3 | .dockerignore
4 | LICENSE
5 | *.md
6 | NOTICE
7 | *.oci
8 | *.tar*
9 | /clairctl-*
10 | !testdata/**
11 | # Directories
12 | /book
13 | /contrib
14 | !/contrib/cmd
15 | /Documenatation
16 | /etc
17 | /local-dev
18 | /.github
19 | # Allow `.git` to get sent for build vcs stamping.
20 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | cmd/build.go export-subst
2 | *.go diff=golang
3 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | Clair is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub pull requests.
4 | This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted.
5 |
6 | # Certificate of Origin
7 |
8 | By contributing to this project you agree to the Developer Certificate of Origin [DCO](../DCO).
9 | This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution.
10 | See the [DCO](../DCO) file for details.
11 |
12 | # Email and Chat
13 |
14 | The project currently uses a mailing list and IRC channel:
15 |
16 | - Email: [clair-dev@googlegroups.com](https://groups.google.com/forum/#!forum/clair-dev)
17 | - IRC: #[clair](irc://irc.freenode.org:6667/#clair) IRC channel on freenode.org
18 |
19 | Please avoid emailing maintainers directly.
20 | They are very busy and read the mailing lists.
21 |
22 | ## Getting Started
23 |
24 | - Fork the repository on GitHub
25 | - Read the [README](../README.md) for build and test instructions
26 | - Play with the project, submit bugs, submit patches!
27 |
28 | ## Contribution Flow
29 |
30 | This is a rough outline of what a contributor's workflow looks like:
31 |
32 | - Create a topic branch from where you want to base your work (usually main).
33 | - Make commits of logical units.
34 | - Make sure your commit messages are in the proper format (see below).
35 | - Push your changes to a topic branch in your fork of the repository.
36 | - Make sure the tests pass, and add any new tests as appropriate.
37 | - Submit a pull request to the original repository.
38 |
39 | Thanks for your contributions!
40 |
41 | ### Format of the Commit Message
42 |
43 | We follow a rough convention for commit messages that is designed to answer two questions: what changed and why.
44 | The subject line should feature the what and the body of the commit should describe the why.
45 |
46 | ```
47 | scripts: add the test-cluster command
48 |
49 | this uses tmux to setup a test cluster that you can easily kill and
50 | start for debugging.
51 |
52 | Fixes #38
53 | ```
54 |
55 | The format can be described more formally as follows:
56 |
57 | ```
58 | :
59 |
60 |
61 |
62 |