Skip to content

Commit 156539b

Browse files
authored
Merge pull request #1521 from oracle-devrel/security-healthcheck-update-241206
Security healthcheck update 241206
2 parents b3cacab + 8eacb68 commit 156539b

File tree

11 files changed

+231
-110
lines changed

11 files changed

+231
-110
lines changed

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

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

33
Owner: Olaf Heimburger
44

5-
Version: 241011
5+
Version: 241206
66

77
Reviewed: 01.02.2024
88

@@ -19,6 +19,15 @@ The *OCI Security Health Check - Standard Edition* checks an OCI tenancy for [CI
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

22+
**This is not an official Oracle application and it is not supported by Oracle Support.**
23+
24+
## Before you begin
25+
26+
The main goals of this script are:
27+
28+
- Make the run as easy and smooth as possible.
29+
- Do not affect your desktop whenever possible.
30+
2231
## Complete Runtime Example
2332

2433
See the *OCI Security Health Check - Standard Edition* in action and watch the [OCI Health Checks - Self Service video](https://www.youtube.com/watch?v=EzjKLxfxaAM).
@@ -29,22 +38,22 @@ See the *OCI Security Health Check - Standard Edition* in action and watch the [
2938

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

32-
- Download the latest distribution [oci-security-health-check-standard-241011.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-241011.zip).
41+
- Download the latest distribution [oci-security-health-check-standard-241206.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-241206.zip).
3342
- Download the respective checksum file:
34-
- [oci-security-health-check-standard-241011.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-241011.sha512).
35-
- [oci-security-health-check-standard-241011.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-241011.sha512256).
43+
- [oci-security-health-check-standard-241206.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-241206.sha512).
44+
- [oci-security-health-check-standard-241206.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-241206.sha512256).
3645
- Verify the integrity of the distribution. Both files must be in the same directory (for example, in your downloads directory).
3746

3847
On MacOS:
3948
```
4049
cd <your_downloads_directory>
41-
shasum -a 512256 -c oci-security-health-check-standard-241011.sha512256
50+
shasum -a 512256 -c oci-security-health-check-standard-241206.sha512256
4251
```
4352
4453
On Linux (including Cloud Shell):
4554
```
4655
cd <your_downloads_directory>
47-
sha512sum -c oci-security-health-check-standard-241011.sha512
56+
sha512sum -c oci-security-health-check-standard-241206.sha512
4857
```
4958
5059
**Reject the downloaded file if the check fails!**
@@ -57,10 +66,10 @@ In OCI Cloud Shell you can do a short cut without downloading the files mentione
5766
2. Open Cloud Shell
5867
3. Run these commands in your Cloud Shell:
5968
```
60-
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-241011.zip
61-
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-241011.sha512
62-
sha512sum -c oci-security-health-check-standard-241011.sha512
63-
unzip -q oci-security-health-check-standard-241011.zip
69+
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-241206.zip
70+
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-241206.sha512
71+
sha512sum -c oci-security-health-check-standard-241206.sha512
72+
unzip -q oci-security-health-check-standard-241206.zip
6473
```
6574
6675
## Prepare the OCI Tenancy
@@ -76,7 +85,8 @@ quickest way. If you decide to use this option, please continue reading in
7685
7786
### Recurring usage
7887
79-
For recurring usage, setting up a group for auditing is recommended. For setting this up follow the steps documented next.
88+
For recurring usage, setting up a group for auditing is recommended. For setting this up follow the steps documented in the next section.
89+
This applies for scenarios using the OCI Cloud Shell with public Internet access. For additional usage scenarios see the detailed instructions [README](files/oci-security-health-check-standard/README.md).
8090
8191
### Setting up an *Auditor* group and policy
8292
@@ -88,20 +98,22 @@ To create a group for auditing do the following steps:
8898
- Create a policy `pcy-auditing` with these statements (if your tenancy does not have Domains, replace `'Default'/'grp-auditors'` with `grp-auditors`):
8999
```
90100
allow group 'Default'/'grp-auditors' to inspect all-resources in tenancy
91-
allow group 'Default'/'grp-auditors' to read instances in tenancy
92-
allow group 'Default'/'grp-auditors' to read load-balancers in tenancy
101+
allow group 'Default'/'grp-auditors' to read audit-events in tenancy
93102
allow group 'Default'/'grp-auditors' to read buckets in tenancy
94-
allow group 'Default'/'grp-auditors' to read nat-gateways in tenancy
95-
allow group 'Default'/'grp-auditors' to read public-ips in tenancy
103+
allow group 'Default'/'grp-auditors' to read dns in tenancy
104+
allow group 'Default'/'grp-auditors' to read domains in tenancy
96105
allow group 'Default'/'grp-auditors' to read file-family in tenancy
97106
allow group 'Default'/'grp-auditors' to read instance-configurations in tenancy
107+
allow group 'Default'/'grp-auditors' to read instances in tenancy
108+
allow group 'Default'/'grp-auditors' to read load-balancers in tenancy
109+
allow group 'Default'/'grp-auditors' to read nat-gateways in tenancy
98110
allow group 'Default'/'grp-auditors' to read network-security-groups in tenancy
111+
allow group 'Default'/'grp-auditors' to read public-ips in tenancy
99112
allow group 'Default'/'grp-auditors' to read resource-availability in tenancy
100-
allow group 'Default'/'grp-auditors' to read audit-events in tenancy
101113
allow group 'Default'/'grp-auditors' to read users in tenancy
102114
allow group 'Default'/'grp-auditors' to read vss-family in tenancy
103-
allow group 'Default'/'grp-auditors' to read dns in tenancy
104115
allow group 'Default'/'grp-auditors' to use cloud-shell in tenancy
116+
allow group 'Default'/'grp-auditors' to use cloud-shell-public-network in tenancy
105117
```
106118
- Assign a user to the `grp-auditors` group.
107119
- Log out of the OCI Console.
@@ -117,7 +129,7 @@ After a completed run you will find a directory with a name starting with your t
117129
To start with reviewing the results, open the file named `tenancy_name_YYYYMMDDHHmmss_standard_cis_html_summary_report.html`.
118130
119131
It may look like this example:
120-
![Flyer](./files/resources/Example_Output.png)
132+
![Example](./files/resources/Example_Output.png)
121133
122134
# Known Issues
123135

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

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

33
Owner: Olaf Heimburger
44

5-
Version: 241011 (cis_report.py version 2.8.4+)
5+
Version: 241206 (cis_report.py version 2.8.6)
66

77
## When to use this asset?
88

@@ -12,31 +12,37 @@ The *OCI Security Health Check - Standard Edition* checks an OCI tenancy for CIS
1212

1313
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*.
1414

15-
This is not an official Oracle application and it is not supported
16-
by Oracle Support.
15+
**This is not an official Oracle application and it is not supported by Oracle Support.**
16+
17+
## Before you begin
18+
19+
The main goals of this script are:
20+
21+
- Make the run as easy and smooth as possible.
22+
- Do not affect your desktop whenever possible.
1723

1824
## Usage
1925

2026
### Download and verify the release file
2127

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

24-
- Download the latest distribution [oci-security-health-check-standard-241011.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-241011.zip).
30+
- Download the latest distribution [oci-security-health-check-standard-241206.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-241206.zip).
2531
- Download the respective checksum file:
26-
- [oci-security-health-check-standard-241011.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-241011.sha512).
27-
- [oci-security-health-check-standard-241011.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-241011.sha512256).
32+
- [oci-security-health-check-standard-241206.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-241206.sha512).
33+
- [oci-security-health-check-standard-241206.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-241206.sha512256).
2834
- Verify the integrity of the distribution. Both files must be in the same directory (for example, in your downloads directory).
2935

3036
On MacOS:
3137
```
3238
cd <your_downloads_directory>
33-
shasum -a 512256 -c oci-security-health-check-standard-241011.sha512256
39+
shasum -a 512256 -c oci-security-health-check-standard-241206.sha512256
3440
```
3541
3642
On Linux (including Cloud Shell):
3743
```
3844
cd <your_downloads_directory>
39-
sha512sum -c oci-security-health-check-standard-241011.sha512
45+
sha512sum -c oci-security-health-check-standard-241206.sha512
4046
```
4147
4248
**Reject the downloaded file when the check fails!**
@@ -67,45 +73,109 @@ To create a group for auditing do the following steps:
6773
- For tenancies **without** Identity Domains use
6874
```
6975
allow group grp-auditors to inspect all-resources in tenancy
70-
allow group grp-auditors to read instances in tenancy
71-
allow group grp-auditors to read load-balancers in tenancy
76+
allow group grp-auditors to read audit-events in tenancy
7277
allow group grp-auditors to read buckets in tenancy
73-
allow group grp-auditors to read nat-gateways in tenancy
74-
allow group grp-auditors to read public-ips in tenancy
78+
allow group grp-auditors to read dns in tenancy
79+
allow group grp-auditors to read domains in tenancy
7580
allow group grp-auditors to read file-family in tenancy
7681
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
7785
allow group grp-auditors to read network-security-groups in tenancy
86+
allow group grp-auditors to read public-ips in tenancy
7887
allow group grp-auditors to read resource-availability in tenancy
79-
allow group grp-auditors to read audit-events in tenancy
8088
allow group grp-auditors to read users in tenancy
8189
allow group grp-auditors to read vss-family in tenancy
82-
allow group grp-auditors to read dns in tenancy
8390
allow group grp-auditors to use cloud-shell in tenancy
91+
allow group grp-auditors to use cloud-shell-public-network in tenancy
8492
```
8593
- For tenancies **with** Identity Domains use
8694
```
8795
allow group 'Default'/'grp-auditors' to inspect all-resources in tenancy
88-
allow group 'Default'/'grp-auditors' to read instances in tenancy
89-
allow group 'Default'/'grp-auditors' to read load-balancers in tenancy
96+
allow group 'Default'/'grp-auditors' to read audit-events in tenancy
9097
allow group 'Default'/'grp-auditors' to read buckets in tenancy
91-
allow group 'Default'/'grp-auditors' to read nat-gateways in tenancy
92-
allow group 'Default'/'grp-auditors' to read public-ips in tenancy
98+
allow group 'Default'/'grp-auditors' to read dns in tenancy
99+
allow group 'Default'/'grp-auditors' to read domains in tenancy
93100
allow group 'Default'/'grp-auditors' to read file-family in tenancy
94101
allow group 'Default'/'grp-auditors' to read instance-configurations in tenancy
102+
allow group 'Default'/'grp-auditors' to read instances in tenancy
103+
allow group 'Default'/'grp-auditors' to read load-balancers in tenancy
104+
allow group 'Default'/'grp-auditors' to read nat-gateways in tenancy
95105
allow group 'Default'/'grp-auditors' to read network-security-groups in tenancy
106+
allow group 'Default'/'grp-auditors' to read public-ips in tenancy
96107
allow group 'Default'/'grp-auditors' to read resource-availability in tenancy
97-
allow group 'Default'/'grp-auditors' to read audit-events in tenancy
98108
allow group 'Default'/'grp-auditors' to read users in tenancy
99109
allow group 'Default'/'grp-auditors' to read vss-family in tenancy
100-
allow group 'Default'/'grp-auditors' to read dns in tenancy
101110
allow group 'Default'/'grp-auditors' to use cloud-shell in tenancy
111+
allow group 'Default'/'grp-auditors' to use cloud-shell-public-network in tenancy
102112
```
103113
- Assign a user to the `grp-auditors` group
104114
- Log out of the OCI Console
105115
106116
### Run the OCI Security Health Check in OCI Cloud Shell
107117
108-
The recommended way is to run the *OCI Security Health Check - Standard* in the OCI Cloud Shell. It does not require any additional configuration on a local desktop machine.
118+
The recommended way is to run the *OCI Security Health Check - Standard* in the [OCI Cloud Shell](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro.htm). It does not require any additional configuration on a local desktop machine.
119+
120+
#### Required IAM Policy statements
121+
122+
The following policy statement is part of the recommended policy statements for the `grp-auditors` group:
123+
```
124+
allow group 'Default'/'grp-auditors' to use cloud-shell in tenancy
125+
```
126+
127+
#### Networking Options for OCI Cloud Shell
128+
129+
OCI Cloud Shell sessions do not allow for any incoming connections, and there is no public IP address available.
130+
131+
So far, the *OCI Security Health Check - Standard Edition* in OCI Cloud Shell has been tested with Public Network Access only.
132+
133+
For details on OCI Cloud Shell Networking refer to [OCI Cloud Shell Networking](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro_topic-Cloud_Shell_Networking.htm#cloudshellintro_topic-Cloud_Shell_Networking) documentation.
134+
135+
<!--
136+
##### Public Network Access
137+
138+
The best networking option. When enabled the *OCI Security Health Check - Standard* can be run without any additional conifguration steps. To enable this option the following policy statement must be assigned to the `grp-auditors`:
139+
140+
```
141+
allow group 'Default'/'grp-auditors' to use cloud-shell-public-network in tenancy
142+
```
143+
144+
##### OCI Service Network Access
145+
146+
The default networking option for OCI Cloud Shell.
147+
148+
To use this option without access to the public Internet remove any presence of this policy statement:
149+
150+
```
151+
allow group ... to use cloud-shell-public-network in tenancy
152+
```
153+
154+
This option requires manual configuration of these Python libraries:
155+
- [xlsxwriter]()
156+
- [pytz]()
157+
- [pandas]()
158+
- [openpyxl]()
159+
- [pyyaml]()
160+
- [requests]()
161+
162+
For each library these steps need to done:
163+
164+
- Download the packages
165+
- Upload the packages
166+
- Unzip the packages
167+
- Install the packages
168+
169+
##### Private Network Access
170+
171+
```
172+
allow group 'Default'/'grp-auditors' to use subnets in compartment <compartment>
173+
allow group 'Default'/'grp-auditors' to use vnics in compartment <compartment>
174+
allow group 'Default'/'grp-auditors' to use network-security-groups in compartment <compartment>
175+
allow group 'Default'/'grp-auditors' to inspect vcns in compartment <compartment>
176+
```
177+
-->
178+
109179
110180
#### Upload the release file
111181
@@ -117,10 +187,10 @@ The recommended way is to run the *OCI Security Health Check - Standard* in the
117187
- Upload the distribution file.
118188
- Extract it
119189
```
120-
unzip -q oci-security-health-check-standard-241011.zip
190+
unzip -q oci-security-health-check-standard-241206.zip
121191
```
122192
123-
### Run the script
193+
#### Run the script
124194
- Change directory into `oci-security-health-check-standard`:
125195
```
126196
$ cd oci-security-health-check-standard
@@ -142,6 +212,7 @@ The recommended way is to run the *OCI Security Health Check - Standard* in the
142212
```
143213
./standard.sh -h
144214
```
215+
145216
### Using an OCI Compute VM (Oracle Linux)
146217
147218
- Create a Dynamic Group
@@ -190,11 +261,11 @@ The recommended way is to run the *OCI Security Health Check - Standard* in the
190261
Follow the instructions to select /usr/bin/python3.9
191262
- Log out
192263
193-
- From your desktop, upload the `oci-security-health-check-standard-241011.zip` file to the Compute VM using any SFTP client.
264+
- From your desktop, upload the `oci-security-health-check-standard-241206.zip` file to the Compute VM using any SFTP client.
194265
- Log into the Compute VM
195266
- Extract the distribution
196267
```
197-
unzip -q oci-security-health-check-standard-241011.zip
268+
unzip -q oci-security-health-check-standard-241206.zip
198269
```
199270
- Change directory into `oci-security-health-check-standard`:
200271
```

0 commit comments

Comments
 (0)