-
Notifications
You must be signed in to change notification settings - Fork 96
Getting Started Contributing
Rami McCarthy edited this page Nov 18, 2019
·
2 revisions
- Every provider is a folder inside
/modules
- Every service is a folder inside
/modules/providers
- New services must be configured in
/sadcloud/main.tf
, and require anall_SERVICE_findings
variable added to/sadcloud/variables.tf
- New findings should each map to one variable
a. The variable should default to false if the finding is not set
b. The variable should be set in the module block in
/sadcloud/main.tf
i. The variable should be set via a boolean that ORs ("||") with all_SERVICE_findings as well as all_findings c. The variable should be defined under/modules/PROVIDER/SERVICE/variables.tf
- Where possible, new services - whether directly used for a finding or needed to configure a service to generate a finding, should not be created when not necessary for configured findings. This can be done via:
a.
resource
blocks can be programmatically enabled/disabled using thecount
parameter b. arguments should be nullable, using expressions (for_each
) based on the finding variable c. All services are commented out of/sadcloud/main.tf
by default - NOTE: For AWS services that require a VPC, use the
network
module, to share a VPC across sadcloud. To use thenetwork
module, ensure: a. Insadcloud/main.tf
, the necessary variables are set in the service module, frommodule.network.VARIABLE
b. In/modules/PROVIDER/SERVICE/variables.tf
, the network variables from (6a) are defined c. Insadcloud/main.tf
, theneeds_network
variable in thenetwork
module block considersall_SERVICE_findings
d. The shared network module can then be used in/modules/PROVIDER/SERVICE/main.tf
- Add a folder for the provider under
/modules/
- Create a scaffold folder under
/modules/PROVIDER/
a. create amain.tf
, anoutputs.tf
, and avariables.tf
- Setup a basic template for the service within the folder
- Add a variable per finding, with a name describing the vulnerability
a. Make sure to add the variable to
/modules/PROVIDER/SERIVCE/variables.tf
b. Make sure to set the variable in the respective module block in/sadcloud/main.tf
c. Make sure the variable defaults to false (designating a secure state) - Use the variable where necessary to make the finding configurable and programmatically nullable