Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to check multiple lines of text per rule #9

Open
tthomas77 opened this issue Sep 23, 2019 · 1 comment
Open

Add ability to check multiple lines of text per rule #9

tthomas77 opened this issue Sep 23, 2019 · 1 comment

Comments

@tthomas77
Copy link
Collaborator

Right now we have v14691a-v14691k or so to match each individual subnet that has to be blocked, so when the script runs I have to go back and consolidate 10ish results to determine the correct pass/fail status of V14691. If we could take this:

---
severity: 2
desc: Deny unauthorized packets inbound from 100.64.0.0/10
check:
  text: deny\s+ip\s+100[.]64[.]0[.]0\s+0[.]63[.]255[.]255\s+any\s+log
  text_cnt: 1
  parent: ^ip\s+access-list\s+extended\s+ACL_EXTERNAL_IN
  when: true
part_of_stig:
  - l3ps
  - l3pr
...

And change it to something like :

---
severity: 2
desc: Deny unauthorized packets inbound from 100.64.0.0/10
check:
  text: [deny ip 0.0.0.0 0.255.255.255 any log,
deny ip 100.64.0.0 0.0.63.255 any log,
deny ip 192.0.0.0 0.0.0.255 any log,
deny ip 192.0.2.0 0.0.0.255 any log,
deny ip 198.18.0.0 0.1.255.255 any log,
deny ip 198.51.100.0 0.0.0.255 any log,
deny ip 203.0.113.0 0.0.0.255 any log,
deny ip 224.0.0.0 15.255.255.255 any log,
deny ip 240.0.0.0 15.255.255.255 any log,
deny ip 100.64.0.0 255.192.0.0 any log]
  text_cnt: 1
  parent: ^ip\s+access-list\s+extended\s+ACL_EXTERNAL_IN
  when: true
part_of_stig:
  - l3ps
  - l3pr
...

That way we could do a for loop or something for each line to check and return an overall pass/fail

@nickrusso42518
Copy link
Owner

Addressed in commit 28d0ee4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants