Skip to content

Commit c8fdb85

Browse files
authored
Merge pull request #80 from pdeslaur/deprecate-secdb-docs
chore(secdb): Mark secdb as deprecated
2 parents fd192b8 + 50719ff commit c8fdb85

File tree

2 files changed

+41
-34
lines changed

2 files changed

+41
-34
lines changed

docs/foundational_concepts.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,23 @@ We can use advisory data to produce different kinds of downstream data. The prim
3838

3939
### Security feeds
4040

41-
#### The secdb
41+
#### OSV feed (Recommended)
42+
43+
**✅ RECOMMENDED**: New scanner integrations must use the OSV feed. If you're unfamiliar with the OSV format, check out https://ossf.github.io/osv-schema/.
44+
45+
The OSV feed provides several advantages over the secdb. While the secdb uses a format unique to the Alpine community, OSV has grown into a standard used by numerous software ecosystems. On top of that, the OSV format also allows data providers (like Chainguard) to express more detail about each vulnerability and its impact on their provided software artifacts (APKs, in our case).
46+
47+
Chainguard provides a **single OSV feed** that includes security data for both Wolfi and Chainguard's private package repositories — unlike how there are _two secdbs_, for "Wolfi" and "Chainguard" respectively.
48+
49+
An index of Chainguard's OSV data is located at `https://packages.cgr.dev/chainguard/osv/all.json`.
50+
51+
Each individual Chainguard advisory is represented as its own file, where the advisory ID (prefixed with `CGA-`) replaces the "all" in the URL above. For example, the advisory CGA-2226-2498-2frm is located at `https://packages.cgr.dev/chainguard/osv/CGA-2226-2498-2frm.json`.
52+
53+
This OSV feed is licensed under [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1), provided, however, the Chainguard License for Commercial Scanners shall apply to Commercial Scanners available at https://www.chainguard.dev/legal/chainguard-license-for-commercial-scanners, as such terms are defined therein.
54+
55+
#### The secdb (Deprecated)
56+
57+
**⚠️ DEPRECATED**: The secdb format is deprecated for new scanner integrations. Use the [OSV feed](#osv-feed-recommended) instead, which provides richer vulnerability data and follows industry standards.
4258

4359
A secdb is a JSON file that uses the same schema as the Alpine distro's security feeds.
4460

@@ -90,20 +106,6 @@ For example, here's an excerpt of the Wolfi secdb:
90106
91107
From this data, we can see that the Wolfi package named `apko`, in its version `0.7.3-r1`, resolved three CVEs: `CVE-2023-28840`, `CVE-2023-28841`, and `CVE-2023-28842`.
92108
93-
#### OSV feed
94-
95-
As an alternative to the secdb, we also provide an OSV feed. If you're unfamiliar with the OSV format, check out https://ossf.github.io/osv-schema/.
96-
97-
The OSV feed provides several advantages over the secdb. While the secdb uses a format unique to the Alpine community, OSV has grown into a standard used by numerous software ecosystems. On top of that, the OSV format also allows data providers (like Chainguard) to express more detail about each vulnerability and its impact on their provided software artifacts (APKs, in our case).
98-
99-
Chainguard provides a **single OSV feed** that includes security data for both Wolfi and Chainguard's private package repositories — unlike how there are _two secdbs_, for "Wolfi" and "Chainguard" respectively.
100-
101-
An index of Chainguard's OSV data is located at `https://packages.cgr.dev/chainguard/osv/all.json`.
102-
103-
Each individual Chainguard advisory is represented as its own file, where the advisory ID (prefixed with `CGA-`) replaces the "all" in the URL above. For example, the advisory CGA-2226-2498-2frm is located at `https://packages.cgr.dev/chainguard/osv/CGA-2226-2498-2frm.json`.
104-
105-
This OSV feed is licensed under [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1), provided, however, the Chainguard License for Commercial Scanners shall apply to Commercial Scanners available at https://www.chainguard.dev/legal/chainguard-license-for-commercial-scanners, as such terms are defined therein.
106-
107109
#### Update frequency
108110
109111
Both Chainguard's secdbs and the OSV feed are updated frequently, as soon as new data is available in our central advisory data store. This means that both data feed mechanisms usually receive updates several times a day.

docs/scanning_implementation.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,19 @@ If the SBOM already lists the installed distro packages for you, and each packag
114114

115115
## Step 3: Matching installed packages to vulnerabilities
116116

117-
🎯 **Goal of this step:** Produce a list of vulnerability matches, where each match links an installed distro package to a known vulnerability, using either the [secdb](foundational_concepts.md#the-secdb) associated with the identified distro or the unified [OSV feed](foundational_concepts.md#osv-feed-experimental).
117+
🎯 **Goal of this step:** Produce a list of vulnerability matches, where each match links an installed distro package to a known vulnerability, using the [OSV feed](foundational_concepts.md#osv-feed-recommended) (recommended) or the [secdb](foundational_concepts.md#the-secdb-deprecated) (deprecated).
118118

119-
### (If using the secdb) Selecting the correct vulnerability data set
119+
### Using the OSV feed (Recommended)
120120

121-
As [mentioned in "Foundational Concepts"](./foundational_concepts.md#the-secdb), Chainguard provides two different secdbs. We need to be sure we're using data from the correct secdb.
121+
**✅ RECOMMENDED**: New scanner integrations must use the OSV feed, which provides richer vulnerability data and follows industry standards.
122+
123+
The OSV feed provides a unified data source for both Wolfi and Chainguard packages, eliminating the need to select between different feeds. See the [OSV feed section](#using-the-osv-feed-to-find-vulnerability-matches) below for implementation details.
124+
125+
### Using the secdb (Deprecated)
126+
127+
**⚠️ DEPRECATED**: The secdb format is deprecated for new scanner integrations. Use the OSV feed instead.
128+
129+
As [mentioned in "Foundational Concepts"](./foundational_concepts.md#the-secdb-deprecated), Chainguard provides two different secdbs. We need to be sure we're using data from the correct secdb.
122130

123131
We make this choice using the distro ID we got from [Step 1: Detecting the distro](#step-1-detecting-the-distro):
124132

@@ -148,9 +156,19 @@ For the sake of an example, let's say we have this package on our list:
148156
},
149157
```
150158

151-
#### Using the secdb to find vulnerability matches
159+
#### Using the OSV feed to find vulnerability matches
160+
161+
To find vulnerabilities in the OSV feed that match a given package, you only need to know the distro ID, the package's name, and its version. (You don't need to find the package's origin package name.)
162+
163+
Packages in the OSV feed are identified by purl (Package URL — see the [specification](https://github.com/package-url/purl-spec) for more information).
164+
165+
OSV JSON documents have an `.affected` property, which is a list of objects. Each object has a `.package` property, which itself has a `.purl` property. You can index this value in order to quickly find vulnerability data given the above information.
166+
167+
For example, if you find that an image's distro ID is `wolfi`, and there's an APK package named `ko` installed, you can look for affected ranges in the OSV documents where the package `purl` is `pkg:apk/wolfi/ko`.
168+
169+
From there, you can find that `affected` object's `.ranges` property in order to compare the APK package's installed version to the versions affected by the given vulnerability.
152170

153-
_(If you're using the OSV feed instead, jump down to [here](#using-the-osv-feed-to-find-vulnerability-matches).)_
171+
#### Using the secdb to find vulnerability matches (Deprecated)
154172

155173
The next step is to identify vulnerabilities for this package, using data from the [selected secdb](#selecting-the-correct-vulnerability-data-set).
156174

@@ -193,19 +211,6 @@ For any `secfixes` entry where our installed package version is LESS THAN the li
193211

194212
So following our example, where our container image has `libcrypto3` version `3.1.1-r2` installed, we'd know that our package is affected by `CVE-2023-3446` and `CVE-2023-3817` — because those CVEs are addressed in _later versions_ of our package than what we have installed in the image. And, we know that our package is not affected by `CVE-2023-0466`, `CVE-2023-4807`, `CVE-2022-4203`, `CVE-2022-4204`, or `CVE-2023-2975`.
195213

196-
197-
#### Using the OSV feed to find vulnerability matches
198-
199-
To find vulnerabilities in the OSV feed that match a given package, you only need to know the distro ID, the package's name, and its version. (You don't need to find the package's origin package name.)
200-
201-
Packages in the OSV feed are identified by purl (Package URL — see the [specification](https://github.com/package-url/purl-spec) for more information).
202-
203-
OSV JSON documents have an `.affected` property, which is a list of objects. Each object has a `.package` property, which itself has a `.purl` property. You can index this value in order to quickly find vulnerability data given the above information.
204-
205-
For example, if you find that an image's distro ID is `wolfi`, and there's an APK package named `ko` installed, you can look for affected ranges in the OSV documents where the package `purl` is `pkg:apk/wolfi/ko`.
206-
207-
From there, you can find that `affected` object's `.ranges` property in order to compare the APK package's installed version to the versions affected by the given vulnerability.
208-
209214
#### The meaning of version "0"
210215

211216
You probably noticed above that one of the "fixed" versions in examples above was `"0"`. There was never a version `"0"` of the `libcrypto3` or `openssl` packages. So what does this mean?
@@ -214,7 +219,7 @@ As a standard part of Chainguard's analysis, we identify vulnerabilities that ar
214219

215220
These false positive conclusions get translated to `secfixes` entries (and OSV data) with version `"0"`, because `0` sorts as _less than_ any possible installed version of an APK package.
216221

217-
### (Optional) Supplementing Chainguard's data with additional vulnerability information
222+
### Supplementing Chainguard's data with additional vulnerability information
218223

219224
It's perfectly acceptable to use only Chainguard's data when performing a scan of a Wolfi or Chainguard distro container image. Chainguard is continuously monitoring numerous vulnerability data sources to identify vulnerabilities that could affect any of its packages, and address any potential vulnerabilities with fixes or other advisory updates (such as identifying **false positives**).
220225

0 commit comments

Comments
 (0)