Skip to content

Commit 584bff6

Browse files
authored
Merge branch 'main' into fix/issue-common-math
2 parents a6754b0 + 01573cd commit 584bff6

119 files changed

Lines changed: 11039 additions & 811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Security disclosure
3+
about: Report a security vulnerability privately
4+
title: '[SECURITY] '
5+
labels: 'security'
6+
assignees: ''
7+
8+
---
9+
10+
> **⚠️ Do not use this template for public vulnerability reports.**
11+
> Email security@quantara.protocol instead. This template is for maintainer use
12+
> when triaging disclosed vulnerabilities.
13+
14+
**Severity**
15+
<!-- Critical / High / Medium / Low -->
16+
17+
**Component**
18+
<!-- Soroban contracts / FastAPI backend / React frontend / CI pipeline -->
19+
20+
**Vulnerability type**
21+
<!-- e.g., auth bypass, injection, IDOR, reentrancy, XSS, secret leakage -->
22+
23+
**Description**
24+
<!-- Brief description of the vulnerability and its impact. -->
25+
26+
**Steps to reproduce**
27+
1. ...
28+
2. ...
29+
30+
**Suggested fix (if any)**
31+
<!-- Optional. A proposed mitigation or patch. -->
32+
33+
**Disclosure timeline**
34+
- Report received:
35+
- Assessment complete:
36+
- Fix deployed:
37+
- Public disclosure:

.github/workflows/bandit.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Bandit Security Scan"
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
9+
permissions:
10+
contents: read
11+
security-events: write
12+
13+
jobs:
14+
bandit:
15+
name: Bandit Scan
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.10'
26+
27+
# bandit-sarif-formatter is required to successfully output the .sarif format
28+
- name: Install Bandit and Dependencies
29+
run: |
30+
pip install bandit bandit-sarif-formatter
31+
32+
# Added an explicit check to make sure the file exists before running the upload step
33+
- name: Run Bandit Scan
34+
run: |
35+
bandit -r . -f sarif -o bandit-results.sarif || true
36+
if [ ! -f bandit-results.sarif ]; then
37+
echo "Bandit failed to generate SARIF output. Creating an empty fallback report."
38+
echo '{"$schema":"https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json","version":"2.1.0","runs":[]}' > bandit-results.sarif
39+
fi
40+
41+
# Upgraded action from v3 to v4 to fix the runner deprecation warning shown in your logs
42+
- name: Upload Bandit Scan Results to GitHub Security
43+
uses: github/codeql-action/upload-sarif@v4
44+
with:
45+
sarif_file: bandit-results.sarif
46+
category: bandit

.github/workflows/ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ on:
2424

2525
jobs:
2626
test:
27+
name: Test Suite (Python ${{ matrix.python-version }})
2728
runs-on: ubuntu-latest
2829
permissions:
2930
contents: read
3031

32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
python-version: ["3.12", "3.13"]
36+
3137
services:
3238
postgres:
3339
image: postgres:16
@@ -55,12 +61,12 @@ jobs:
5561

5662
steps:
5763
- name: Checkout repository
58-
uses: actions/checkout@v7
64+
uses: actions/checkout@v4
5965

60-
- name: Set up Python
61-
uses: actions/setup-python@v6
66+
- name: Set up Python ${{ matrix.python-version }}
67+
uses: actions/setup-python@v5
6268
with:
63-
python-version: "3.12"
69+
python-version: ${{ matrix.python-version }}
6470
cache: 'pip'
6571

6672
- name: Install Poetry
@@ -87,4 +93,12 @@ jobs:
8793
- name: Run tests
8894
working-directory: ./quantara
8995
run: |
90-
poetry run pytest web_app/tests -v --tb=short
96+
poetry run pytest web_app/tests -v --tb=short --cov-fail-under=80
97+
98+
- name: Upload coverage report
99+
if: always()
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: coverage-report
103+
path: quantara/coverage.xml
104+
retention-days: 14

.github/workflows/codeql.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "CodeQL SAST Analysis"
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
schedule:
9+
- cron: '30 4 * * 6' # Runs every Saturday at 04:30 UTC
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
analyze:
18+
name: CodeQL Scan
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 360
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
# CodeQL supports: 'cpp', 'csharp', 'go', 'java-bytecode', 'javascript-typescript', 'python', 'ruby', 'swift'
26+
# Adjust languages based on your repository stack (e.g., python, javascript-typescript)
27+
language: [ 'python', 'javascript-typescript' ]
28+
29+
steps:
30+
- name: Checkout Repository
31+
uses: actions/checkout@v4
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended,security-and-quality
38+
39+
# Autobuild attempts to build any compiled languages if present
40+
- name: Autobuild
41+
uses: github/codeql-action/autobuild@v3
42+
43+
# If Autobuild fails, uncomment and adjust manual build steps for compiled languages:
44+
# - run: |
45+
# make build
46+
47+
- name: Perform CodeQL Analysis
48+
uses: github/codeql-action/analyze@v3
49+
with:
50+
category: "/language:${{matrix.language}}"

.github/workflows/docs-check.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Docs Check
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
- '*.md'
13+
- '.github/**/*.md'
14+
- '.github/**/*.yml'
15+
16+
jobs:
17+
docs:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v7
24+
25+
- name: Validate issue template frontmatter
26+
run: |
27+
failed=0
28+
for f in .github/ISSUE_TEMPLATE/*.md; do
29+
if ! head -1 "$f" | grep -q '^---'; then
30+
echo "::error file=$f::Missing YAML frontmatter (must start with ---)"
31+
failed=1
32+
fi
33+
done
34+
if [ "$failed" -eq 1 ]; then exit 1; fi
35+
echo "All issue templates have valid frontmatter."
36+
37+
- name: Check required sections in SECURITY.md
38+
run: |
39+
for section in "Reporting a Vulnerability" "Response SLA" "Bounty Scope" "Responsible Disclosure"; do
40+
if ! grep -q "## $section" SECURITY.md; then
41+
echo "::error file=SECURITY.md::Missing required section: $section"
42+
exit 1
43+
fi
44+
done
45+
echo "SECURITY.md has all required sections."
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
release-type: simple

0 commit comments

Comments
 (0)