Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ coverage:
precision: 2
round: down
range: 70...100

status:
project: true
patch: false
Expand Down
59 changes: 59 additions & 0 deletions .cursor/rules/general-standards.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
description: General coding standards (language-agnostic)
globs: ["**/*"]
alwaysApply: true
---

# General Coding Standards

## Documentation & Instructions

- **Be concise** - Instructions, rules, and documentation should be brief and actionable
- **Focus on essentials** - Include only what's necessary, remove verbose explanations

## File Formatting

- **End files with newline** - POSIX standard, required for Git diffs
- **Use LF (`\n`) line endings** - Not CRLF (`\r\n`), except `.bat`/`.cmd` files
- **No trailing whitespace** - Remove spaces/tabs at end of lines
- **Consistent indentation** - Spaces or tabs, never mixed

## File Naming

- **Lowercase with hyphens** - `my-file.txt` not `My-File.txt`
- **Be descriptive** - `user-authentication.py` not `auth.py`
- **Avoid special characters** - Use only `a-z`, `0-9`, `-`, `_`, `.`

**Exceptions:**
- Python: `snake_case.py`
- JavaScript/TypeScript: `PascalCase.tsx`

## Git

**Commits:**
- Atomic (one change per commit)
- Present tense messages ("Add feature" not "Added feature")
- Include issue numbers (`Fixes #123`)

**Never commit:**
- ❌ Build artifacts (`dist/`, `build/`)
- ❌ Dependencies (`node_modules/`, `.venv/`)
- ❌ IDE files (`.vscode/`, `.idea/`)
- ❌ OS files (`.DS_Store`, `Thumbs.db`)
- ❌ Secrets or credentials

## Security

- **Never commit secrets** - Use environment variables
- **Pin dependency versions** - Use exact versions
- **Use secret scanners** - gitleaks, truffleHog
- **Security scanning** - Snyk, Dependabot

## Before Committing

- [ ] Tests pass
- [ ] No linter errors
- [ ] No trailing whitespace
- [ ] Newline at end of files
- [ ] No debug code
- [ ] Documentation updated
88 changes: 88 additions & 0 deletions .cursor/rules/makefile-python.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
description: Makefile-based development workflow for Python projects using Poetry
globs: ["Makefile", "pyproject.toml", "**/*.py"]
alwaysApply: true
---

# Python Project Development Workflow

## Available Makefile Targets

### Setup
- `make setup-init` - Complete first-time setup (configure venv, lock, install all deps)
- `make setup-venv` - Configure Poetry to use .venv in project directory

### Installation
- `make install` - Install main dependencies only
- `make install-dev` - Install main + dev dependencies
- `make install-test` - Install main + test dependencies
- `make install-all` - Install all dependencies (main + dev + test)

### Dependency Management
- `make lock` - Regenerate poetry.lock from pyproject.toml
- `make update-deps` - Update dependencies to latest compatible versions

### Testing
- `make test` - Run unit tests without coverage
- `make test-with-coverage` - Run unit tests with coverage reporting

### Code Quality
- `make lint-python` - Lint Python code with flake8
- `make lint-yaml` - Lint YAML files with yamllint
- `make format-python` - Format Python code with black
- `make pre-commit` - Run all quality checks (format, lint, test)

### Build
- `make build` - Build the Python package

### Cleanup
- `make clean` - Clean test artifacts, build artifacts and temporary files
- `make clean-all` - Clean everything including virtual environment

### Help
- `make help` - Show all available targets

## Project Setup

**Quick Start:**
```bash
make setup-init # Complete first-time setup
make test-with-coverage # Verify installation
```

## Python Environment
- **Poetry** - Dependency management
- **Python 3.11+** - Minimum version (supports 3.11, 3.12, 3.13)
- **`.venv/`** - Virtual environment (project-local)
- **Dependencies** in `pyproject.toml`:
- Main: requests
- Test: pytest, pytest-cov, pytest-mock, pytest-gitignore, coverage, mock, flake8
- Dev: setuptools, wheel, yamllint, black

## Development Workflow

**Daily development:**
```bash
# 1. Make code changes
# 2. Run all quality checks before committing
make pre-commit # Format, lint, and test everything
# Or run individual checks:
make format-python # Auto-format
make lint-python # Lint Python
make lint-yaml # Lint YAML
make test-with-coverage # Test with coverage
make clean # Remove artifacts
```

## Project Structure
- Main package: `ssllabsscan/`
- Tests: `tests/`
- CLI entry point: `ssllabs-scan` (defined in pyproject.toml)
- Configuration: `pyproject.toml`

## CLI Tool Usage
After installation with `poetry install` or `pip install .`:
```bash
ssllabs-scan # Main CLI tool
ssllabs-scan --help # Show help
```
49 changes: 0 additions & 49 deletions .cursor/rules/makefile-workflow.mdc

This file was deleted.

52 changes: 52 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Git
.git
.gitignore
.gitattributes

# CI/CD
.github

# Python
__pycache__
*.py[cod]
*$py.class
*.so
*.egg-info
.eggs/
*.egg

# Testing
.pytest_cache/
.coverage
.coverage.*
htmlcov/
junit*.xml
coverage*.xml
tests/

# Development tools
.venv/
.env

# Documentation
*.md
docs/

# IDE
.vscode/
.idea/
*.swp
*.swo

# Build artifacts
build/
dist/

# Project files
Makefile
CHANGELOG.md
CODEOWNERS
LICENSE
CODE_OF_CONDUCT.md
CONTRIBUTING.md
SECURITY.md
77 changes: 77 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Bug Report
description: Report a bug or unexpected behavior
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug!

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is
placeholder: What happened?
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Run command '...'
3. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
placeholder: What should have happened?
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened
placeholder: What actually happened?
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: Please provide your environment details
placeholder: |
- OS: [e.g., Ubuntu 22.04, Windows 11, macOS 13]
- Python version: [e.g., 3.11.5]
- Project version: [e.g., 1.0.0]
value: |
- OS:
- Python version:
- Project version:
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant Logs
description: Please paste any relevant log output
render: shell

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Question or Discussion
url: https://github.com/kyhau/ssllabs-scan/discussions
about: Ask questions or start discussions about the project
- name: Security Vulnerability
url: https://github.com/kyhau/ssllabs-scan/security/advisories/new
about: Report security vulnerabilities privately
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Feature Request
description: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature!

- type: textarea
id: problem
attributes:
label: Problem Statement
description: Is your feature request related to a problem? Please describe.
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like
placeholder: I would like to see...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered
placeholder: I also considered...

- type: textarea
id: benefits
attributes:
label: Benefits
description: What are the benefits of this feature?
placeholder: This would help by...

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context, mockups, or examples about the feature request here
Loading