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

Stop at first match #1307

Merged
merged 5 commits into from
Dec 2, 2021
Merged

Stop at first match #1307

merged 5 commits into from
Dec 2, 2021

Conversation

parrasajad
Copy link
Contributor

Proposed changes

  • Add template level stop-at-first-match option to stop execution if a match is found.
  • Works for all the protocols.
  • Example:
id: dmarc-detect

info:
  name: dmarc-detect
  author: brenocss
  severity: info
  tags: dns,dmarc

stop-at-first-match: true
dns:
  - name: _dmarc.{{FQDN}}
    type: TXT
    class: inet
    recursion: true
    retries: 3
    matchers:
      - type: word
        words:
          - "v=dmarc1"
          - "v=DMARC1"
  - name: _dmarc.{{RDN}}
    type: TXT
    class: inet
    recursion: true
    retries: 3
    matchers:
      - type: word
        words:
          - "v=dmarc1"
          - "v=DMARC1"

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Copy link
Member

@Ice3man543 Ice3man543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR @parrasajad! lgtm. I had just one small comment.

@ehsandeep ehsandeep merged commit 1959aa5 into dev Dec 2, 2021
@ehsandeep ehsandeep deleted the stop-at-first-match branch December 2, 2021 12:30
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding stop-at-first-match for DNS templates
3 participants