<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/cve-check.bbclass, branch hardknott-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-02-09T08:56:10+00:00</updated>
<entry>
<title>cve-check: add include/exclude layers</title>
<updated>2021-02-09T08:56:10+00:00</updated>
<author>
<name>akuster</name>
<email>akuster808@gmail.com</email>
</author>
<published>2021-02-08T05:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=73befa8f413090ec0d4eba45efe51303b25b0004'/>
<id>urn:sha1:73befa8f413090ec0d4eba45efe51303b25b0004</id>
<content type='text'>
There are times when exluding or including a layer
may be desired. This provide the framwork for that via
two variables. The default is all layers in bblayers.

CVE_CHECK_LAYER_INCLUDELIST
CVE_CHECK_LAYER_EXCLUDELIST

(From OE-Core rev: 5fdde65ef58b4c1048839e4f9462b34bab36fc22)

Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check.bbclass: add layer to cve log</title>
<updated>2021-02-09T08:56:10+00:00</updated>
<author>
<name>akuster</name>
<email>akuster808@gmail.com</email>
</author>
<published>2021-02-08T05:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=29e280f7ee6d38910e6186948272d641e1511fdd'/>
<id>urn:sha1:29e280f7ee6d38910e6186948272d641e1511fdd</id>
<content type='text'>
Lets include whcih layer a package belongs to and
add it to the cve logs

(From OE-Core rev: 00d965bb42dc427749a4c3985af56ceffff80457)

Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioning</title>
<updated>2021-01-30T10:41:04+00:00</updated>
<author>
<name>Lee Chee Yang</name>
<email>chee.yang.lee@intel.com</email>
</author>
<published>2021-01-29T03:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=86b42289bda5bc2a4eff221ab476f170dd3d3794'/>
<id>urn:sha1:86b42289bda5bc2a4eff221ab476f170dd3d3794</id>
<content type='text'>
add CVE_VERSION_SUFFIX to indicate the version suffix type, currently
works in two value, "alphabetical" if the version string uses single
alphabetical character suffix as incremental release, blank to not
consider the unidentified suffixes. This can be expand when more suffix
pattern identified.

refactor cve_check.Version class to use functools and add parameter to
handle suffix condition.

Also update testcases to cover new changes.

(From OE-Core rev: 5dfd5ad5144708b474ef31eaa89a846c57be8ac0)

Signed-off-by: Lee Chee Yang &lt;chee.yang.lee@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check: replace Looseversion with custom version class</title>
<updated>2021-01-23T17:08:54+00:00</updated>
<author>
<name>Lee Chee Yang</name>
<email>chee.yang.lee@intel.com</email>
</author>
<published>2021-01-22T10:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3807c6d9a78ac8ade24c9c69cfe2b9624c49a20d'/>
<id>urn:sha1:3807c6d9a78ac8ade24c9c69cfe2b9624c49a20d</id>
<content type='text'>
The way distutils.version.LooseVersion compare version are tricky, it treat
all these ( "1.0-beta2", "1.0-rc1", "1.0A", "1.0p2" and "1.0pre1") as greater
version than "1.0". This might be right for "1.0A" and "1.0p1" but not for
the rest, also these version could be confusing, the "p" in "1.0p1" can be
"pre" or "patched" version or even other meaning.

Replace Looseversion with custom class, it uses regex to capture common
version format like "1.1.1" or tag format using date like "2020-12-12" as
release section, check for following known string/tags ( beta, rc, pre, dev,
alpha, preview) as pre-release section, any other trailing characters
are difficult to understand/define so ignore them. Compare release
section and pre-release section saperately.

included selftest for the version class.

