Skip to content

Commit f6cbe16

Browse files
netpickermailsanjayhere
authored andcommitted
modified test-rules (#75)
* removing ruleset files * adding 3_interface rules and refs * Revert "adding 3_interface rules and refs" This reverts commit 6ec630d. * added 3_interfaces rules and refs again * added 4_protocols tests * restrctured 3_interfaces folder * added 6_services * 5_snmp * 1 general recommendations * Checkpoint tests * adding xr, asa, nxos * modified test-rules --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
1 parent 34ee6ca commit f6cbe16

File tree

515 files changed

+6396
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+6396
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_1_10_ensure_force_users_to_change_password_at_first_login_after_password_was_changed_from_users_page_is_selected',
6+
platform=['checkpoint'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_1_10_ensure_force_users_to_change_password_at_first_login_after_password_was_changed_from_users_page_is_selected(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.rule_1_10_ensure_force_users_to_change_password_at_first_login_after_password_was_changed_from_users_page_is_selected
2+
3+
Reference:
4+
Remediation: Run the following command to set force-change-when setting.
5+
CLI:
6+
Hostname>set password-controls force-change-when password
7+
GUI:
8+
Navigate to User Management > Password Policy > Mandatory Password Change:
9+
Checked the 'Force users to change password at first login after password was
10+
changed from Users page' setting.
11+
12+
13+
14+
15+
16+
17+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_1_11_ensure_deny_access_after_failed_login_attempts_is_selected',
6+
platform=['checkpoint'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_1_11_ensure_deny_access_after_failed_login_attempts_is_selected(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.rule_1_11_ensure_deny_access_after_failed_login_attempts_is_selected
2+
3+
Reference:
4+
Remediation: Run the following command to set the deny-on-fail setting.
5+
CLI:
6+
Hostname>set password-controls deny-on-fail enable on
7+
GUI:
8+
Navigate to User Management > Password Policy > Deny Access After Failed
9+
Login Attempts:
10+
Checked the 'Deny access after failed login attempts' setting.
11+
12+
13+
14+
15+
16+
17+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_1_12_ensure_maximum_number_of_failed_attempts_allowed_is_set_to_5_or_fewer',
6+
platform=['checkpoint'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_1_12_ensure_maximum_number_of_failed_attempts_allowed_is_set_to_5_or_fewer(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.rule_1_12_ensure_maximum_number_of_failed_attempts_allowed_is_set_to_5_or_fewer
2+
3+
Reference: #o94478
4+
Notes:
5+
Looking for input regarding a value for this recommendation.
6+
Note from checkpoint documentation....
7+
Warning: Enabling this leaves you open to a "denial of service" -- if an attacker issues
8+
unsuccessful login attempts often enough you will be locked out. Please consider the
9+
advantages and disadvantages of this option, in light of your security policy, before
10+
enabling it.
11+
12+
Remediation: Run the following command to set the deny-on-fail failures-allowed setting.
13+
CLI:
14+
Hostname>set password-controls deny-on-fail failures-allowed 5
15+
16+
17+
18+
19+
20+
GUI:
21+
Navigate to User Management > Password Policy > Deny Access After Failed
22+
Login Attempts:
23+
checked and set ' Maximum number of failed attempts allowed is set to'
24+
setting to 5 or fewer.
25+
26+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_1_13_ensure_allow_access_again_after_time_is_set_to_300_or_more_seconds',
6+
platform=['checkpoint'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_1_13_ensure_allow_access_again_after_time_is_set_to_300_or_more_seconds(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.rule_1_13_ensure_allow_access_again_after_time_is_set_to_300_or_more_seconds
2+
3+
Reference:
4+
Remediation: Run the following command to set the deny-on-fail allow-afte setting.
5+
CLI:
6+
Hostname> set password-controls deny-on-fail allow-after 300
7+
8+
9+
10+
11+
12+
13+
GUI:
14+
Navigate to User Management > Password Policy > Deny Access After Failed
15+
Login Attempts:
16+
Set the 'Allow access again after time' setting to 300 or more seconds.
17+
18+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_1_1_ensure_minimum_password_length_is_set_to_14_or_higher',
6+
platform=['checkpoint'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_1_1_ensure_minimum_password_length_is_set_to_14_or_higher(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.rule_1_1_ensure_minimum_password_length_is_set_to_14_or_higher
2+
3+
Reference:
4+
Remediation: Run the following command to set the min-password-length setting.
5+
CLI:
6+
Hostname>set password-controls min-password-length 14
7+
GUI:
8+
Navigate to User Management > Password Policy
9+
Ensure 'Minimum Password Length' is set to 14 or higher.
10+
11+
12+
13+
14+
15+
.

0 commit comments

Comments
 (0)