Skip to content

Commit 73a380e

Browse files
committed
2 parents 681ca2b + 7cc75e4 commit 73a380e

File tree

3 files changed

+24
-53
lines changed

3 files changed

+24
-53
lines changed

.github/workflows/snyk-security.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,31 @@ jobs:
3535
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
3939
- name: Set up Snyk CLI to check for security issues
4040
# Snyk can be used to break the build when it detects security issues.
4141
# In this case we want to upload the SAST issues to GitHub Code Scanning
4242
uses: snyk/actions/setup@cdb760004ba9ea4d525f2e043745dfe85bb9077e
4343

44-
# For Snyk Open Source you must first set up the development environment for your application's dependencies
45-
# For example for Node
46-
#- uses: actions/setup-node@v4
47-
# with:
48-
# node-version: 20
44+
- name: Set up Python
45+
uses: actions/setup-python@19e4675e06535f6b54e894da5c1f044400bb4996
46+
with:
47+
python-version: '3.12.7'
48+
49+
- name: Install dependencies
50+
run: |
51+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
52+
if [ -f Pipfile ]; then pip install pipenv && pipenv install --dev; fi
53+
if [ -f pyproject.toml ]; then pip install poetry && poetry install; fi
4954
55+
- name: Run Snyk to check for vulnerabilities
56+
uses: snyk/actions/python-3.10@cdb760004ba9ea4d525f2e043745dfe85bb9077e
57+
continue-on-error: true # To make sure that SARIF upload gets called
5058
env:
51-
# This is where you will need to introduce the Snyk API token created with your Snyk account
52-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
59+
SNYK_TOKEN: ${{ secrets.SNYK_SECRET_TOKEN }}
60+
with:
61+
args: --sarif-file-output=snyk.sarif --severity-threshold=medium
62+
5363

5464
# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
5565
# Use || true to not fail the pipeline
@@ -74,6 +84,6 @@ jobs:
7484

7585
# Push the Snyk Code results into GitHub Code Scanning tab
7686
- name: Upload result to GitHub Code Scanning
77-
uses: github/codeql-action/upload-sarif@v3
87+
uses: github/codeql-action/upload-sarif@6349095d19ec30397ffb02a63b7aa4f867deb563
7888
with:
7989
sarif_file: snyk-code.sarif

feldman_vss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"""
131131

132132
# /// script
133-
# requires-python = ">=3.8"
133+
# requires-python = ">=3.9"
134134
# dependencies = [
135135
# "gmpy2 == 2.2.1",
136136
# "msgpack == 1.1.0",
@@ -6077,4 +6077,4 @@ def verify_dual_commitments(
60776077
# Check equality using constant-time comparison
60786078
all_valid &= constant_time_compare(left_side, right_side)
60796079

6080-
return all_valid
6080+
return all_valid

pyproject.toml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers = [
1313
]
1414
description = "Post-Quantum Secure Feldman's Verifiable Secret Sharing (VSS) in Python"
1515
readme = "README.md"
16-
requires-python = ">=3.8"
16+
requires-python = ">=3.9,<4.0"
1717
license = {text = "MIT"}
1818
classifiers = [
1919
"Development Status :: 4 - Beta",
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.10",
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
2930
"Topic :: Security",
3031
"Topic :: Security :: Cryptography",
3132
"Topic :: Software Development :: Libraries :: Python Modules",
@@ -38,25 +39,10 @@ dependencies = [
3839

3940
[project.optional-dependencies]
4041
memory_monitor = ["psutil == 7.0.0"]
41-
test = [
42-
"pytest >= 7.0",
43-
"pytest-cov >= 4.0",
44-
"pytest-xdist >= 3.0",
45-
"hypothesis >= 6.0"
46-
]
47-
docs = [
48-
"sphinx >= 7.0",
49-
"sphinx-rtd-theme >= 2.0",
50-
"myst-parser >= 2.0",
51-
"sphinx-copybutton >= 0.5",
52-
"sphinx-autodoc-typehints >= 2.0",
53-
]
5442
dev = [
5543
"black >= 24.0",
5644
"isort >= 5.10",
5745
"flake8 >= 7.0",
58-
"mypy >= 1.9",
59-
"pre-commit >= 3.6",
6046
"types-requests",
6147
"types-setuptools",
6248
"msgpack-types == 0.5.0"
@@ -77,7 +63,6 @@ documentation = "https://github.com/DavidOsipov/PostQuantum-Feldman-VSS/wiki"
7763
"Telegram" = "https://telegram.me/david_osipov"
7864
"Signal" = "https://signal.me/#eu/d68l1UjrWlGVRzbfkVM1bvQMNqCqiae9GM86P_af8ZK2o5E5YSNKbL4MyM9y-2WH"
7965

80-
# Use py-modules instead of packages.find for a single-file module
8166
[tool.setuptools]
8267
py-modules = ["feldman_vss"]
8368

@@ -109,33 +94,9 @@ known_first_party = ["feldman_vss"]
10994
line-length = 88
11095
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
11196

112-
[tool.mypy]
113-
python_version = "3.8"
114-
warn_unused_configs = true
115-
warn_redundant_casts = true
116-
warn_unused_ignores = true
117-
disallow_untyped_defs = true
118-
disallow_incomplete_defs = true
119-
check_untyped_defs = true
120-
no_implicit_optional = true
121-
strict_optional = true
122-
warn_return_any = true
123-
show_error_codes = true
124-
plugins = ["pydantic.mypy"]
125-
126-
[[tool.mypy.overrides]]
127-
module = [
128-
"gmpy2.*",
129-
"msgpack.*",
130-
"blake3.*",
131-
"pytest.*",
132-
"hypothesis.*",
133-
"sphinx.*",
134-
"psutil.*"
135-
]
13697
ignore_missing_imports = true
13798

13899
[tool.flake8]
139100
max-line-length = 88
140101
extend-ignore = ["E203", "W503"]
141-
per-file-ignores = ["__init__.py:F401"]
102+
per-file-ignores = ["__init__.py:F401"]

0 commit comments

Comments
 (0)