59 Commits

Author SHA1 Message Date
Armin Kuster
f9fdf97730 layer.conf: Add hardknott to LAYERSERIES_COMPAT
Thats codename for 3.3

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-03-18 08:01:19 -07:00
Armin Kuster
adcd7c4371 scap-security-guide: Inherit python3targetconfig
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-02-23 20:34:51 -08:00
Armin Kuster
be7f9bda1d openscap: Inherit python3targetconfig
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-02-23 20:34:51 -08:00
Jate Sujjavanich
16ee7308c9 scap-security-guide: Fix openembedded platform tests and build
Add patches to fix openembedded nodistro tests and openembedded build within
ssg metadata.

Signed-Off-By: Jate Sujjavanich <jatedev@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2021-02-14 16:31:00 -08:00
Yi Zhao
080778ca97 scap-security-guide: fix build with Python 3.9
The getchildren and getiterator functions are deprecated in Python 3.9.
Backport 3 patches to fix the build issue.

Fixes:
File
"/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/ssg/build_stig.py",
line 41, in add_references
    index = rule.getchildren().index(ref)
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-11-15 11:03:39 -08:00
Armin Kuster
58c17d008d meta-security: Add gatesgarth to LAYERSERIES_COMPAT
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-19 18:14:23 -07:00
Mingli Yu
4c2f7ffd49 scap-security-guide: add expat-native to DEPENDS
Add expat-native to DEPENDS to fix the below do_configure error:
| CMake Error at CMakeLists.txt:165 (message):
|  xmlwf is required!

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-10-15 21:15:03 -07:00
Armin Kuster
6a8ad0efe7 lynis: update to 3.0.0
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-07-25 08:58:38 -07:00
Armin Kuster
a08e845642 openscap: update to 1.3.3
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-06-19 16:03:23 -07:00
Martin Jansa
7f7897590c layer.conf: update LAYERSERIES_COMPAT for dunfell
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Armin Kuster
bc7b81685c lynis: add missing rdepends
add findutils

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Yi Zhao
1f7ca85929 openscap-daemon: add missing runtime dependencies
Add missing runtime dependencies otherwise /usr/bin/oscapd can not
startup.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-27 16:53:25 -07:00
Yi Zhao
b23e7eac2d scap-security-guide: pass the correct schema file path to openscap-native
There is a build error when using openscap-native sstate cache.
Steps to reproduce:
Create a new build project in build-1 directory.
$ bitbake openscap-native
Then remove the whole build directory only keep the sstate-cache
directory as a sstate mirror.

Create another new build project in build-2 directory.
Set SSTATE_MIRRORS
$ bitbake scap-security-guide

Error message:
OpenSCAP Error: Schema file 'xccdf/1.1/xccdf-schema.xsd' not found in path
'/buildarea/build-1/tmp/work-shared/openscap/oscap-build-artifacts/usr/share/openscap/schemas' when trying to validate
'/buildarea/build-2/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/jre/xccdf-unlinked-resolved.xml'
[/buildarea/build-1/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/validate.c:104]

The oscap command from openscap-native tries to find the schema files in
build-1 directory since these paths are hardcoded when building
openscap-native.

We need to pass the correct schema/xslt/cpe paths to oscap to make sure
it can find the files in right location.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-05 07:20:07 -08:00
Yi Zhao
ace43479e7 scap-security-guide: fix xml parsing error when build remediation files
Backport 2 patches to fix the build error:

Processing fix.text for: java_jre_configure_crypto_policy rule
Unable to extract part of the fix.text after inclusion of remediation functions. Aborting..
jre/CMakeFiles/generate-internal-jre-bash-fixes.xml.dir/build.make:60:
recipe for target 'jre/bash-fixes.xml' failed
make[2]: *** [jre/bash-fixes.xml] Error 1
make[2]: *** Deleting file 'jre/bash-fixes.xml'

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-09 09:33:22 -08:00
Armin Kuster
1bad7ebf9c meta-security-compliance/conf/layer.conf: fix typo
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-12-15 08:45:49 -08:00
Armin Kuster
72b05edff5 meta-security: add layer index callouts
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-12-07 15:31:34 -08:00
Armin Kuster
a0dee993cd layer.conf: Update for zeus series
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-11 07:41:01 -07:00
Armin Kuster
e8e3044fce oe-scap: Fix QA RDEPENDS error
ERROR: oe-scap-1.0-r0 do_package_qa: QA Issue: /usr/share/oe-scap/run_tests.sh contained in package oe-scap requires /bin/bash, but no providers found in RDEPENDS_oe-scap? [file-rdeps]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-09-07 08:34:22 -07:00
Armin Kuster
303800de96 scap-security-guide: add depends on openscap-native do_install
This ensures openscap-native does install the needed patches
security guilde needs to build

