mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-22 03:49:36 +00:00
* Add a Phantom Client which creates containers in Phantom server * Add a playbook for creating events in Phantom using a Falco alert * Add a flag for configuring SSL checking * Add a deployable playbook with Kubeless for integrating with Phantom * Add a README for Phantom integration * Use named argument as real parameters. Just cosmetic for clarification * Call to lower() before checking for case insensitive comparison * Add the playbook which creates a container in Phantom I lose it when rebase the branch :P
26 lines
573 B
Python
26 lines
573 B
Python
import sys
|
|
import os.path
|
|
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__))))
|
|
|
|
import os
|
|
import playbooks
|
|
from playbooks import infrastructure
|
|
|
|
|
|
def _to_bool(value):
|
|
return value.lower() in ('yes', 'true', '1')
|
|
|
|
|
|
playbook = playbooks.CreateContainerInPhantom(
|
|
infrastructure.PhantomClient(
|
|
os.environ['PHANTOM_USER'],
|
|
os.environ['PHANTOM_PASSWORD'],
|
|
os.environ['PHANTOM_BASE_URL'],
|
|
verify_ssl=_to_bool(os.environ.get('VERIFY_SSL', 'True'))
|
|
)
|
|
)
|
|
|
|
|
|
def handler(event, context):
|
|
playbook.run(event['data'])
|