Skip to content

Commit 90470d2

Browse files
author
Sovereign Map Test Suite
committed
Uploaded
1 parent 532da64 commit 90470d2

21 files changed

Lines changed: 3739 additions & 916 deletions

.github/workflows/ci.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,20 @@ jobs:
1818
runs-on: ubuntu-latest
1919
env:
2020
OQS_INSTALL_PATH: /usr/local
21+
2122
steps:
2223
- uses: actions/checkout@v4
24+
2325
- name: Set up Python
2426
uses: actions/setup-python@v4
2527
with:
2628
python-version: '3.12'
29+
2730
- name: Install system deps
2831
run: |
2932
sudo apt-get update
3033
sudo apt-get install -y build-essential cmake libssl-dev pkg-config
34+
3135
- name: Optionally build liboqs
3236
if: github.event_name == 'workflow_dispatch' && inputs.build_liboqs || vars.BUILD_LIBOQS == 'true'
3337
run: |
@@ -38,10 +42,46 @@ jobs:
3842
sudo make install
3943
sudo ldconfig
4044
python -m pip install liboqs-python
45+
4146
- name: Install Python deps
4247
run: |
4348
python -m pip install --upgrade pip
4449
pip install -r prototype/requirements.txt
50+
pip install bandit safety pre-commit
51+
52+
- name: Run security scan (Bandit)
53+
run: |
54+
bandit -r prototype/ -f json -o bandit-report.json
55+
echo "Bandit report saved to bandit-report.json"
56+
57+
- name: Check for vulnerable dependencies (Safety)
58+
run: |
59+
safety check --json > security-report.json || true
60+
echo "Safety report saved to security-report.json"
61+
62+
- name: Run pre-commit hooks
63+
run: |
64+
pre-commit install
65+
pre-commit run --all-files
66+
4567
- name: Run tests
4668
run: |
47-
pytest -q
69+
pytest -q prototype/test_security_fixes.py prototype/test_oqs_hybrid.py prototype/test_secure_hybrid_integration.py prototype/test_concurrency_smoke.py prototype/test_secure_run.py -v
70+
71+
- name: Upload security reports
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: security-reports
75+
path: |
76+
bandit-report.json
77+
security-report.json
78+
79+
build:
80+
needs: test
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- name: Build Docker images
86+
run: |
87+
docker-compose -f docker-compose.dev.yml build

.gitignore

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,71 @@
1-
.venv/
1+
# Python
22
__pycache__/
3-
*.pyc
4-
.pytest_cache/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Virtual environments
24+
venv/
25+
ENV/
26+
env/
27+
.venv
28+
29+
# IDE
530
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
*~
35+
.project
36+
.pydevproject
37+
.settings/
38+
39+
# Testing
40+
.pytest_cache/
41+
.coverage
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage.*
46+
*.egg-info/
47+
48+
# Environment
649
.env
7-
dist/
8-
build/
9-
/.pytest_cache/
10-
*.egg-info/
50+
.venv
51+
env/
52+
ENV/
53+
54+
# OS files
55+
.DS_Store
56+
Thumbs.db
57+
*.log
58+
59+
# Mohawk-specific
60+
__pycache__/
61+
*.pkl
62+
*.pickle
63+
*.pt
64+
*.pth
65+
66+
# Docker volumes (if any)
67+
.docker-volume/
68+
69+
# Local configuration
70+
.local/
71+
.cache/

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-added-large-files
10+
args: [--max-size=500MB]
11+
12+
- repo: https://github.com/psf/black
13+
rev: 23.12.1
14+
hooks:
15+
- id: black
16+
language_version: python3
17+
18+
- repo: https://github.com/pycqa/isort
19+
rev: 5.12.0
20+
hooks:
21+
- id: isort
22+
args: [--profile=black]
23+
24+
- repo: https://github.com/pycqa/flake8
25+
rev: 6.1.0
26+
hooks:
27+
- id: flake8
28+
additional_dependencies:
29+
- flake8-bugbear
30+
- flake8-comprehensions
31+
- flake8-import-order
32+
33+
- repo: https://github.com/pre-commit/mirrors-mypy
34+
rev: v1.7.1
35+
hooks:
36+
- id: mypy
37+
additional_dependencies:
38+
- numpy
39+
- types-requests
40+
args: [--ignore-missing-imports]

0 commit comments

Comments
 (0)