Skip to content

Upload sample-reports and standardize on Python 3.12#48

Merged
agasthik merged 1 commit into
aws-samples:mainfrom
agasthik:anonymize-accounts-and-python-312
Jul 9, 2026
Merged

Upload sample-reports and standardize on Python 3.12#48
agasthik merged 1 commit into
aws-samples:mainfrom
agasthik:anonymize-accounts-and-python-312

Conversation

@agasthik

@agasthik agasthik commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

Summary

Two related housekeeping changes to the sample reports and project metadata:

  1. Anonymize AWS account IDs in sample reports — real 12-digit account IDs in the committed sample HTML
    reports are replaced with well-known AWS documentation example account IDs (e.g. 111122223333,
    123456789012)
  2. Standardize on Python 3.12 — the README and CI previously gave conflicting Python versions (badge
    said 3.11+, prerequisites said 3.12+, CI tested both). All references now consistently target 3.12, matching
    the Lambda runtime already pinned to python3.12 in both SAM templates.

Changes

Account ID anonymization

  • sample-reports/scripts/capture_screenshots.py now runs an anonymize_account_ids() step before
    capturing screenshots. It:
    • Scans all sample reports first, collects every distinct 12-digit account ID, and builds one
      shared, deterministic mapping so an account appearing in multiple reports maps to the same placeholder
      everywhere.
    • Uses a word-boundary regex (\b\d{12}\b) so digit runs embedded in longer numbers aren't touched.
    • Exits with an error if there are more real IDs than defined placeholders.
  • Re-anonymized security_assessment_single_account.html and security_assessment_multi_account.html.
  • Regenerated all four screenshots from the anonymized reports.

Python 3.12 consistency

  • README.md: badge 3.11+3.12, prerequisites 3.12+3.12, CI table description → Python 3.12.
  • .github/workflows/python-tests.yml: test matrix ["3.11", "3.12"]["3.12"].

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- capture_screenshots.py now remaps real 12-digit account IDs to
  well-known AWS example IDs before capturing, with a shared,
  deterministic mapping across both sample reports
- Re-anonymized sample HTML reports and regenerated screenshots
- Use Python 3.12 consistently across README badge, prerequisites,
  CI description, and the python-tests workflow matrix
@agasthik agasthik requested a review from vivekmittal514 July 9, 2026 23:04
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 9, 2026
@agasthik agasthik merged commit 92c7fcd into aws-samples:main Jul 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant