@@ -12,23 +12,83 @@ jobs:
1212 - image : cimg/python:<< parameters.python-version >>
1313 steps :
1414 - checkout
15+ - restore_cache :
16+ keys :
17+ - pip-v1-{{ checksum "pyproject.toml" }}-<< parameters.python-version >>
18+ - pip-v1-
1519 - run :
1620 name : Install Dependencies
1721 command : pip install .[dev,server,symbolic]
22+ - save_cache :
23+ key : pip-v1-{{ checksum "pyproject.toml" }}-<< parameters.python-version >>
24+ paths :
25+ - ~/.local/lib/python<< parameters.python-version >>/site-packages
26+ - ~/.cache/pip
1827 - run :
1928 name : Run Tests
2029 command : |
21- # Run pytest with coverage as configured in pyproject.toml
22- pytest
30+ mkdir -p test-results
31+ pytest --junitxml=test-results/results.xml
2332 - store_test_results :
2433 path : test-results
2534 - store_artifacts :
2635 path : htmlcov
2736
37+ security-scan :
38+ docker :
39+ - image : cimg/python:3.12
40+ steps :
41+ - checkout
42+ - run :
43+ name : Create isolated audit environment
44+ command : |
45+ python -m venv /tmp/audit-env
46+ /tmp/audit-env/bin/pip install --upgrade pip
47+ /tmp/audit-env/bin/pip install .[dev,server,symbolic]
48+ - run :
49+ name : Run pip-audit (project deps only)
50+ command : |
51+ set -o pipefail
52+ /tmp/audit-env/bin/pip install pip-audit
53+ /tmp/audit-env/bin/pip-audit --strict --skip-editable --desc \
54+ `# CVE-2025-8869: pip tar extraction vuln — build-only tool, not in runtime image` \
55+ --ignore-vuln CVE-2025-8869 \
56+ `# CVE-2026-1703: pip wheel path traversal (CVSS 2.0 Low) — build-only, pinned hashes used` \
57+ --ignore-vuln CVE-2026-1703 \
58+ 2>&1 | tee audit-results.txt
59+ - store_artifacts :
60+ path : audit-results.txt
61+
62+ docker-build :
63+ docker :
64+ - image : cimg/base:current
65+ steps :
66+ - checkout
67+ - setup_remote_docker :
68+ version : docker24
69+ docker_layer_caching : true
70+ - run :
71+ name : Build Docker Image
72+ command : |
73+ docker build -t qwedai/qwed-verification:ci-${CIRCLE_SHA1:0:7} .
74+ - run :
75+ name : Verify Image
76+ command : |
77+ docker run --rm --entrypoint python qwedai/qwed-verification:ci-${CIRCLE_SHA1:0:7} -c "import qwed_sdk; print('QWED SDK loaded successfully')"
78+
2879workflows :
29- main :
80+ ci :
3081 jobs :
3182 - build-and-test :
3283 matrix :
3384 parameters :
3485 python-version : ["3.10", "3.11", "3.12"]
86+ - security-scan :
87+ requires :
88+ - build-and-test
89+ - docker-build :
90+ requires :
91+ - build-and-test
92+ filters :
93+ branches :
94+ only : main
0 commit comments