mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
32 lines
732 B
Python
32 lines
732 B
Python
|
|
import uuid
|
|
import sys
|
|
import boto3
|
|
import argparse
|
|
|
|
|
|
def main(args):
|
|
|
|
parser = argparse.ArgumentParser(description="Detection Testing Execution")
|
|
parser.add_argument("-b", "--branch", required=True, help="security content branch")
|
|
|
|
args = parser.parse_args()
|
|
branch = args.branch
|
|
|
|
# start aws batch job
|
|
client = boto3.client("batch")
|
|
response = client.submit_job(
|
|
jobName='detection_testing',
|
|
jobQueue='detection_testing_execution_queue',
|
|
jobDefinition='detection_testing_execution',
|
|
containerOverrides={
|
|
'command': ['-b', branch, '-u', str(uuid.uuid4())]
|
|
}
|
|
)
|
|
|
|
# loop dynamo db for results
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main(sys.argv[1:]) |