Skip to content

Conversation

@kyhau
Copy link
Owner

@kyhau kyhau commented Oct 19, 2025

Added

  • Community health files: CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md, CODEOWNERS
  • Issue templates for bug reports and feature requests with structured forms
  • .dockerignore for optimized Docker builds
  • Snyk security scanning workflow
  • Modern Makefile targets: setup-init, format-python, lint-python, pre-commit
  • Black code formatter for consistent code style
  • 15 new unit tests improving code coverage from 83% to 91%:
    • Exception handling tests for process() function
    • CLI argument parsing tests (parse_args with default and custom arguments)
    • Main entry point tests
    • API retry logic tests (429 and 529 error handling)
    • Error status handling tests
    • Endpoint filtering tests (skipping "Unable" endpoints)
    • Print message variant tests (DEBUG, WAIT_FOR_COMPLETE, etc.)
    • Actual requests_get() implementation tests (with and without email)

Changed

  • Moved tests from ssllabsscan/tests/ to root-level tests/ directory (Python best practice)
  • Renamed CI workflow from build-and-test.yml to ci.yml for consistency
  • Updated all Makefile targets to match standard conventions across projects
  • Migrated from standalone mock package to built-in unittest.mock
  • Reorganized dependencies: moved flake8 from test to dev dependencies
  • Cleaned up pyproject.toml: removed unused dependencies (mock, coverage, pytest-gitignore, setuptools, wheel)
  • Improved Dockerfile with two-phase installation and cache cleanup
  • Updated LICENSE copyright to 2017-2025 with author name
  • Enhanced README with better structure, badges, and documentation
  • Modernized all .github workflows with concurrency control
  • Simplified .yaml-lint.yml configuration
  • Updated dependabot.yml to remove redundant pip ecosystem
  • Updated pull request template for better clarity

Removed

  • Unused dependencies: mock, coverage, pytest-gitignore, setuptools, wheel
  • Old ssllabsscan/tests/ directory (moved to root)
  • Redundant application-specific patterns from .gitignore

kyhau added 8 commits October 19, 2025 14:21
Introduces general coding standards and a detailed Makefile-based workflow for Python projects using Poetry. Removes the old makefile-workflow rules in favor of more comprehensive and language-agnostic documentation.
Renamed all test files from ssllabsscan/tests/ to tests/ to simplify the project structure. No functional changes were made to the test code.
Added CODEOWNERS, CODE_OF_CONDUCT.md, CONTRIBUTING.md, and SECURITY.md to establish project governance, contribution guidelines, and security policies. Removed _config.yml, indicating the project no longer uses the Jekyll theme configuration.
Introduces GitHub issue templates for bug reports and feature requests, and updates the config for issue templates. Refactors and renames the main CI workflow to 'ci.yml', adds concurrency controls, and improves linting and testing steps. Adds a Snyk security workflow, updates the secrets scan workflow, and improves the stale issues workflow. Cleans up .gitignore and .dockerignore, and simplifies YAML linting configuration.
Refactored the Makefile for improved clarity, modularity, and expanded development workflows, including new targets for linting, formatting, and pre-commit checks. Updated the README with clearer installation, usage, and development instructions, added badges, and improved project documentation. Updated LICENSE copyright years. Added Black and related dev dependencies to pyproject.toml and poetry.lock. Updated test files to align with new structure and workflows.
Bump version to 4.1.0 and update CHANGELOG with new features and improvements. Refactor code for style consistency, improve formatting, and enhance test coverage. Update Makefile to lint and format both source and test directories. Move and clean up test files, modernize code style, and improve docstrings and comments throughout the codebase.
Expanded test coverage in test_main.py and test_ssllabs_client.py to include exception handling in main process, argument parsing, main entry point, and SSLLabsClient retry logic for API rate limits and error statuses. Also added tests for CSV summary skipping, debug and status message printing, and error handling scenarios.
Added details about 15 new unit tests that improve code coverage from 83% to 91%, covering exception handling, CLI parsing, API retry logic, error status handling, endpoint filtering, print message variants, and requests_get implementation.
@kyhau kyhau self-assigned this Oct 19, 2025
@amazon-q-developer
Copy link

Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation.

Slash Commands

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository.

For more detailed information, visit the Amazon Q for GitHub documentation.

Footnotes

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

@kyhau
Copy link
Owner Author

kyhau commented Oct 19, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov
Copy link

codecov bot commented Oct 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.22%. Comparing base (958ee03) to head (9cf327f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #253       +/-   ##
===========================================
+ Coverage   83.43%   96.22%   +12.79%     
===========================================
  Files           4        4               
  Lines         163      159        -4     
===========================================
+ Hits          136      153       +17     
+ Misses         27        6       -21     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

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

Excellent Modernization Effort! 🚀

This is a comprehensive and well-executed modernization of the project structure and CI workflows. The changes demonstrate strong engineering practices and attention to detail.

Highlights

  • Modern Python tooling: Great addition of Black formatter and improved Makefile targets
  • Enhanced CI/CD: Improved workflows with concurrency control and better organization
  • Community health: Excellent addition of CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md, and issue templates
  • Dependency cleanup: Smart removal of redundant dependencies and proper Poetry configuration
  • Test structure: Moving tests to root-level tests/ directory follows Python best practices
  • Docker improvements: Better layer caching and two-phase installation approach

🔧 Key Issues to Address

  1. Missing coverage dependency in pyproject.toml - this could cause test failures
  2. Security vulnerability in Snyk workflow using @master instead of pinned version
  3. Hardcoded Python path in Dockerfile that will break with version changes

📊 Impact Assessment

  • Code coverage: Improved from 83% to 91% with 15 new unit tests
  • Developer experience: Significantly enhanced with modern Makefile targets and clear documentation
  • Security posture: Strengthened with multiple scanning tools and proper community health files
  • Maintainability: Much improved with standardized tooling and clear contribution guidelines

The changes are well-structured and maintain backward compatibility while modernizing the development workflow. Once the identified issues are addressed, this will be an excellent foundation for future development.

Recommendation: Approve after addressing the critical issues mentioned in the review comments.

kyhau and others added 2 commits October 19, 2025 15:20
…g sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Improves readability of the regex assertion in test_ssl_labs_client_print_msg_failed_and_skipped by splitting it across multiple lines.
@kyhau kyhau merged commit 7f5559e into main Oct 19, 2025
11 checks passed
@kyhau kyhau deleted the restructure branch October 19, 2025 04:34
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