Skip to content

AWS: fix anonymization in tests for aws flowlogs#2591

Open
squioc wants to merge 1 commit into
developfrom
fix/AWSFlowlogs
Open

AWS: fix anonymization in tests for aws flowlogs#2591
squioc wants to merge 1 commit into
developfrom
fix/AWSFlowlogs

Conversation

@squioc

@squioc squioc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator
  • fix anonymization issues

Summary by Sourcery

Tests:

  • Refresh AWS flow logs JSON test inputs to use properly anonymized values across all scenarios.

@squioc squioc requested a review from a team June 4, 2026 15:28
@squioc squioc added the enhancement New feature or request label Jun 4, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates AWS flow logs test fixtures to correct anonymization of sensitive values across multiple JSON acceptance/rejection cases, ensuring tests no longer leak real data and remain consistent with the anonymization logic.

File-Level Changes

Change Details Files
Correct anonymized values in AWS flow logs JSON test fixtures to align with the intended masking rules and avoid leaking real data.
  • Adjust IP addresses, account IDs, and other potentially sensitive fields in test JSON data to use properly anonymized placeholders.
  • Ensure anonymized values are consistent across related test cases so that snapshot/fixture-based tests remain stable.
  • Normalize any format inconsistencies introduced by anonymization (e.g., string vs numeric types, field ordering, or null/empty representations) to match parser expectations.
AWS/aws-flow-logs/tests/accept.json
AWS/aws-flow-logs/tests/accept_ok_v5.json
AWS/aws-flow-logs/tests/accept_structured.json
AWS/aws-flow-logs/tests/custom.json
AWS/aws-flow-logs/tests/ipv6traffic.json
AWS/aws-flow-logs/tests/network_traffic.json
AWS/aws-flow-logs/tests/nodata.json
AWS/aws-flow-logs/tests/reject.json
AWS/aws-flow-logs/tests/reject_structured.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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 - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🤖 Copilot Automated Review

Changed Intake Formats

No intake formats were directly modified.

Changed File Types

🔒 Security Scan - Sensitive Information Check

⚠️ IMPORTANT: This is a public repository. All test data must be anonymized.

No test files in this PR

📋 Contribution Checklist

Please ensure your PR meets the following requirements:

  • No sensitive information in test files (emails, passwords, API keys, real IPs, PII)
  • Test data is properly anonymized (use example.com, TEST-NET IPs, fake credentials)
  • Code is linted with Prettier
  • Parser test coverage is at least 75%
  • Logo files included for new modules/formats
  • README.md files present and updated
  • Smart-descriptions provided for new formats

🔍 Next Steps

GitHub Copilot can help you with:

  • Security review: Tag @copilot to scan for additional sensitive data
  • Anonymization help: Ask Copilot to suggest anonymized replacements
  • Code review: Request specific review feedback
  • Test suggestions: Ask Copilot to suggest additional test cases

For more details, see the Contribution Guidelines.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Smart descriptions generated from the latest tests at 2026-06-04 15:29:30:

Test File Smart Description
AWS/aws-flow-logs/tests/accept.json Connection from 198.51.100.1 to 10.0.0.96 allowed
AWS/aws-flow-logs/tests/accept_ok_v5.json Connection from 5.6.7.8 to 1.2.3.4 allowed
AWS/aws-flow-logs/tests/accept_structured.json Connection from 5.6.7.8 to 1.2.3.4 allowed
AWS/aws-flow-logs/tests/custom.json Connection from 198.51.100.1 to 10.0.0.71 allowed
AWS/aws-flow-logs/tests/ipv6traffic.json Connection from 2001:db8:1234:a100:8d6e:3477:df66:f105 to 2001:db8:1234:a102:3304:8879:34cf:4071 allowed
AWS/aws-flow-logs/tests/network_traffic.json Connection from 1.2.3.4 to 5.6.7.8 allowed
AWS/aws-flow-logs/tests/nodata.json 2 1111111111 eni-1235b8ca123456789 - - - - - - - 1431280876 1431280934 - NODATA
AWS/aws-flow-logs/tests/reject.json Connection from 198.51.100.1 to 10.0.0.96 denied
AWS/aws-flow-logs/tests/reject_structured.json Connection from 1.2.3.4 to 5.6.7.8 denied

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant