Skip to content

feat(query): implements ELBv2_LB_Access_Log_Disabled--terraform/aws#7594

Merged
cx-artur-ribeiro merged 13 commits into
Checkmarx:masterfrom
cx-andre-pereira:AST-40689--FN-ELBv2_ALB_Access_Log_Disabled--terraform/aws
Aug 18, 2025
Merged

feat(query): implements ELBv2_LB_Access_Log_Disabled--terraform/aws#7594
cx-artur-ribeiro merged 13 commits into
Checkmarx:masterfrom
cx-andre-pereira:AST-40689--FN-ELBv2_ALB_Access_Log_Disabled--terraform/aws

Conversation

@cx-andre-pereira

@cx-andre-pereira cx-andre-pereira commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Reason for Proposed Changes

  • This query is based on an identical one already implemented for cloudformation, and is currently missing for terraform/aws.
  • It is meant to flag if ELBv2 LBs (aws_lb resources) either lack access_logs completely or if that field does not have enabled set to true. Documentation

Proposed Changes

  • Based on the original logic of the query i have implemented it for the new cloud provider/payload format associated.
  • The positive tests cover 3 scenarios either the lack of one of the 2 relevant fields (access_logs or access_logs.enabled) or the case of access_logs.enabled being set to a value that is not true

Note: There is a slight change in the query naming compared to the original since , in terraform, ALBs are now referred as aws_lb , the legacy naming scheme was aws_alb but the query name itself references the current naming convention.

I submit this contribution under the Apache-2.0 license.

@github-actions github-actions Bot added feature New feature query New query feature cloudformation CloudFormation query terraform Terraform query aws PR related with AWS Cloud labels Jul 28, 2025
@cx-andre-pereira cx-andre-pereira marked this pull request as ready for review July 28, 2025 13:30
@cx-andre-pereira cx-andre-pereira requested a review from a team as a code owner July 28, 2025 13:30

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey André, other than the change on the descriptionId field on the new query, it looks good to me 😄.

Comment thread assets/queries/terraform/aws/elb_v2_lb_access_log_disabled/metadata.json Outdated
@gitguardian

gitguardian Bot commented Aug 14, 2025

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
4266022 Triggered Generic Password af1e7e3 assets/queries/cloudFormation/aws/amplify_branch_basic_auth_config_password_exposed/test/negative7.yaml View secret
9419039 Triggered Username Password cbc7937 assets/queries/cloudFormation/aws/amplify_branch_basic_auth_config_password_exposed/test/positive5.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cx-artur-ribeiro cx-artur-ribeiro merged commit 41f2006 into Checkmarx:master Aug 18, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws PR related with AWS Cloud cloudformation CloudFormation query feature New feature query New query feature terraform Terraform query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants