Skip to content

Commit b9f87dd

Browse files
committed
Release 250430
1 parent f199549 commit b9f87dd

File tree

5 files changed

+237
-96
lines changed

5 files changed

+237
-96
lines changed

security/security-design/shared-assets/oci-security-health-check-standard/README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Owner: Olaf Heimburger
44

5-
Version: 250307 (cis_report.py version 2.8.8) for CIS OCI Foundation Benchmark 2.0.0
5+
Version: 250430 (cis_report.py version 2.8.8+) for CIS OCI Foundation Benchmark 2.0.0
66

77
Reviewed: 01.02.2024
88

@@ -15,7 +15,7 @@ Reviewed: 01.02.2024
1515

1616
The *OCI Security Health Check - Standard Edition* checks your OCI tenancy for [CIS Oracle Cloud Infrastructure Foundations Benchmark](https://www.cisecurity.org/benchmark/Oracle_Cloud) compliance.
1717

18-
### Disclaimer
18+
## Disclaimer
1919

2020
This asset covers the OCI platform as specified in the *CIS Oracle Cloud Infrastructure Foundations Benchmark*, only. Any workload provisioned in Databases, Compute VMs (running any Operating System), the Container Engine for Kubernetes, or in the VMware Solution is *out of scope* of the *OCI Security Health Check*.
2121

@@ -44,6 +44,7 @@ The file standard.sh acts as the entry point and does the following:
4444
- Call of cis_reports.py
4545
- Automatic output archive (ZIP file) creation
4646
- Automatic runtime protocol
47+
- Support for encrypted archive (ZIP file). New command line option `--zip-protect`.
4748

4849
Tested on **OCI Cloud Shell** with **Public network**, **Oracle Linux**, **MacOS 12** and higher.
4950

@@ -57,22 +58,22 @@ See the *OCI Security Health Check - Standard Edition* in action and watch the [
5758

5859
Before running the *OCI Security Health Check - Standard Edition* you should download and verify it.
5960

60-
- Download the latest distribution [oci-security-health-check-standard-250307.zip](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.zip).
61+
- Download the latest distribution [oci-security-health-check-standard-250430.zip](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.zip).
6162
- Download the respective checksum file:
62-
- [oci-security-health-check-standard-250307.sha512](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.sha512).
63-
- [oci-security-health-check-standard-250307.sha512256](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.sha512256).
63+
- [oci-security-health-check-standard-250430.sha512](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.sha512).
64+
- [oci-security-health-check-standard-250430.sha512256](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.sha512256).
6465
- Verify the integrity of the distribution. Both files must be in the same directory (for example, in your downloads directory).
6566

6667
On MacOS:
6768
```
6869
cd <your_downloads_directory>
69-
shasum -a 512256 -c oci-security-health-check-standard-250307.sha512256
70+
shasum -a 512256 -c oci-security-health-check-standard-250430.sha512256
7071
```
7172
7273
On Linux (including Cloud Shell):
7374
```
7475
cd <your_downloads_directory>
75-
sha512sum -c oci-security-health-check-standard-250307.sha512
76+
sha512sum -c oci-security-health-check-standard-250430.sha512
7677
```
7778
7879
**Reject the downloaded file if the check fails!**
@@ -85,10 +86,10 @@ In OCI Cloud Shell you can do a short cut without downloading the files mentione
8586
2. Open Cloud Shell
8687
3. Run these commands in your Cloud Shell:
8788
```
88-
wget -q https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.zip
89-
wget -q https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.sha512
90-
sha512sum -c oci-security-health-check-standard-250307.sha512
91-
unzip -q oci-security-health-check-standard-250307.zip
89+
wget -q https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.zip
90+
wget -q https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.sha512
91+
sha512sum -c oci-security-health-check-standard-250430.sha512
92+
unzip -q oci-security-health-check-standard-250430.zip
9293
```
9394
9495
## Prepare the OCI Tenancy
@@ -150,9 +151,22 @@ To start with reviewing the results, open the file named `tenancy_name_YYYYMMDDH
150151
It may look like this example:
151152
![Example](./files/resources/Example_Output.png)
152153
154+
# Advanced Use
155+
156+
The script `standard.sh` supports additional commandline options:
157+
158+
- `-h` prints a summary of supported options
159+
- `-v` prints the versions of the components used
160+
- `--cis 'options'` if you need to pass additional options to the cis-report.py. Always use single qoutes around the options. Examples:
161+
- `--cis '-h'` prints the options of cis_report.py
162+
- `--cis '--debug'` runs cis_report.py in debug mode with additional output
163+
- `--zip-protect` asks for a password of your choice. Zero-length passwords are not supported!
164+
153165
# Known Issues
154166
155-
1. Diagrams are not part of the HTML page.
167+
1. Python 3.8 is not supported anymore.
168+
OCI Cloud Shell is the minimal required environment. The Python version used in OCI Cloud Shell is 3.9.
169+
2. Diagrams are not part of the HTML page.
156170
This may be because of broken `numpy installation`. The following command should resolve this:
157171
`pip3 install --upgrade --force-reinstall --user numpy`
158172

security/security-design/shared-assets/oci-security-health-check-standard/files/oci-security-health-check-standard/README.md

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Owner: Olaf Heimburger
44

5-
Version: 250307 (cis_report.py version 2.8.8) for CIS OCI Foundation Benchmark 2.0.0
5+
Version: 250430 (cis_report.py version 2.8.8.1) for CIS OCI Foundation Benchmark 2.0.0
66

77
## When to use this asset?
88

@@ -21,33 +21,53 @@ The main goals of this script are:
2121
- Make the run as easy and smooth as possible.
2222
- Do not affect your desktop whenever possible.
2323

24+
## Benefits of this package
25+
26+
This package includes *two* files
27+
- standard.sh
28+
- scripts/cis_reports/cis_reports.py
29+
30+
The file standard.sh acts as the entry point and does the following:
31+
32+
- Automatic check for Python runtime version
33+
- Automatic venv creation and activation
34+
- Automatci installation of required Python libraries
35+
- Automatic **OCI Cloud Shell** and tenancy name detection
36+
- Automatic creation of timestamped output directory
37+
- Call of cis_reports.py
38+
- Automatic output archive (ZIP file) creation
39+
- Automatic runtime protocol
40+
- Support for encrypted archive (ZIP file). New command line option `--zip-protect`.
41+
42+
Tested on **OCI Cloud Shell** with **Public network**, **Oracle Linux**, **MacOS 12** and higher.
43+
2444
## Usage
2545

2646
### Download and verify the release file
2747

2848
Before running the *OCI Security Health Check - Standard Edition* you should download and verify it.
2949

30-
- Download the latest distribution [oci-security-health-check-standard-250307.zip](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.zip).
50+
- Download the latest distribution [oci-security-health-check-standard-250430.zip](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.zip).
3151
- Download the respective checksum file:
32-
- [oci-security-health-check-standard-250307.sha512](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.sha512).
33-
- [oci-security-health-check-standard-250307.sha512256](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250307.sha512256).
52+
- [oci-security-health-check-standard-250430.sha512](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.sha512).
53+
- [oci-security-health-check-standard-250430.sha512256](https://github.com/oracle-devrel/technology-engineering/raw/main/security/security-design/shared-assets/oci-security-health-check-standard/files/resources/oci-security-health-check-standard-250430.sha512256).
3454
- Verify the integrity of the distribution. Both files must be in the same directory (for example, in your downloads directory).
3555

3656
On MacOS:
3757
```
3858
cd <your_downloads_directory>
39-
shasum -a 512256 -c oci-security-health-check-standard-250307.sha512256
59+
shasum -a 512256 -c oci-security-health-check-standard-250430.sha512256
4060
```
4161
4262
On Linux (including Cloud Shell):
4363
```
4464
cd <your_downloads_directory>
45-
sha512sum -c oci-security-health-check-standard-250307.sha512
65+
sha512sum -c oci-security-health-check-standard-250430.sha512
4666
```
4767
4868
**Reject the downloaded file when the check fails!**
4969
50-
### Prepare the OCI Tenancy
70+
### <a name="preparing"></a>Prepare the OCI Tenancy
5171
5272
You can run the assessment as a member of the OCI `Administrator` group or
5373
create a group for auditing and assign the respective user to it.
@@ -70,26 +90,6 @@ To create a group for auditing do the following steps:
7090
- If "Domains" are listed you are migrated to Identity Domains
7191
- Create a group `grp-auditors`
7292
- Create a policy `pcy-auditing` with these statements:
73-
- For tenancies **without** Identity Domains use
74-
```
75-
allow group grp-auditors to inspect all-resources in tenancy
76-
allow group grp-auditors to read audit-events in tenancy
77-
allow group grp-auditors to read buckets in tenancy
78-
allow group grp-auditors to read dns in tenancy
79-
allow group grp-auditors to read domains in tenancy
80-
allow group grp-auditors to read file-family in tenancy
81-
allow group grp-auditors to read instance-configurations in tenancy
82-
allow group grp-auditors to read instances in tenancy
83-
allow group grp-auditors to read load-balancers in tenancy
84-
allow group grp-auditors to read nat-gateways in tenancy
85-
allow group grp-auditors to read network-security-groups in tenancy
86-
allow group grp-auditors to read public-ips in tenancy
87-
allow group grp-auditors to read resource-availability in tenancy
88-
allow group grp-auditors to read users in tenancy
89-
allow group grp-auditors to read vss-family in tenancy
90-
allow group grp-auditors to use cloud-shell in tenancy
91-
allow group grp-auditors to use cloud-shell-public-network in tenancy
92-
```
9393
- For tenancies **with** Identity Domains use
9494
```
9595
allow group 'Default'/'grp-auditors' to inspect all-resources in tenancy
@@ -110,6 +110,26 @@ To create a group for auditing do the following steps:
110110
allow group 'Default'/'grp-auditors' to use cloud-shell in tenancy
111111
allow group 'Default'/'grp-auditors' to use cloud-shell-public-network in tenancy
112112
```
113+
- For tenancies **without** Identity Domains use
114+
```
115+
allow group grp-auditors to inspect all-resources in tenancy
116+
allow group grp-auditors to read audit-events in tenancy
117+
allow group grp-auditors to read buckets in tenancy
118+
allow group grp-auditors to read dns in tenancy
119+
allow group grp-auditors to read domains in tenancy
120+
allow group grp-auditors to read file-family in tenancy
121+
allow group grp-auditors to read instance-configurations in tenancy
122+
allow group grp-auditors to read instances in tenancy
123+
allow group grp-auditors to read load-balancers in tenancy
124+
allow group grp-auditors to read nat-gateways in tenancy
125+
allow group grp-auditors to read network-security-groups in tenancy
126+
allow group grp-auditors to read public-ips in tenancy
127+
allow group grp-auditors to read resource-availability in tenancy
128+
allow group grp-auditors to read users in tenancy
129+
allow group grp-auditors to read vss-family in tenancy
130+
allow group grp-auditors to use cloud-shell in tenancy
131+
allow group grp-auditors to use cloud-shell-public-network in tenancy
132+
```
113133
- Assign a user to the `grp-auditors` group
114134
- Log out of the OCI Console
115135
@@ -187,7 +207,7 @@ allow group 'Default'/'grp-auditors' to inspect vcns in compartment <compartment
187207
- Upload the distribution file.
188208
- Extract it
189209
```
190-
unzip -q oci-security-health-check-standard-250307.zip
210+
unzip -q oci-security-health-check-standard-250430.zip
191211
```
192212
193213
#### Run the script
@@ -261,11 +281,11 @@ allow group 'Default'/'grp-auditors' to inspect vcns in compartment <compartment
261281
Follow the instructions to select /usr/bin/python3.9
262282
- Log out
263283
264-
- From your desktop, upload the `oci-security-health-check-standard-250307.zip` file to the Compute VM using any SFTP client.
284+
- From your desktop, upload the `oci-security-health-check-standard-250430.zip` file to the Compute VM using any SFTP client.
265285
- Log into the Compute VM
266286
- Extract the distribution
267287
```
268-
unzip -q oci-security-health-check-standard-250307.zip
288+
unzip -q oci-security-health-check-standard-250430.zip
269289
```
270290
- Change directory into `oci-security-health-check-standard`:
271291
```
@@ -321,7 +341,7 @@ The report results are summarized in two files:
321341
- *cis_html_summary_report.html* &ndash; The report in HTML that displays the all recommendations and their compliance status, respectively.
322342
- *Consolidated_Report.xslx* &ndash; An XSLX workbook with a summary and sheets for the non-compliant recommendations.
323343
324-
### Known Issues
344+
## Known Issues
325345
326346
No known issues.
327347
@@ -335,7 +355,7 @@ The *OCI Security Health Check - Standard Edition* would not be possible without
335355
336356
The Compliance Checking Script is certified by the [CIS Center of Internet Security for the OCI Oracle Cloud Foundation Benchmark v1.2, Level 1 and 2](https://www.cisecurity.org/partner/oracle).
337357
338-
# License
358+
## License
339359
340360
Copyright (c) 2022-2025 Oracle and/or its affiliates.
341361

security/security-design/shared-assets/oci-security-health-check-standard/files/oci-security-health-check-standard/README.txt

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
OCI Security Health Check - Standard Edition
33
============================================
44
Owner: Olaf Heimburger
5-
Version: 250307 (cis_report.py version 2.8.8) for CIS OCI Foundation Benchmark 2.0.0
5+
Version: 250430 (cis_report.py version 2.8.8.1) for CIS OCI Foundation Benchmark 2.0.0
66

77
When to use this asset?
88

9-
The OCI Security Health Check - Standard Edition checks an OCI tenancy for
9+
The 'OCI Security Health Check - Standard Edition' checks an OCI tenancy for
1010
CIS OCI Foundation Benchmark compliance.
1111

1212
Disclaimer
@@ -20,6 +20,33 @@ Kubernetes, the VMware Solution, etc. is "out of scope" of the
2020
This is not an official Oracle application and it is not supported
2121
by Oracle Support.
2222

23+
Before you begin
24+
25+
The main goals of this script are:
26+
27+
- Make the run as easy and smooth as possible.
28+
- Do not affect your desktop whenever possible.
29+
30+
Benefits of this package
31+
32+
This package includes *two* files
33+
- standard.sh
34+
- scripts/cis_reports/cis_reports.py
35+
36+
The file standard.sh acts as the entry point and does the following:
37+
38+
- Automatic check for Python runtime version
39+
- Automatic venv creation and activation
40+
- Automatci installation of required Python libraries
41+
- Automatic OCI Cloud Shell and tenancy name detection
42+
- Automatic creation of timestamped output directory
43+
- Call of cis_reports.py
44+
- Automatic output archive (ZIP file) creation
45+
- Automatic runtime protocol
46+
- Support for encrypted archive (ZIP file). New command line option `--zip-protect`.
47+
48+
Tested on OCI Cloud Shell with Public network, Oracle Linux, MacOS 12 and higher.
49+
2350
Usage
2451

2552
1 Prepare the OCI Tenancy
@@ -85,7 +112,7 @@ Usage
85112
- From the menu select the Cloud Shell item.
86113
- When running it the first time:
87114
- Upload the provided ZIP file.
88-
- Extract it with unzip -q oci-security-health-check-standard-250307.zip
115+
- Extract it with unzip -q oci-security-health-check-standard-250430.zip
89116
- Change directory into oci-security-health-check-standard
90117
$ cd oci-security-health-check-standard
91118
$ screen
@@ -103,7 +130,7 @@ Usage
103130
- Create a Dynamic Group
104131
'Default'/'dgp-instance-principal'
105132
This dynamic group must specify the compartment OCID (resource.compartment.id) or the Compute VM OCID (resource.instance.id), respectively.
106-
- Create permissions for the Dynamic Group
133+
- Create permissions for the Dynamic Group (with IAM domains)
107134
allow dynamic-group 'Default'/'dgp-instance-principal' to inspect all-resources in tenancy
108135
allow dynamic-group 'Default'/'dgp-instance-principal' to read audit-events in tenancy
109136
allow dynamic-group 'Default'/'dgp-instance-principal' to read buckets in tenancy
@@ -142,11 +169,11 @@ Usage
142169
- Log out
143170

144171
- From your desktop, upload the
145-
"oci-security-health-check-standard-250307.zip" file to the Compute VM
172+
"oci-security-health-check-standard-250430.zip" file to the Compute VM
146173
using any SFTP client.
147174
- Log into the Compute VM
148175
- Extract the distribution
149-
unzip -q oci-security-health-check-standard-250307.zip
176+
unzip -q oci-security-health-check-standard-250430.zip
150177

151178
- Change directory into "oci-security-health-check-standard":
152179
cd oci-security-health-check-standard

security/security-design/shared-assets/oci-security-health-check-standard/files/oci-security-health-check-standard/scripts/cis_reports/cis_reports.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
except Exception:
4343
OUTPUT_DIAGRAMS = False
4444

45-
RELEASE_VERSION = "2.8.8"
45+
RELEASE_VERSION = "2.8.8.1"
4646
PYTHON_SDK_VERSION = "2.147.0"
47-
UPDATED_DATE = "March 4, 2024"
47+
UPDATED_DATE = "April 24, 2025"
4848

4949

5050
##########################################################################
@@ -1202,7 +1202,7 @@ def __identity_read_compartments(self):
12021202

12031203
# Add root compartment which is not part of the list_compartments
12041204
self.__compartments.append(self.__tenancy)
1205-
deep_link = self.__oci_compartment_uri + compartment.id
1205+
deep_link = self.__oci_compartment_uri + self.__tenancy.id
12061206
root_compartment = {
12071207
"id": self.__tenancy.id,
12081208
"name": self.__tenancy.name,
@@ -3870,7 +3870,7 @@ def __report_cis_analyze_tenancy_data(self):
38703870

38713871

38723872
if domain['password_policy']['num_passwords_in_history']:
3873-
if domain['password_policy']['num_passwords_in_history'] < 24:
3873+
if domain['password_policy']['num_passwords_in_history'] is None or domain['password_policy']['num_passwords_in_history'] < 24:
38743874
self.cis_foundations_benchmark_2_0['1.6']['Findings'].append(domain)
38753875

38763876
else:

0 commit comments

Comments
 (0)