fix: full-codebase bug audit — all Critical/High + Medium tier #219
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Security Note: This workflow uses only push/pull_request/workflow_dispatch triggers. | |
| # Matrix values are hardcoded constants. No untrusted input is used in run: commands. | |
| name: Test Vector Database Adaptors | |
| on: | |
| push: | |
| branches: [ main, development ] | |
| paths: | |
| - 'src/skill_seekers/cli/adaptors/**' | |
| - 'src/skill_seekers/mcp/tools/vector_db_tools.py' | |
| - 'tests/test_*adaptor*.py' | |
| - 'tests/test_mcp_vector_dbs.py' | |
| - 'tests/test_docker_smoke.py' | |
| - 'tests/test_upload_integration.py' | |
| pull_request: | |
| branches: [ main, development ] | |
| paths: | |
| - 'src/skill_seekers/cli/adaptors/**' | |
| - 'src/skill_seekers/mcp/tools/vector_db_tools.py' | |
| - 'tests/test_*adaptor*.py' | |
| - 'tests/test_mcp_vector_dbs.py' | |
| - 'tests/test_docker_smoke.py' | |
| - 'tests/test_upload_integration.py' | |
| workflow_dispatch: | |
| jobs: | |
| test-adaptors: | |
| name: Test ${{ matrix.adaptor }} Adaptor | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| adaptor: [weaviate, chroma, faiss, qdrant] | |
| python-version: ['3.10', '3.12'] | |
| env: | |
| ADAPTOR_NAME: ${{ matrix.adaptor }} | |
| PYTHON_VERSION: ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| pip install -e . | |
| - name: Run adaptor tests | |
| run: | | |
| echo "🧪 Testing $ADAPTOR_NAME adaptor..." | |
| python -m pytest "tests/test_adaptors/test_${ADAPTOR_NAME}_adaptor.py" -v --tb=short | |
| - name: Test adaptor integration | |
| run: | | |
| echo "🔗 Testing $ADAPTOR_NAME integration..." | |
| # Create test skill | |
| mkdir -p test_skill/references | |
| echo "# Test Skill" > test_skill/SKILL.md | |
| echo "Test content" >> test_skill/SKILL.md | |
| echo "# Reference" > test_skill/references/ref.md | |
| # Test adaptor packaging | |
| python3 -c " | |
| import os | |
| from pathlib import Path | |
| from skill_seekers.cli.adaptors import get_adaptor | |
| adaptor_name = os.environ['ADAPTOR_NAME'] | |
| adaptor = get_adaptor(adaptor_name) | |
| package_path = adaptor.package(Path('test_skill'), Path('.')) | |
| print(f'Package created: {package_path}') | |
| assert package_path.exists(), 'Package file not created' | |
| print(f'Package size: {package_path.stat().st_size} bytes') | |
| " | |
| - name: Upload test package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-package-${{ env.ADAPTOR_NAME }}-py${{ env.PYTHON_VERSION }} | |
| path: test_skill-${{ env.ADAPTOR_NAME }}.json | |
| retention-days: 7 | |
| test-mcp-tools: | |
| name: Test MCP Vector DB Tools | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| pip install -e . | |
| - name: Run MCP vector DB tests | |
| run: | | |
| echo "🧪 Testing MCP vector database tools..." | |
| python -m pytest tests/test_mcp_vector_dbs.py -v --tb=short | |