Skip to content

Instantly share code, notes, and snippets.

@adamrneary
Last active January 30, 2017 17:56
Show Gist options
  • Save adamrneary/c8467efb8fac2235850ddde0af1cd6fc to your computer and use it in GitHub Desktop.
Save adamrneary/c8467efb8fac2235850ddde0af1cd6fc to your computer and use it in GitHub Desktop.
StreamAlert Python Example
@rule('production_sudo',
logs=['osquery'],
matchers=['pci'],
outputs=['s3', 'pagerduty', 'slack'])
def production_sudo(record):
table_name = record['name']
tag = record['columns']['tag']
return (
table_name == 'linux_syslog_auth' and
fnmatch(tag, 'sudo*')
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment