-
Notifications
You must be signed in to change notification settings - Fork 6
/
serverless.yml
139 lines (121 loc) · 3.61 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
frameworkVersion: ">=1.2.0"
provider:
name: aws
runtime: python3.6
iamRoleStatements:
- Effect: Allow
Action:
- lambda:InvokeFunction
- lambda:InvokeAsync
- lambda:ListFunctions
Resource: "*"
environment:
CONFIG_FILE: ~/.bbrf/config.json
BBRF_COUCHDB_URL: ${file(${self:provider.environment.CONFIG_FILE}):couchdb}
BBRF_USERNAME: ${file(${self:provider.environment.CONFIG_FILE}):username}
BBRF_PASSWORD: ${file(${self:provider.environment.CONFIG_FILE}):password}
BBRF_IGNORE_SSL_ERRORS: ${file(${self:provider.environment.CONFIG_FILE}):ignore_ssl_errors}
LAMBDA_NAME_PREFIX: ${self:service}-${self:custom.stage}-
ENDPOINT_URL: { "Fn::Join" : ["", [" https://", { "Ref" : "ApiGatewayRestApi" }, ".execute-api.${self:custom.region}.amazonaws.com/${self:custom.stage}/" ] ] }
VIRUSTOTAL_TOKEN: ${file(tokens.json):virustotal}
SHODAN_TOKEN: ${file(tokens.json):shodan}
SECURITYTRAILS_TOKEN: ${file(tokens.json):securitytrails}
PASSIVETOTAL_USER: ${file(tokens.json):passivetotal.user}
PASSIVETOTAL_KEY: ${file(tokens.json):passivetotal.key}
functions:
agent-registration-service:
handler: agent_registration_service.register_all
# if a function follows this naming convention <name>-agent,
# it will automatically get picked up by the
# agent registration service and be registered
# in BBRF so you can run it with `bbrf run <name>`
dnsgrep-agent:
handler: domains/dnsgrep.pool
events:
- schedule: rate(7 days) # the feed is only refreshed every week
dnsgrep-worker:
handler: domains/dnsgrep.worker
events:
- http:
path: dnsgrep
method: get
crtmonitor-agent:
handler: domains/crtmonitor.pool
events:
- schedule: rate(180 minutes)
crtmonitor-worker:
handler: domains/crtmonitor.worker
events:
- http:
path: crtmonitor
method: get
sublister-agent:
handler: domains/sublister.pool
events:
- schedule: rate(24 hours)
sublister-worker:
handler: domains/sublister.worker
events:
- http:
path: sublister
method: get
timeout: 600
virustotal-agent:
handler: domains/virustotal.worker
events:
- http:
path: virustotal
method: get
timeout: 600
shodan-worker:
handler: domains/shodan.worker
events:
- http:
path: shodan
method: get
timeout: 600
passivetotal-agent:
handler: domains/passivetotal.worker
events:
- http:
path: passivetotal
method: get
timeout: 600
securitytrails-agent:
handler: domains/securitytrails.worker
events:
- http:
path: securitytrails
method: get
timeout: 600
waybackurls-agent:
runtime: go1.x
handler: gotest/bin/waybackurls
events:
- http:
path: waybackurls
method: get
timeout: 60
assetfinder-agent:
runtime: go1.x
handler: assetfinder/bin/assetfinder
events:
- http:
path: assetfinder
method: get
timeout: 60
plugins:
- serverless-python-requirements
package:
exclude:
- .env/**
- ./gotest/**
- ./assetfinder/**
include:
- ./gotest/bin/**
- ./assetfinder/bin/**
custom:
pythonRequirements:
pythonBin: /usr/bin/python3
stage: ${opt:stage, self:provider.stage}
region: ${opt:region, self:provider.region}