feat: Add comprehensive license and repository protection
- Add MIT LICENSE file with proper copyright attribution - Add SECURITY.md with vulnerability reporting guidelines - Add CONTRIBUTING.md with contribution guidelines and standards - Add CODE_OF_CONDUCT.md following Contributor Covenant 2.1 - Add .github/CODEOWNERS for code ownership protection - Add GitHub issue templates (bug report, feature request) - Add pull request template for standardized PRs - Add automated workflows for code quality and security checks - Add dependency review workflow for license compliance This establishes professional standards and protections for the repository.
This commit is contained in:
parent
3855223bab
commit
16f3810210
10 changed files with 1059 additions and 0 deletions
35
.github/CODEOWNERS
vendored
Normal file
35
.github/CODEOWNERS
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Code Owners for GeoGuessr MCP Server
|
||||
#
|
||||
# This file defines individuals or teams responsible for code in this repository.
|
||||
# Code owners are automatically requested for review when someone opens a pull request
|
||||
# that modifies code that they own.
|
||||
#
|
||||
# More info: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
|
||||
|
||||
# Default owner for everything in the repo
|
||||
* @NyxiumYuuki
|
||||
|
||||
# Core source code
|
||||
/src/ @NyxiumYuuki
|
||||
|
||||
# API and Authentication
|
||||
/src/geoguessr_mcp/api/ @NyxiumYuuki
|
||||
/src/geoguessr_mcp/auth/ @NyxiumYuuki
|
||||
|
||||
# Monitoring system
|
||||
/src/geoguessr_mcp/monitoring/ @NyxiumYuuki
|
||||
|
||||
# Configuration files
|
||||
/pyproject.toml @NyxiumYuuki
|
||||
/docker-compose*.yml @NyxiumYuuki
|
||||
/Dockerfile @NyxiumYuuki
|
||||
|
||||
# Security and policies
|
||||
/SECURITY.md @NyxiumYuuki
|
||||
/LICENSE @NyxiumYuuki
|
||||
|
||||
# CI/CD and GitHub workflows
|
||||
/.github/ @NyxiumYuuki
|
||||
|
||||
# Tests
|
||||
/tests/ @NyxiumYuuki
|
||||
66
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
66
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: '[BUG] '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Bug Description
|
||||
|
||||
<!-- A clear and concise description of what the bug is -->
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
<!-- A clear and concise description of what you expected to happen -->
|
||||
|
||||
## Actual Behavior
|
||||
|
||||
<!-- A clear and concise description of what actually happened -->
|
||||
|
||||
## Environment
|
||||
|
||||
- **OS**: <!-- e.g., Ubuntu 22.04, macOS 14.0, Windows 11 -->
|
||||
- **Python Version**: <!-- e.g., 3.13.0 -->
|
||||
- **GeoGuessr MCP Version**: <!-- e.g., 0.1.0 -->
|
||||
- **Deployment Method**: <!-- Docker, Local, etc. -->
|
||||
|
||||
## Configuration
|
||||
|
||||
<!-- Relevant configuration (remove sensitive information) -->
|
||||
|
||||
```env
|
||||
MONITORING_ENABLED=true
|
||||
LOG_LEVEL=DEBUG
|
||||
```
|
||||
|
||||
## Logs
|
||||
|
||||
<!-- Paste relevant log output here -->
|
||||
|
||||
```
|
||||
[Paste logs here]
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- If applicable, add screenshots to help explain your problem -->
|
||||
|
||||
## Additional Context
|
||||
|
||||
<!-- Add any other context about the problem here -->
|
||||
|
||||
## Possible Solution
|
||||
|
||||
<!-- If you have suggestions on how to fix the bug, describe them here -->
|
||||
|
||||
## Related Issues
|
||||
|
||||
<!-- Link to any related issues -->
|
||||
78
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
78
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: '[FEATURE] '
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Feature Description
|
||||
|
||||
<!-- A clear and concise description of the feature you'd like to see -->
|
||||
|
||||
## Problem Statement
|
||||
|
||||
<!-- Describe the problem this feature would solve -->
|
||||
<!-- Example: I'm always frustrated when... -->
|
||||
|
||||
## Proposed Solution
|
||||
|
||||
<!-- A clear and concise description of what you want to happen -->
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
<!-- Describe any alternative solutions or features you've considered -->
|
||||
|
||||
## Use Cases
|
||||
|
||||
<!-- Describe specific use cases for this feature -->
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## Example Usage
|
||||
|
||||
<!-- Show how you envision using this feature -->
|
||||
|
||||
```python
|
||||
# Example code showing the proposed feature
|
||||
```
|
||||
|
||||
## Benefits
|
||||
|
||||
<!-- What benefits would this feature provide? -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
## Potential Drawbacks
|
||||
|
||||
<!-- Are there any potential downsides or challenges? -->
|
||||
|
||||
## Implementation Suggestions
|
||||
|
||||
<!-- If you have ideas about how to implement this, share them here -->
|
||||
|
||||
## Additional Context
|
||||
|
||||
<!-- Add any other context, screenshots, or mockups about the feature request here -->
|
||||
|
||||
## Priority
|
||||
|
||||
<!-- How important is this feature to you? -->
|
||||
|
||||
- [ ] Critical - Blocking my use of the project
|
||||
- [ ] High - Would significantly improve my workflow
|
||||
- [ ] Medium - Nice to have
|
||||
- [ ] Low - Just an idea
|
||||
|
||||
## Willingness to Contribute
|
||||
|
||||
<!-- Are you willing to contribute to implementing this feature? -->
|
||||
|
||||
- [ ] I can implement this feature
|
||||
- [ ] I can help with implementation
|
||||
- [ ] I can test the implementation
|
||||
- [ ] I can only report the idea
|
||||
83
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
83
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
# Pull Request
|
||||
|
||||
## Description
|
||||
|
||||
<!-- Provide a clear and concise description of your changes -->
|
||||
|
||||
## Type of Change
|
||||
|
||||
<!-- Mark the relevant option with an 'x' -->
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update
|
||||
- [ ] Code refactoring
|
||||
- [ ] Performance improvement
|
||||
- [ ] Test improvement
|
||||
|
||||
## Related Issues
|
||||
|
||||
<!-- Link related issues using keywords: Fixes #123, Closes #456, Related to #789 -->
|
||||
|
||||
Fixes #
|
||||
|
||||
## Changes Made
|
||||
|
||||
<!-- List the main changes in bullet points -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
## Testing Performed
|
||||
|
||||
<!-- Describe the testing you've done -->
|
||||
|
||||
- [ ] Unit tests added/updated
|
||||
- [ ] Integration tests added/updated
|
||||
- [ ] Manual testing performed
|
||||
- [ ] All existing tests pass
|
||||
|
||||
### Test Details
|
||||
|
||||
<!-- Provide details about how you tested your changes -->
|
||||
|
||||
```bash
|
||||
# Example test commands
|
||||
pytest tests/
|
||||
```
|
||||
|
||||
## Screenshots (if applicable)
|
||||
|
||||
<!-- Add screenshots to help explain your changes -->
|
||||
|
||||
## Checklist
|
||||
|
||||
<!-- Ensure all items are completed before submitting -->
|
||||
|
||||
- [ ] My code follows the project's style guidelines
|
||||
- [ ] I have performed a self-review of my code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
- [ ] Any dependent changes have been merged and published
|
||||
- [ ] I have checked my code and corrected any misspellings
|
||||
|
||||
## Additional Context
|
||||
|
||||
<!-- Add any other context about the pull request here -->
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
<!-- If this is a breaking change, describe the impact and migration path -->
|
||||
|
||||
## Performance Impact
|
||||
|
||||
<!-- Describe any performance implications of your changes -->
|
||||
|
||||
---
|
||||
|
||||
**By submitting this pull request, I confirm that my contribution is made under the terms of the MIT License.**
|
||||
123
.github/workflows/code-quality.yml
vendored
Normal file
123
.github/workflows/code-quality.yml
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
name: Code Quality
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop, claude/** ]
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
|
||||
jobs:
|
||||
lint-and-format:
|
||||
name: Lint and Format Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install black ruff mypy
|
||||
|
||||
- name: Check formatting with Black
|
||||
run: |
|
||||
black --check src/ tests/
|
||||
|
||||
- name: Lint with Ruff
|
||||
run: |
|
||||
ruff check src/ tests/
|
||||
|
||||
- name: Type check with MyPy
|
||||
run: |
|
||||
mypy src/
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
name: Run Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.13']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
pytest tests/unit/ -v --cov=src/geoguessr_mcp --cov-report=xml --cov-report=term
|
||||
|
||||
- name: Upload coverage reports
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
file: ./coverage.xml
|
||||
flags: unittests
|
||||
name: codecov-umbrella
|
||||
continue-on-error: true
|
||||
|
||||
security:
|
||||
name: Security Scan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install safety bandit
|
||||
|
||||
- name: Run Safety check
|
||||
run: |
|
||||
pip freeze | safety check --stdin
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run Bandit security scan
|
||||
run: |
|
||||
bandit -r src/ -ll
|
||||
continue-on-error: true
|
||||
|
||||
docker:
|
||||
name: Docker Build Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: geoguessr-mcp:test
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
25
.github/workflows/dependency-review.yml
vendored
Normal file
25
.github/workflows/dependency-review.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Dependency Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
name: Review Dependencies
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@v4
|
||||
with:
|
||||
fail-on-severity: moderate
|
||||
deny-licenses: GPL-2.0, GPL-3.0, AGPL-3.0
|
||||
comment-summary-in-pr: always
|
||||
Loading…
Add table
Add a link
Reference in a new issue