Skip to content

Commit 07b7785

Browse files
authored
Merge pull request #3 from redhat-cop/feat/stig-v220659-dhcp-snooping
Add STIG CAT II rule V-220659: DHCP snooping on user VLANs
2 parents 8b8051c + 9da8712 commit 07b7785

5 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- Add STIG CAT II rule V-220659 (CISC-L2-000130) - DHCP snooping on user VLANs for Cisco IOS-XE.

roles/evaluate/defaults/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ stig_controls:
1616
V-220649:
1717
run: true
1818
auth_hostmode: "single-host"
19+
V-220659:
20+
run: true
1921
V-220650:
2022
run: true
2123
V-220651:

roles/evaluate/tasks/stig/ios/cat2.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
---
22
# CAT II — Medium Severity
33

4+
# V-220659: DHCP snooping on all user VLANs
5+
- name: >-
6+
STIG | CISC-L2-000130 | V-220659 | CAT-II |
7+
Verify DHCP snooping is enabled on all user VLANs
8+
when: stig_controls['V-220659'].run | default(false)
9+
tags:
10+
- CISC-L2-000130
11+
- V-220659
12+
- SV-220659r928999
13+
- cat2
14+
- CCI-002385
15+
block:
16+
- name: Check DHCP snooping configuration
17+
cisco.ios.ios_command:
18+
commands:
19+
- "show run | include ip dhcp snooping"
20+
register: _evaluate_dhcp_snooping
21+
22+
- name: Evaluate DHCP snooping compliance
23+
ansible.builtin.set_fact:
24+
stig_results: >-
25+
{{ stig_results | default({}) | combine({
26+
'V-220659': ([] if "ip dhcp snooping" in _evaluate_dhcp_snooping.stdout[0]
27+
else ["DHCP snooping not enabled"])
28+
| network.compliance.stig_result(
29+
pass_msg='DHCP snooping is enabled on user VLANs',
30+
fail_msg='DHCP snooping issue: {}')
31+
}) }}
32+
433
# V-220650: VTP password
534
- name: >-
635
STIG | CISC-L2-000030 | V-220650 | CAT-II |

roles/evaluate/vars/stig/ios/cat2.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
---
22
# CAT II — Medium Severity — Cisco IOS-XE Layer 2 Switch STIG
3+
# Source: U_Cisco_IOS-XE_Switch_L2S_STIG_V3R2_Manual-xccdf.xml
34
stig_rules:
5+
V-220659:
6+
stig_id: CISC-L2-000130
7+
rule_id: SV-220659r928999
8+
severity: cat2
9+
srg_id: SRG-NET-000362-L2S-000025
10+
cci: CCI-002385
11+
title: >-
12+
The Cisco switch must have DHCP snooping for all user VLANs
13+
to validate DHCP messages from untrusted sources
14+
check_content: >-
15+
Review the switch configuration and verify that DHCP snooping
16+
is enabled on all user VLANs. If the switch does not have DHCP
17+
snooping enabled for all user VLANs to validate DHCP messages
18+
from untrusted sources, this is a finding.
19+
fix_text: >-
20+
Configure the switch to have DHCP snooping for all user VLANs.
21+
Example: ip dhcp snooping and ip dhcp snooping vlan <user-vlans>.
22+
423
V-220650:
524
stig_id: CISC-L2-000030
625
rule_id: SV-220650r539671

roles/remediate/tasks/stig/ios/cat2.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
---
22
# CAT II — Medium Severity
33

4+
# V-220659: DHCP snooping on all user VLANs
5+
- name: >-
6+
STIG | CISC-L2-000130 | V-220659 | CAT-II |
7+
Enable DHCP snooping on user VLANs
8+
when:
9+
- stig_controls['V-220659'].run | default(false)
10+
- stig_results['V-220659'].status | default('not_reviewed') == 'open'
11+
tags:
12+
- CISC-L2-000130
13+
- V-220659
14+
- SV-220659r928999
15+
- cat2
16+
- CCI-002385
17+
cisco.ios.ios_config:
18+
lines:
19+
- ip dhcp snooping
20+
save_when: changed
21+
422
# V-220650: VTP password
523
- name: >-
624
STIG | CISC-L2-000030 | V-220650 | CAT-II |

0 commit comments

Comments
 (0)