Minor recipe cleanup too

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-09-07 08:34:22 -07:00
Armin Kuster
a6a431f6ad openscap: Drop nostamp
add cleandir depends to do_install task

This nostamp is causing issues with the yocto-check-layer when checking
hash changes.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-09-07 08:34:15 -07:00
Yi Zhao
6d399b34ab openscap: add runtime dependency on bash and python3-core
Fixes:
ERROR: QA Issue: /usr/bin/oscap-ssh contained in package openscap requires /bin/bash, but no providers found in RDEPENDS_openscap? [file-rdeps]
ERROR: QA Issue: /usr/bin/scap-as-rpm contained in package openscap requires /usr/bin/python3, but no providers found in RDEPENDS_openscap?  [file-rdeps]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-24 12:58:37 -07:00
Yi Zhao
7fb8569f0b openscap: fix scap-security-guide build error
It would fail to build scap-security-guide when use openscap-native
sstate cache.

Steps to reproduce:
Create a new build project:
$ bitbake openscap-native
$ bitbake openscap-native -c clean
$ bitbake scap-security-guide

Error message:
OpenSCAP Error: Schema file 'xccdf/1.1/xccdf-schema.xsd' not found in path
'/buildarea/build/tmp/work-shared/openscap/oscap-build-artifacts/usr/share/openscap/schemas'
when trying to validate
'/buildarea/build/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/chromium/xccdf-unlinked-resolved.xml'
[/buildarea/build/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/validate.c:104]
Invalid XCCDF Checklist (1.1) content in
/buildarea/build/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/chromium/xccdf-unlinked-resolved.xml.
[/buildarea/build/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/oscap_source.c:346]
chromium/CMakeFiles/generate-internal-chromium-xccdf-unlinked-resolved.xml.dir/build.make:63: recipe for target 'chromium/xccdf-unlinked-resolved.xml' failed

When using sstate cache, the openscap-native doesn't install the
artifacts to work-shared/openscap/oscap-build-artifacts when prepare
recipe sysroot for scap-security-guide.

Set do_install[nostamp] to 1 to ensure the openscap-native artifacts
are installed to work-shared/openscap/oscap-build-artifacts even if
using sstate cache.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-24 12:54:57 -07:00
Yi Zhao
531f6c1a4d scap-security-guide: fix typo
Fix typo: RDEPNEDS_${PN} -> RDEPENDS_${PN}

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-07 07:09:50 -07:00
Yi Zhao
daf92c57fa openscap: cleanup DEPENDS
Remove autoconf-archive from DEPENDS because it is using CMake/Ninjia
build now. Also remove unused dpkg-native dependency from
DEPENDS_class-native.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-07 07:09:50 -07:00
Yi Zhao
0a73a14fbb scap-security-guide: update recipe
* Set B="${S}/build" to fix the build failure for out of source
  directory
* Remove do_complile and do_install. Use the default functions from
  cmake.bbclass.
* Install the artifacts to /usr/share rather than /usr/local/share

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-04 12:17:25 -07:00
Yi Zhao
b9b575823d openscap: update recipe
* Add PACKAGECONFIG for gcrypt, nss3 and selinux
* Use EXTRA_OECMAKE rather than EXTRA_OECONF
* Set CMAKE_SKIP_RPATH and CMAKE_SKIP_INSTALL_RPATH instead of chrpath
* Remove ptest since there are many host contamination issues on target.
  We will add it back when these issues are solved.
* Drop the unused patch
* Add PV

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-04 12:17:25 -07:00
Armin Kuster
eca01510bf meta-security-compliance: add meta-python
with some for the recipe updates, more pyton support is needed

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-17 16:56:39 -07:00
Armin Kuster
a64348d0df scap-security-guide: update to 0.1.44
create a PV version to track upstream
git version includes OE changes

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-17 16:56:39 -07:00
Armin Kuster
90ccc8b4f5 openscap: add 1.3.1 recipes for upstream source
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-17 16:56:39 -07:00
Armin Kuster
37040cfb76 openscap_git: update to 1.3.0
removed unneeded patch
convert over to cmake

