Skip to content

Security Improvements Across Terraform Examples and Go Source Files - #2206

Open
Rajesh-Sangepu wants to merge 22 commits into
aquasecurity:masterfrom
Rajesh-Sangepu:master
Open

Security Improvements Across Terraform Examples and Go Source Files#2206
Rajesh-Sangepu wants to merge 22 commits into
aquasecurity:masterfrom
Rajesh-Sangepu:master

Conversation

@Rajesh-Sangepu

Copy link
Copy Markdown

Summary

This pull request includes multiple security improvements across Terraform examples and Go source files. The changes enhance security by enforcing secure TLS configurations, applying the principle of least privilege, strengthening encryption, preventing public exposure of resources, enabling logging, and mitigating Cross-Site Scripting (XSS) risks.

Changes Included

  • Enforced TLS 1.2 as the minimum TLS version for Azure Storage Accounts.
  • Enabled Storage Analytics logging for Azure Storage Queue Services to improve monitoring and diagnostics.
  • Updated AWS IAM policies to follow the principle of least privilege by removing excessive administrative permissions.
  • Configured AWS CloudFront Distributions to use secure minimum TLS protocol versions.
  • Updated AWS Load Balancer configurations to enforce secure SSL/TLS policies (TLS 1.2 or higher) across example configurations.
  • Configured AWS DynamoDB tables to use customer-managed AWS KMS keys for encryption.
  • Removed public read access from AWS S3 bucket examples to prevent unauthorized access.
  • Replaced the Go text/template package with html/template to ensure automatic HTML escaping and reduce the risk of Cross-Site Scripting (XSS) vulnerabilities.

Files Updated

  • _examples/971/modules/azure/storage-account/module.tf
  • _examples/1509/main.tf
  • _examples/main.tf
  • _examples/withVars/main.tf
  • _examples/publicBlock/main.tf
  • _examples/iam/main.tf
  • cmd/tfsec-docs/indexes.go
  • cmd/tfsec-docs/webpage.go

Purpose

These changes improve the overall security posture of the repository by implementing security best practices and strengthening the example configurations and source code without changing their intended functionality.

appuser and others added 22 commits July 29, 2026 05:05
…ure-tls-policy-1-3GVSoEVQCS

fix: semgrep-storage-use-secure-tls-policy
…olicy-8-2wESsQ7IKV

fix: semgrep-aws-iam-admin-policy
…oudfront-distribution-tls-v-1-MDGCWiv4Vb

fix: semgrep-aws-insecure-cloudfront-distribution-tls-version
…ervices-logging-1-b5DIT1br6P

fix: semgrep-storage-queue-services-logging
…alancer-tls-version-9-Y094hfoO5p

fix: semgrep-insecure-load-balancer-tls-version
…ble-unencrypted-49-0OlSXm3d39

fix: semgrep-aws-dynamodb-table-unencrypted
…bucket-5-isTjr9kimn

fix: semgrep-s3-public-read-bucket
…alancer-tls-version-9-OVSeknmuug

fix: semgrep-insecure-load-balancer-tls-version
…plate-8-66tTSXNtQJ

fix: semgrep-import-text-template
…mplate-8-ePdIgqYWQF

fix: semgrep-import-text-template
…policy-8-QM10WVGqKs

fix: semgrep-aws-iam-admin-policy
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ appuser
❌ Rajesh-Sangepu


appuser seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants