Skip to content

Commit

Permalink
updated platform name for juniper in the tests (#78)
Browse files Browse the repository at this point in the history
* updated rule_1_1 test

* fixing flake8 reported errors

* fixing flake8 errors for all vendors

* fixed some more flake8

* added couple of tests

* updating platform name juniper to juniper_junos

---------

Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
  • Loading branch information
netpicker and mailsanjayhere committed Jul 11, 2024
1 parent d47b265 commit 7a70640
Show file tree
Hide file tree
Showing 185 changed files with 185 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_1_ensure_device_is_running_current_junos_software',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='show version | match JUNOS')
)
def rule_1_1_ensure_device_is_running_current_junos_software(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_2_ensure_end_of_life_junos_devices_are_not_used',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_2_ensure_end_of_life_junos_devices_are_not_used(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_3_ensure_device_is_physically_secured',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_3_ensure_device_is_physically_secured(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_4_ensure_configuration_is_backed_up_on_a_regular_schedule',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_4_ensure_configuration_is_backed_up_on_a_regular_schedule(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_5_ensure_backup_data_is_stored_and_transferred_securely',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_5_ensure_backup_data_is_stored_and_transferred_securely(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_6_ensure_maximum_ram_is_installed',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_6_ensure_maximum_ram_is_installed(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_7_ensure_logging_data_is_monitored',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_7_ensure_logging_data_is_monitored(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_1_8_ensure_retired_junos_devices_are_disposed_of_securely',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_1_8_ensure_retired_junos_devices_are_disposed_of_securely(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_2_1_ensure__protect_re__firewall_filter_is_set_for_inbound_traffic_to_the_routing_engine',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_2_1_ensure__protect_re__firewall_filter_is_set_for_inbound_traffic_to_the_routing_engine(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_1_1_ensure_caller_id_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_1_ensure_caller_id_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_1_2_ensure_access_profile_is_set_to_use_chap',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_2_ensure_access_profile_is_set_to_use_chap(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_1_3_forbid_dial_in_access',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_3_forbid_dial_in_access(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_2_1_ensure_vrrp_authentication_key_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_2_1_ensure_vrrp_authentication_key_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_2_2_ensure_authentication_type_is_set_to_md5',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_2_2_ensure_authentication_type_is_set_to_md5(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_3_ensure_unused_interfaces_are_set_to_disable',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_3_ensure_unused_interfaces_are_set_to_disable(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_4_ensure_interface_description_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_4_ensure_interface_description_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_5_ensure_proxy_arp_is_disabled',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_5_ensure_proxy_arp_is_disabled(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_8_ensure_loopback_interface_address_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_8_ensure_loopback_interface_address_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_9_ensure_only_one_loopback_address_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_9_ensure_only_one_loopback_address_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_1_1_ensure_caller_id_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_1_ensure_caller_id_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_1_2_ensure_access_profile_is_set_to_use_chap',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_2_ensure_access_profile_is_set_to_use_chap(commands, ref):
Expand Down
2 changes: 1 addition & 1 deletion CIS/Junos/3_interfaces/rule_3_1_3_forbid_dial_in_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_1_3_forbid_dial_in_access',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_1_3_forbid_dial_in_access(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_2_1_ensure_vrrp_authentication_key_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_2_1_ensure_vrrp_authentication_key_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_2_2_ensure_authentication_type_is_set_to_md5',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_2_2_ensure_authentication_type_is_set_to_md5(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_3_ensure_unused_interfaces_are_set_to_disable',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_3_ensure_unused_interfaces_are_set_to_disable(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_4_ensure_interface_description_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_4_ensure_interface_description_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_5_ensure_proxy_arp_is_disabled',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='show configuration interfaces | match "proxy-arp" | count')
)
def rule_3_5_ensure_proxy_arp_is_disabled(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_3_8_ensure_loopback_interface_address_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='show configuration interfaces lo0')
)
def rule_3_8_ensure_loopback_interface_address_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_3_9_ensure_only_one_loopback_address_is_set',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_3_9_ensure_only_one_loopback_address_is_set(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_4_10_1_ensure_icmp_router_discovery_is_disabled',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_10_1_ensure_icmp_router_discovery_is_disabled(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_4_11_1_ensure_authentication_is_set_to_md5',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_11_1_ensure_authentication_is_set_to_md5(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_4_12_1_ensure_lldp_is_disabled_if_not_required',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_12_1_ensure_lldp_is_disabled_if_not_required(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_4_12_2_ensure_lldp_med_is_disabled_if_not_required',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_12_2_ensure_lldp_med_is_disabled_if_not_required(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_4_1_1_ensure_peer_authentication_is_set_to_md5',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_1_1_ensure_peer_authentication_is_set_to_md5(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_4_1_2_ensure_peer_authentication_is_set_to_ipsec_sa',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_1_2_ensure_peer_authentication_is_set_to_ipsec_sa(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_4_1_3_ensure_ebgp_peers_are_set_to_use_gtsm',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_1_3_ensure_ebgp_peers_are_set_to_use_gtsm(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@low(
name='rule_4_1_4_ensure_bogon_filtering_is_set_where_ebgp_is_used',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_1_4_ensure_bogon_filtering_is_set_where_ebgp_is_used(commands, ref):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@medium(
name='rule_4_1_5_ensure_ingress_filtering_is_set_for_ebgp_peers',
platform=['juniper'],
platform=['juniper_junos'],
commands=dict(chk_cmd='')
)
def rule_4_1_5_ensure_ingress_filtering_is_set_for_ebgp_peers(commands, ref):
Expand Down
Loading

0 comments on commit 7a70640

Please sign in to comment.