[YOCTO#14127]

(From OE-Core rev: 6ced85e9ddd3569240f1e8b82130d1ac0fffbc40)

Signed-off-by: Lee Chee Yang &lt;chee.yang.lee@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check: show real PN/PV</title>
<updated>2020-11-24T10:27:45+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2020-11-19T10:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0be2aedfd3fba09d187f5de31925747291ea5cd2'/>
<id>urn:sha1:0be2aedfd3fba09d187f5de31925747291ea5cd2</id>
<content type='text'>
The output currently shows the remapped product and version fields,
which may not be the actual recipe name/version. As this report is about
recipes, use the real values.

(From OE-Core rev: 18827d7f40db4a4f92680bd59ca655cca373ad65)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check: add CVE_CHECK_REPORT_PATCHED variable to suppress reporting of patched CVEs</title>
<updated>2020-09-30T14:01:51+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-29T15:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3d24ecf5406ae75a3acfca2e028581b675d04a8d'/>
<id>urn:sha1:3d24ecf5406ae75a3acfca2e028581b675d04a8d</id>
<content type='text'>
Default behavior is not changed. To suppress patched CVEs, set:

        CVE_CHECK_REPORT_PATCHED = ""

(From OE-Core rev: 05bd9f1f006cf94cf5324f96df29cd5862abaf45)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check: introduce CVE_CHECK_RECIPE_FILE variable to allow changing of per-recipe check file</title>
<updated>2020-09-30T14:01:51+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-29T15:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=47a35a3843258e8c590d62603d5062d0b096a22d'/>
<id>urn:sha1:47a35a3843258e8c590d62603d5062d0b096a22d</id>
<content type='text'>
The addition of this variable also makes it possible to change the
output suffix of the check files, e.g. in local.conf:

CVE_CHECK_MANIFEST_append = ".txt"
CVE_CHECK_RECIPE_FILE_append = ".txt"

(From OE-Core rev: 0d40f1482c6d87785ae47c46c2305e1df46f459a)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-update-db-native: use fetch task</title>
<updated>2020-09-12T13:49:00+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2020-09-10T21:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=33efd9351702e08a53e6512e235f947e4f9e914f'/>
<id>urn:sha1:33efd9351702e08a53e6512e235f947e4f9e914f</id>
<content type='text'>
Instead of inventing a new task to fetch the CVE data, use the existing
fetch task.

(From OE-Core rev: f5f97d33a1703d75b9fd9760f2c7767081538e00)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check: avoid FileNotFoundError if no do_cve_check task has run</title>
<updated>2020-09-10T12:48:26+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-09T20:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=06b20b01a0164547c689f1a8367ff9b14d8fdacc'/>
<id>urn:sha1:06b20b01a0164547c689f1a8367ff9b14d8fdacc</id>
<content type='text'>
For example, if you just run 'bitbake cve-update-db-native' in a clean
build system, |cve_tmp_file| won't exist yet.

(From OE-Core rev: dd4473f3d8e1c1a587b6de660775e4b46ddc5fad)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cve-check/cve-update-db-native: use lockfile to fix usage under multiconfig</title>
<updated>2020-09-10T12:48:26+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-09T20:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9ba2f3b8c3937bb4a3376d5537774f1dbb321bef'/>
<id>urn:sha1:9ba2f3b8c3937bb4a3376d5537774f1dbb321bef</id>
<content type='text'>
Previously CVE_CHECK_DB_FILE / CVE_CHECK_DB_DIR was the same across
multiconfigs which led to a race condition wherein multiple
cve-update-db-native:do_populate_cve_db tasks could attempt to write to
the same sqlite database. This led to the following task failure:

    Error executing a python function in exec_python_func() autogenerated:

    The stack trace of python calls that resulted in this exception/failure was:
    File: 'exec_python_func() autogenerated', lineno: 2, function: &lt;module&gt;
         0001:
     *** 0002:do_populate_cve_db(d)
         0003:
    File: '/mnt/data/agent/work/74f119cccb44f133/yocto/sources/poky/meta/recipes-core/meta/cve-update-db-native.bb', lineno: 103, function: do_populate_cve_db
         0099:        if year == date.today().year:
         0100:            cve_f.write('CVE database update : %s\n\n' % date.today())
         0101:
         0102:    cve_f.close()
     *** 0103:    conn.commit()
         0104:    conn.close()
         0105:}
         0106:
         0107:def initialize_db(c):
    Exception: sqlite3.OperationalError: disk I/O error

Use a lockfile to ensure multiple tasks don't step over each other.

(From OE-Core rev: 24e9380643a2ae3fcae193519cb64aedaf682153)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
