!10 Fix test scenarios for OSPP profile

From: @xuiny 
Reviewed-by: @mailofzxf 
Signed-off-by: @mailofzxf
This commit is contained in:
openeuler-ci-bot 2022-12-30 01:19:42 +00:00 committed by Gitee
commit 88cacf6a8b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 68 additions and 1 deletions

View File

@ -0,0 +1,63 @@
From ed7a96bc41d31ceeeb6b75b2a9565521f4f3eda5 Mon Sep 17 00:00:00 2001
From: Watson Sato <wsato@redhat.com>
Date: Mon, 2 Mar 2020 17:31:49 +0100
Subject: [PATCH 005/889] Fix test scenarios for OSPP profile
OSPP profile doesn't select banner_etc_issue
---
...banner_etc_issue_ospp_usbcg_banner.fail.sh | 2 +-
...banner_etc_issue_ospp_usbcg_banner.pass.sh | 30 +++++++++++++------
2 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.fail.sh b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.fail.sh
index db0b72089c..0f962279be 100644
--- a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.fail.sh
+++ b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.fail.sh
@@ -1,5 +1,5 @@
#!/bin/bash
#
-# profiles = xccdf_org.ssgproject.content_profile_ospp
+# profiles = xccdf_org.ssgproject.content_profile_stig
echo "This is not the expected banner" > /etc/issue
diff --git a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.pass.sh b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.pass.sh
index d36b3a146b..9bb0319323 100644
--- a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.pass.sh
+++ b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/tests/banner_etc_issue_ospp_usbcg_banner.pass.sh
@@ -1,12 +1,24 @@
#!/bin/bash
#
-# profiles = xccdf_org.ssgproject.content_profile_ospp
+# profiles = xccdf_org.ssgproject.content_profile_stig
-# usgcb_default banner
-echo "-- WARNING -- This system is for the use of authorized users only. Individuals
-using this computer system without authority or in excess of their authority
-are subject to having all their activities on this system monitored and
-recorded by system personnel. Anyone using this system expressly consents to
-such monitoring and is advised that if such monitoring reveals possible
-evidence of criminal activity system personal may provide the evidence of such
-monitoring to law enforcement officials." > /etc/issue
+# dod_banners banner
+echo "You are accessing a U.S. Government (USG) Information System (IS) that is
+provided for USG-authorized use only. By using this IS (which includes any
+device attached to this IS), you consent to the following conditions:
+-The USG routinely intercepts and monitors communications on this IS for
+purposes including, but not limited to, penetration testing, COMSEC monitoring,
+network operations and defense, personnel misconduct (PM), law enforcement
+(LE), and counterintelligence (CI) investigations.
+-At any time, the USG may inspect and seize data stored on this IS.
+-Communications using, or data stored on, this IS are not private, are subject
+to routine monitoring, interception, and search, and may be disclosed or used
+for any USG-authorized purpose.
+-This IS includes security measures (e.g., authentication and access controls)
+to protect USG interests--not for your personal benefit or privacy.
+-Notwithstanding the above, using this IS does not constitute consent to PM, LE
+or CI investigative searching or monitoring of the content of privileged
+communications, or work product, related to personal representation or services
+by attorneys, psychotherapists, or clergy, and their assistants. Such
+communications and work product are private and confidential. See User
+Agreement for details." > /etc/issue
--
2.39.0.windows.1

View File

@ -1,6 +1,6 @@
Name: scap-security-guide
Version: 0.1.49
Release: 2
Release: 3
Summary: Security guidance and baselines in SCAP formats
License: BSD-3-Clause
URL: https://github.com/ComplianceAsCode/content/
@ -11,6 +11,7 @@ Patch0002:backport-fix-deprecated-instance-of-element.getchildren.patch
Patch0003:backport-fix-deprecated-getiterator-function.patch
Patch0004:backport-fix-remaining-getchildren-and-getiterator-functions.patch
Patch0005:backport-fix-for-older-python-versions-lacking-.iter-method.patch
Patch0006:Fix-test-scenarios-for-OSPP-profile.patch
BuildArch: noarch
BuildRequires: libxslt, expat, python3, openscap-scanner >= 1.2.5, cmake >= 3.8, python3-jinja2, python3-PyYAML
@ -65,6 +66,9 @@ cd build
%doc %{_docdir}/%{name}/tables/*.html
%changelog
* Fri Dec 30 2022 xuxinyu <xuxinyu@xfusion.com> - 0.1.49-3
- Fix test scenarios for OSPP profile
* Sat Feb 26 2022 HuaxinLu <luhuaxin1@huawei.com> - 0.1.49-2
- fix for python upgrade