We originally used tfsec to scan this project for vulnerabilities. This has since been replaced by trivy due to tfsec's integration with the trivy project.
-
Aug 07, 2025, traced in Trivy Security Scan -- Aug 7, 2025.
-
May 21, 2025, traced in Trivy Security Scan -- May 21, 2025.
-
Mid April 2024, traced in Issue #36 - Fix tfsec-identified Critical/High vulnerabilities.
While it would be ideal to completely fix all reported issues, there are a few-complicating factors to be considered:
-
Testing vs Production
Setting RDS config values like
skip_final_snapshot = falseanddeletion_protection = truemake absolute sense in a Production setting where it is highly unlikely one wants to destroy their database instance after it is created.These settings, however, interfere with the orderly spin-up/spin-down of resources created during a testing loop (i.e. terraform goes into an infinite loop waiting for a resource to be destroyed that cant be destroyed due actions taken by AWS as a result of these settings).
-
Uncertain cost implications due to cost of feature activation
Some best practice features will generate real-world costs in your cloud account. While these costs are generally expected to be small, the fact that this cannot be 100% guaranteed from the outset means that these features should be treated as "opt-in" / "opt-out" rather than strictly hardcoded.
Other features that do not have any additional cost by default can be hardcoded as true due to the zero-cost gains that are achieved.
Example:
- Unquantified cost: VPC Flow logs
- No cost with default options: RDS Performance Insights
-
Uncertain Client Environments
We cannot account for the realities of client environments and thus should not force hardcoded decisions upon them (e.g. forcing encryption of an EBS volume). Rather, we supply default values which align to best practices but allow the client to modify values, as necessary, to match the needs of their own environment.
-
Necessity of feature
Some features, like configuring redis snapshot retention, arent necessary given how the Seqera Platform application works.
The following approach is being followed to mitigate vulnerabilities:
-
Hardcode best practices where appropriate. Example: RDS Performance Insights (7-day retention).
-
Use tfvars flags for toggle-able settings. Example: Make RDS
deletion_protectionconfigurable, with default set totrue. -
Add checks to configuration checker to emit reminders/warnings.
-
Suppress
tfsecwarnings for configurations handled by 2 & 3.
!!! warn "Trivy reporting errors on inner module config"
Some errors are being suppressed due to Trivy going too deep into module paths and reporting false positives (_i.e. multiple from the VPC examples folder_). Suppressing to minimize noise in scans to ensure real problems are not drowned out.
NOTE: I don't like using top-level overrides via `.trivyignore` but inline exceptions dont appear to be working.
Managed via .trivyignore:
-
- Log group is not encrypted:
avd-aws-0017 - LogGroup wildcard:
avd-aws-0057 - Default VPC used:
avd-aws-0101 - Network ACL rule allows access on ALL ports:
avd-aws-0102 - Network ACL rule allows ingress from public internet:
avd-aws-0105 - Flow Log Enablement:
avd-aws-0178
- Log group is not encrypted:
-
- Allowed egress to multiple public internet addresses (multiple):
avd-aws-0104 - Security group rule allows ingress from public internet: `avd-aws-0107
- Allowed egress to multiple public internet addresses (multiple):
-
- Instance does not have Deletion Protect: [
avd-aws-0177]https://avd.aquasec.com/misconfig/avd-aws-0177) - Instance does not have performance insights enabled: 'avd-aws-0133`
- Instance has very low backup retention period:
avd-aws-0077 - Instance does not have storage encryption enabled:
avd-aws-0080
- Instance does not have Deletion Protect: [
-
ignore:aws-elasticache-enable-backup-retention
-
- Instance does not required IMDS token:
avd-aws-0028 - Launch Template does not require IMDS token:
avd-aws-0130 - Root block device is not encrypted:
avd-aws-0131
- Instance does not required IMDS token:
-
- Listener uses an outdated TLS policy:
avd-aws-0047 - Application load balancer not dropping invalid headers:
avd-aws-0052 - Load balancer is exposed publicly:
avd-aws-0053 - Listener does not use HTTPS:
avd-aws-0054
- Listener uses an outdated TLS policy:
We must balance security with convenience:
- If the project is too strict on security, deployment efforts can be significantly slowed as a myriad of connectivity problems emerge and must be resolved.
- Conversely, deployments with no security expose our clients to unnecessary risks which could have been easily mitigated with a few easy-to-make decisions.
We try to expose suggested best practices, but it ultimately the implementer's decision re: what is best for their organization. As you make this decision, please be mindful of the following items.
By default, the installer will try to grab the very latest Amazon Linux 2023 AMI available in your region. This was modified in December 2024 (_see Make EBS boot volume configurable) where we maintained the core update logic but limited the AMI family type to al2023-ami-minimal- only.
This is generally seen as a good idea because it ensures security/application patches are introduced into your environment regularly. Unfortunately, it can occasionally cause VMs to be destroyed and replaced (potentially resulting in the loss of data if the implementation is using the container db) and can also knock highly regulated installations out of compliance (_i.e. if an AMI is auto-replaced without the necessary paperwork).
As of Release 1.3, more control has been introduced to allow implementers to pick a pattern which best fits their needs. Reference Issue
We use Amazon Inspector to scan the resulting EC2 for vulnerabilities. Vulnerabilities are tracked as Project Issues.
- Vulnerabilities found during Wave Lite Feature Deploymen (May 27, 2025)
- ansible-core CVEs (Feb 11, 2025)
- Docker CVEs (Feb 10, 2025)
- CVE-2021-29921 - ipaddress (Feb 10, 2025)
- Java CVEs (Feb 10, 2025)
Depending on the pipelines you run, many calls may need to egress from your Seqera Platform / Compute Environment to a variety of endpoints exposed on the public internet.
For ease of deployment, the installer starts from a very loose posture re: security egress controls (0.0.0.0/0). While this helps minimize stand-up efforts, it may be inappropriate for your eventual Production deployment stance. Please me mindful of this behaviour and lockdown as necessary once 'happy path' pipeline runs prove successful.