From patchwork Sat Jun 18 13:44:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akuster808 X-Patchwork-Id: 9313 X-Patchwork-Delegate: akuster808@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C9D1CCA473 for ; Sat, 18 Jun 2022 13:44:49 +0000 (UTC) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mx.groups.io with SMTP id smtpd.web10.9210.1655559879179826678 for ; Sat, 18 Jun 2022 06:44:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VDe2Xc23; spf=pass (domain: gmail.com, ip: 209.85.216.48, mailfrom: akuster808@gmail.com) Received: by mail-pj1-f48.google.com with SMTP id h34-20020a17090a29a500b001eb01527d9eso5578827pjd.3 for ; Sat, 18 Jun 2022 06:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=L6X42SzSHw6m9Hxe4nm13p4gQCU7cosoeaZRP/yhNd4=; b=VDe2Xc23P4mF6qtXPMiiEEau1vznNQ5aEuKi5YWU+9JCrlmBP6fsKbJdc2P32A1vyF M7o24mryx/LlZR4Jaimtz5UCa9avwrQWXNVFkMyeUBfK1K6mT8av7NAXDOnG84mHZIQ6 3T+BKr8nL1pmoNoOD8GdmIoERwLibDLgoTUKSYM+QCobbME4znC93YZ1s0xeFitO5eia uxuuEe578X05CCh5+NTzs3GzM2z6eMG9Ax4JpFNowL9Pf1oWHAqd45H077bZSOTp09zv 9ZKJdDAu+FYcVdHwojphlDTCBfyWpvQSufhk6ZnTu2QxlpOZnkqVCbiegRyaDbdBGyPL Lj3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=L6X42SzSHw6m9Hxe4nm13p4gQCU7cosoeaZRP/yhNd4=; b=1ysNwumXjvqeu8eIXT61J4wWAWhJ+uAWO7fpvbjQwA76VhG/hKZif/zcSBp9/HWA/j csewxkLwvq9xvPqEBKPAQhFMs1kEM/VDMrz4n6KO0mzf9YtFZryvjgcLapWV9ba8qUwT PWV8O0/TcAPOQgRA5CBfri69vYIsnN5OiVFXbNYyMc6yRJfulnhKDOsz9gXVPkRpf31k LnB41ErftceUrzfBVc6K1yWOvCI+flTK72pDoelV83PNPprZLBcwzx8PwaWG3JCUEk2g C6K6gzBePs76mhr1qifM5pI5PqsAIsMchJNed5x7GInwBMdYK8B9bF3Hq+r9rRUvd8Cx 6SgA== X-Gm-Message-State: AJIora/VMexf6DfliaYc1z5YBa0SBvaJJczGgSZkDOGUX9f6m0CxhJDl Lbd0VTYsP9jxG8cU/CBWpNRyRNlnCzk= X-Google-Smtp-Source: AGRyM1vgu9u7TOYPyLc7eqoFcbovekYh3OcKjvYxLciU99BlWpI3hkcwUj2UT2HSlKDpfQz0pSjiBA== X-Received: by 2002:a17:902:8bc5:b0:168:cca6:1b29 with SMTP id r5-20020a1709028bc500b00168cca61b29mr14217648plo.129.1655559877999; Sat, 18 Jun 2022 06:44:37 -0700 (PDT) Received: from keaua.hsd1.ca.comcast.net ([2601:202:4180:a5c0:b704:2c1c:4bb5:cab1]) by smtp.gmail.com with ESMTPSA id o26-20020a63921a000000b00408a3724b38sm5689880pgd.76.2022.06.18.06.44.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 06:44:37 -0700 (PDT) From: Armin Kuster To: yocto@lists.yoctoproject.org Subject: [meta-security][PATCH 1/9] security-test-image: auto include layers if present. Date: Sat, 18 Jun 2022 06:44:27 -0700 Message-Id: <20220618134435.2370878-1-akuster808@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 18 Jun 2022 13:44:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/57343 This is to simplify tesing to build one image and include pkgs depending on the layers included in the BBLAYERS. Signed-off-by: Armin Kuster --- recipes-core/images/security-test-image.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes-core/images/security-test-image.bb b/recipes-core/images/security-test-image.bb index 54d8978..133a7a1 100644 --- a/recipes-core/images/security-test-image.bb +++ b/recipes-core/images/security-test-image.bb @@ -4,7 +4,16 @@ require security-build-image.bb IMAGE_FEATURES += "ssh-server-openssh" -TEST_SUITES = "ssh ping ptest apparmor clamav samhain sssd tripwire checksec smack suricata" +IMAGE_INSTALL:append = "\ + ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-test", "",d)} \ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "tpm-layer", "packagegroup-security-tpm","", d)} \ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "tpm-layer", "packagegroup-security-tpm2","", d)} \ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "parsec-layer", "packagegroup-security-parsec","", d)} \ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "integrity", "packagegroup-ima-evm-utils","", d)} \ +" + +TEST_SUITES = "ssh ping apparmor clamav samhain sssd checksec smack suricata" +TEST_SUITES:append = " parsec tpm2 swtpm ima" INSTALL_CLAMAV_CVD = "1" From patchwork Sat Jun 18 13:44:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akuster808 X-Patchwork-Id: 9316 X-Patchwork-Delegate: akuster808@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61FD8CCA47F for ; Sat, 18 Jun 2022 13:44:49 +0000 (UTC) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web08.9332.1655559880163913598 for ; Sat, 18 Jun 2022 06:44:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qQnqLjZn; spf=pass (domain: gmail.com, ip: 209.85.214.179, mailfrom: akuster808@gmail.com) Received: by mail-pl1-f179.google.com with SMTP id d5so6033647plo.12 for ; Sat, 18 Jun 2022 06:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=yxLlLcKbvBZEKQebBVoSzHe1D9E6CBq0UpJ/4ijBfgE=; b=qQnqLjZn1HkxFDvYsecipWQMprEH7gAz/570vAV6+isdQxQBOPjckrSTM3q3aNMmQI ycR81fiq0tZbpbFx9KB4TnBM+j8QrhRbSRHFq0FsiS0hzkmI6Swoanmt7BKcOgw0HKD7 1PxmTiZtFJ6XfeA0Tjs1k8MngrPf65ZC8K7ypxBaJTIFDm11bdcLD865qLXwQFBNc7aL M6Qt3D4rB4fxbegd6Y3ehD9Ib/1xgG4OMRfokeazeXzlKD6pbHzhy7gCutKJMUKCR4iJ mSNsjGRQ1E4qWbeDxCXVkldhPl7Zb/+FY9eSrJv5/1kfSPRX+CBWn7uc0F3UHgfonOkS jkAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yxLlLcKbvBZEKQebBVoSzHe1D9E6CBq0UpJ/4ijBfgE=; b=f8ZwOFrIgn2FUy9W7JP/u+yp6jW+0qtzDtv2axKvtviEgyXm1DdYqQROb7ln8mp0ar evNVKgtbOFHkCj3lJwhv2FzzLZrfI2RvNCphBz9lTElD3UIDgVUenQp8rw9eO9rdQbUw iRQHTCbXBmchCoJEQioJZzIhNmvMX4lt5OuDdfmmotnkbvwWMHRXdpoBR/hO0pM4m0TO MiccFHqUhVKtY7mosAzczHUfNQR5xipTPYKj5IhbHGla8+sobAbSJCEf50v7BLHLo+la 0DOEKMW5IH5jQhKUL69uFANjB+sX0b4QmnohI5aq24IZLsjccIuIrmb3cbjTvOmbhmEt 8O0A== X-Gm-Message-State: AJIora9qU69s2/SvyX+mv+7PAWqbJaz/c+XRyu77k2Sj1EBQ5JFXVk6n qX9YKjIWR7QVwdg0iEO5kdi3r8nCSAU= X-Google-Smtp-Source: AGRyM1uN2+mlxO1r26ePqF0qVKSSr56+IjXs6WiBNGm4x92NvEstVJeXWvDSPVfuF/2r/Jf47ZOIpQ== X-Received: by 2002:a17:903:234f:b0:16a:30f:4a85 with SMTP id c15-20020a170903234f00b0016a030f4a85mr9190061plh.89.1655559879245; Sat, 18 Jun 2022 06:44:39 -0700 (PDT) Received: from keaua.hsd1.ca.comcast.net ([2601:202:4180:a5c0:b704:2c1c:4bb5:cab1]) by smtp.gmail.com with ESMTPSA id o26-20020a63921a000000b00408a3724b38sm5689880pgd.76.2022.06.18.06.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 06:44:38 -0700 (PDT) From: Armin Kuster To: yocto@lists.yoctoproject.org Subject: [meta-security][PATCH 2/9] smack-test: more py3 covertion Date: Sat, 18 Jun 2022 06:44:28 -0700 Message-Id: <20220618134435.2370878-2-akuster808@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220618134435.2370878-1-akuster808@gmail.com> References: <20220618134435.2370878-1-akuster808@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 18 Jun 2022 13:44:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/57344 Signed-off-by: Armin Kuster --- recipes-mac/smack/smack-test/notroot.py | 12 ++++++------ .../smack/smack-test/smack_test_file_access.sh | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/recipes-mac/smack/smack-test/notroot.py b/recipes-mac/smack/smack-test/notroot.py index f0eb0b5..89f83f4 100644 --- a/recipes-mac/smack/smack-test/notroot.py +++ b/recipes-mac/smack/smack-test/notroot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Script used for running executables with custom labels, as well as custom uid/gid # Process label is changed by writing to /proc/self/attr/curent @@ -9,8 +9,8 @@ # """By default, each user in Debian GNU/Linux is given a corresponding group # with the same name. """ # -# Usage: root@desk:~# python notroot.py