refactor files

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-17 16:56:02 -07:00
Mark Asselstine
eabb07f6d2 openscap/scap-security-guide: use _git instead of versioned filenames
In order to facilate the reuse of the recipe code via layer or distro
specific bbappends rename the recipe files to use _git instead of
versined filenames. Specifically this allows for minimal bbappends in
additional layers which may use the upstream, non-forked, repos that
can be version skewed when compared to what is present in this repo.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-07 19:18:41 -07:00
Armin Kuster
217e33ff31 meta-security-compliance: update README
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-07 19:18:41 -07:00
Armin Kuster
0581604172 lynis: update to 2.7.5
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-07 19:18:18 -07:00
Armin Kuster
723cd9e372 layers: set warrior only
remove TEST_SUITES from main layer.conf

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-06-26 15:47:47 -07:00
Armin Kuster
63af29ba48 layer.conf: Add warrior to compatible release series
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-04-07 05:10:15 +05:30
Armin Kuster
eb6fa0cf47 lynis: update to 2.7.2
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-16 04:17:29 -07:00
Yi Zhao
d0fc8c6f70 oe-scap: fix inconsistent indentation
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-08 14:51:55 -08:00
Yi Zhao
70802667ab openscap-daemon: backport patch to fix build error with python 3.7
Fixes build error:
  | Traceback (most recent call last):
  |   File "setup.py", line 25, in <module>
  |     from openscap_daemon import version
  |   File "/buildarea/build/tmp/work/core2-64-poky-linux/openscap-daemon/0.1.10-r0/git/openscap_daemon/__init__.py", line 22, in <module>
  |     from openscap_daemon.system import System
  |   File "/buildarea/build/tmp/work/core2-64-poky-linux/openscap-daemon/0.1.10-r0/git/openscap_daemon/system.py", line 29
  |     from openscap_daemon import async
  |                                     ^
  | SyntaxError: invalid syntax

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-08 14:51:55 -08:00
Yi Zhao
b081fdc807 scap-security-guide: use makefile generator instead of ninja for cmake
Fixes build error:
  | make: *** No rule to make target 'openembedded'.  Stop.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-08 14:51:55 -08:00
Armin Kuster
de9d6d1793 lynis: update to 2.7.0
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-12-06 22:37:33 -08:00
Armin Kuster
e920ff6e40 os-release: remove OS_RELEASE_FEILD extending
depends on the OS_RELEASRE_FEILD os-release changes in core
otherwise yocto-check-layer will fail

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-31 09:02:21 -07:00
Armin Kuster
04ef9df593 meta-security: add THUD
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-09-29 10:42:53 -07:00
Armin Kuster
76ae9a21f7 lynis: update to 2.6.8
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-09-17 21:08:19 -07:00
Armin Kuster
17f0700b9f meta-security-compliance: bump layer priority
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-09-17 21:08:19 -07:00
Armin Kuster
7aa34f55a6 openscap-daemon: update to 1.10
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-09-17 21:08:19 -07:00
Armin Kuster
58ab731ab6 openscap: update 1.2.17
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-09-17 21:08:19 -07:00
Armin Kuster
f1e482a498 meta-*: add LAYERSERIES_COMPAT to layer.conf files
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-13 08:18:28 -07:00
Robert Yang
3963c388a3 conf/layer.conf: remove bbclass from BBFILES
Add bbclass to BBFILES doesn't make any sense.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-02-06 21:16:48 +05:30
Armin Kuster
694ab819bc openscap: fix build issue
core2-64-oe-linux/openscap/1.2.15-r0/git/src/.libs/libopenscap.so: error: undefined reference to 'dlopen'
| core2-64-oe-linux/openscap/1.2.15-r0/git/src/.libs/libopenscap.so: error: undefined reference to 'dlsym'
| core2-64-oe-linux/openscap/1.2.15-r0/git/src/.libs/libopenscap.so: error: undefined reference to 'dlerror'
| core2-64-oe-linux/openscap/1.2.15-r0/git/src/.libs/libopenscap.so: error: undefined reference to 'dlclose'

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-12-10 15:03:46 -08:00
Armin Kuster
d9145660cc openscape: fix ptest compile errors and update
update to 1.2.15

plus
ERROR: openscap-1.2.14-r0 do_package_qa: QA Issue: /usr/lib/openscap/ptest/tests/probes/process58/all.sh contained in package openscap-ptest requires /bin/bash, but no providers found in RDEPENDS_openscap-ptest? [file-rdeps]
ERROR: openscap-1.2.14-r0 do_package_qa: QA Issue: /usr/lib/openscap/ptest/tests/xmldiff.pl contained in package openscap-ptest requires /usr/bin/perl, but no providers found in RDEPENDS_openscap-ptest? [file-rdeps]
ERROR: openscap-1.2.14-r0 do_package_qa: QA Issue: /usr/lib/openscap/ptest/tests/nist/test_worker.py contained in package openscap-ptest requires /usr/bin/python2, but no providers found in RDEPENDS_openscap-ptest? [file-rdeps]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-10-15 16:35:15 -07:00