Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c64b15c
feat(devops): add Docker setup for backend services
Yosoyepa Nov 6, 2025
baf553e
Merge pull request #2 from Yosoyepa/feature/ci-cd-integration
Yosoyepa Nov 6, 2025
79d3f8e
feat(ci): Add GitHub Actions lint workflow - CGAI-23
Yosoyepa Nov 6, 2025
7332006
Merge pull request #3 from Yosoyepa/feature/github-actions-lint
Yosoyepa Nov 6, 2025
797b087
feat(ci): Add tests and coverage workflow - CGAI-24
Yosoyepa Nov 7, 2025
8e4ef82
Merge pull request #4 from Yosoyepa/feature/github-actions-test
Yosoyepa Nov 7, 2025
918f2ad
feat(ci): Add Docker build validation workflow - CGAI-25
Yosoyepa Nov 7, 2025
e519d8e
Merge pull request #5 from Yosoyepa/feature/github-actions-docker
Yosoyepa Nov 7, 2025
cefcaa7
feat(docs): Add contribution guide and CI/CD documentation
Yosoyepa Nov 7, 2025
532f824
Update docs/ci-cd-setup.md
Yosoyepa Nov 7, 2025
3500b24
Merge pull request #6 from Yosoyepa/feature/update-docs
Yosoyepa Nov 7, 2025
f2abd9c
fix(ci): Add docker-compose installation to GitHub Actions workflow -…
Yosoyepa Nov 7, 2025
e97d38d
fix(quality): Apply GitHub Copilot suggestions for code quality impro…
Yosoyepa Nov 7, 2025
e3a177c
Merge pull request #9 from Yosoyepa/feature/update-docs
Yosoyepa Nov 7, 2025
d1ad86e
feat(domain): Implement BaseAgent and AnalysisContext - CGAI-12
Yosoyepa Nov 9, 2025
1487636
fix(agent): Refactor imports and update docstring for clarity
Yosoyepa Nov 9, 2025
c742b35
Update backend/src/schemas/finding.py
jpastor1649 Nov 10, 2025
b33e00b
fix(schemas): address PR review feedback
Yosoyepa Nov 10, 2025
f99e8e0
Merge pull request #10 from Yosoyepa/feature/CGAI-12-base-agent-analy…
jpastor1649 Nov 10, 2025
968215a
feat(security): implement SecurityAgent with 4 detection modules - CG…
Yosoyepa Nov 18, 2025
3bb4cbd
chore(quality): satisfy lint and raise security coverage
Yosoyepa Nov 18, 2025
17dbba6
refactor(security): reduce sql ast detection complexity
Yosoyepa Nov 18, 2025
67795c4
Initial plan
Copilot Nov 23, 2025
7f1f49e
fix: address PR review comments - update docs, fix deprecation, add c…
Copilot Nov 23, 2025
deb7979
Merge pull request #12 from Yosoyepa/copilot/sub-pr-11
Yosoyepa Nov 23, 2025
b6f9159
Merge pull request #11 from Yosoyepa/feature/CGAI-19-security-agent
Yosoyepa Nov 23, 2025
3ce50f9
feat(infra): implement CodeReviewRepository with AES-256 encryption
Yosoyepa Nov 23, 2025
791dda0
style: apply black and isort formatting
Yosoyepa Nov 23, 2025
276a8c7
style: fix flake8 E501 line too long and F401 unused import
Yosoyepa Nov 23, 2025
be03aba
feat(app): implement AnalysisService with validation logic
Yosoyepa Nov 24, 2025
bf0926b
style: fix flake8 errors F841 and E741
Yosoyepa Nov 24, 2025
3995790
feat(api): implement POST /api/v1/analyze endpoint
Yosoyepa Nov 25, 2025
91f47d5
Feat(tests): add vulnerable test cases for security analysis
Yosoyepa Nov 25, 2025
deba01e
feat(auth): add OAuth2PasswordBearer with optional dev mode
juanandradeu Nov 25, 2025
ce5ded5
test(api): add comprehensive tests for analyze endpoint
juanandradeu Nov 25, 2025
1f1cd89
refactor(events): improve EventBus observer pattern
Yosoyepa Nov 25, 2025
aee1c88
refactor(database): simplify get_db dependency
Yosoyepa Nov 25, 2025
2586038
test(api): add comprehensive tests for analyze endpoint
Yosoyepa Nov 25, 2025
90500fc
fix(tests): correct test assertions for updated schemas
Yosoyepa Nov 25, 2025
6eb749d
docs: update documentation for v1.0.0 release
Yosoyepa Nov 25, 2025
2b05d79
Merge pull request #14 from Yosoyepa/feature/CGAI-20-fastapi-endpoint
Yosoyepa Nov 25, 2025
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
49 changes: 49 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker Build

on:
push:
branches: [main, develop]
paths:
- "backend/Dockerfile"
- "backend/docker-compose.yml"
- "backend/requirements.txt"
- ".github/workflows/docker.yml"
pull_request:
branches: [main]

jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install docker-compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose

- name: Build backend image
run: |
cd backend
docker build --tag codeguard-backend:${{ github.sha }} .

- name: Test Docker image
run: |
docker run --rm codeguard-backend:${{ github.sha }} python --version

- name: Test Docker Compose (validation only)
run: |
cd backend
docker-compose config

- name: Summary
if: success()
run: |
echo " Docker image built successfully!"
echo " Image: codeguard-backend:${{ github.sha }}"
56 changes: 56 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Lint & Format Check

on:
push:
branches: [main, develop, "feature/**"]
paths:
- "backend/**/*.py"
- ".github/workflows/lint.yml"
pull_request:
branches: [main, develop]
paths:
- "backend/**/*.py"

jobs:
lint:
name: Code Quality 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.11"
cache: "pip"

- name: Install linting dependencies
run: |
python -m pip install --upgrade pip
pip install black>=23.0.0 flake8>=7.0.0 isort>=5.13.0

- name: Check code formatting with Black
run: |
cd backend
black src/ --line-length=100 --check

- name: Check import sorting with isort
run: |
cd backend
isort src/ --profile=black --line-length=100 --check-only

- name: Lint with Flake8
run: |
cd backend
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src/ --count --max-complexity=10 --max-line-length=100 --statistics

- name: Summary
if: success()
run: |
echo "= All code quality checks passed!"
echo "- Black formatting: ✓"
echo "- Import sorting (isort): ✓"
echo "- Linting (flake8): ✓"
65 changes: 65 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Tests & Coverage

on:
push:
branches: [main, develop, "feature/**"]
paths:
- "backend/**/*.py"
- "backend/tests/**"
- ".github/workflows/test.yml"
pull_request:
branches: [main, develop]
paths:
- "backend/**/*.py"
- "backend/tests/**"

jobs:
test:
name: Run Tests & Coverage
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.11"
cache: "pip"

- name: Install dependencies
run: |
cd backend
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest>=8.0.0 pytest-asyncio>=0.23.0 pytest-cov>=4.1.0

- name: Run tests with coverage
run: |
cd backend
pytest tests/ --cov=src --cov-report=html --cov-report=term-missing --cov-report=xml --cov-fail-under=75 -v
continue-on-error: false

- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: backend/htmlcov/
retention-days: 30

- name: Upload coverage to Codecov (optional)
if: always()
uses: codecov/codecov-action@v4
with:
file: backend/coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

- name: Summary
if: success()
run: |
echo "All tests passed with >75% coverage!"
echo "Coverage report uploaded as artifact"
Loading