custom
code
sovereign-compute
File size: 7,036 Bytes
ef6eb55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# Security Policy

## Reporting Security Issues

If you discover a security vulnerability in PAX-Coder, please **do not** open a public GitHub issue. Instead:

1. Email `jessica@collectivekitty.com` with:
   - Description of the vulnerability
   - Steps to reproduce
   - Potential impact
   - Your contact information

2. Subject line: `[SECURITY] PAX-Coder vulnerability report`

We will:
- Acknowledge receipt within 48 hours
- Investigate the issue
- Develop a fix
- Release a patch
- Credit you in release notes (if desired)

## Security Model

### Sovereign Node Key β€” Production Authorization

All production-authorized PAX-Coder operations are signed with a provisioned Sovereign Node Key (Ed25519 keypair). See [SOVEREIGN_NODE.md](SOVEREIGN_NODE.md) for full details.

**What it proves:**
- **Node Authorization** β€” The PAX-Coder authority has provisioned and authorized this node
- **Integrity** β€” Repository state at a specific git commit
- **Prior-art timestamp** β€” Code existed at time X
- **Authenticity** β€” Signer has the private key for this node
- **Non-repudiation** β€” Signer cannot deny signing

**What it does NOT prove (without authorization record):**
- **Node authorization alone** β€” Node identity without operator signature does not grant authorization
- **Legal ownership** β€” No embedded legal claims
- **Code quality** β€” Only proves authorization and existence, not correctness
- **Blockchain confirmation** β€” Unless explicitly anchored to Bitcoin

### Private Key Protection

The Sovereign Node Key private material MUST:
- Never be committed to git
- Never be uploaded to GitHub
- Never be emailed or messaged
- Never be stored in plaintext in cloud storage
- Never be shared with anyone
- Have file permissions 400 (owner read-only)

**If compromised:**
1. All signatures become untrustworthy
2. Rotate immediately to a new key
3. Publish a security notice
4. Mark old key as revoked (see `sovereign/README.md`)

### Git Security

**Best practices:**
- Enable branch protection on master
- Require pull request reviews before merge
- Require signed commits
- Use GitHub's secret scanning
- Monitor for suspicious commits
- Keep a backup clone (to detect force-push attacks)

**Verification:**
```bash

# Verify commit signature

git log --pretty=format:"%H %s" | head -1

git verify-commit COMMIT_HASH



# Check for unsigned commits

git log --oneline --all | while read commit; do

  git verify-commit $(echo $commit | awk '{print $1}') || echo "UNSIGNED: $commit"

done

```

### Dependency Security

PAX-Coder depends on:
- `openssl` (key generation, signing)
- `jq` (JSON validation)
- Python standard library (scripts)
- Lean 4 toolchain (proof verification)

All dependencies are mature, well-audited projects. Upgrade regularly:

```bash

# Update system packages

sudo apt-get update && sudo apt-get upgrade -y



# Audit Python dependencies

pip install --upgrade pip

pip audit



# Audit Lean packages

lake update

```

### Code Review

Before deploying PAX-Coder:

1. **Review proof obligations** in `PAX/` Lean modules
   - Every theorem should be closed (no `sorry`)
   - Use `lake build` to verify

2. **Review kernel code** in `src/`
   - Check for race conditions
   - Verify memory access patterns
   - Compare against Futhark spec

3. **Review training pipeline** in `train.py`, `export_training_data.py`
   - Verify data sources
   - Check loss functions
   - Validate evaluation metrics

4. **Automated checks** (CI/CD):
   - Secret scanning
   - Linting
   - Type checking
   - Proof verification

### Hardware Security

**RTX 3080 (primary target):**
- NVIDIA's NVIDIA-SMI provides basic driver verification
- Check for firmware updates via NVIDIA's tools
- Monitor GPU memory errors via `nvidia-smi -q -d MEMORY`

**Deployment:**
- Use secure boot where available
- Disable unnecessary firmware/drivers
- Monitor for unauthorized access
- Keep PCIe lanes isolated when sensitive

## Compliance

### Cryptography

PAX-Coder uses:
- **Ed25519** (EDDSA, RFC 8032) for signatures
- **SHA-256** (NIST FIPS 180-4) for hashing
- **OpenSSL** (FIPS-capable, audited)

Both are NIST-approved for federal use.

### Licensing

PAX-Coder is released under a tri-license:
- **BSL-1.1** (Business Source License) β€” commercial
- **AGPL-3.0** β€” copyleft
- **MPL-2.0** β€” permissive

See `LICENSE.tri` for full terms.

### Data Protection

PAX-Coder does not:
- Collect telemetry
- Phone home
- Store user data
- Require API keys
- Contact external services by default

All computation is local.

## Testing & Validation

### Proof Validation

Verify all proofs compile:
```bash

cd PAX

lake build

lake test

```

Expected output:
```

All tests passed βœ“

0 sorry terms

```

### Kernel Verification

Test kernel correctness:
```bash

python -m pytest tests/ -v

```

Tests verify:
- Mathematical correctness (vs Futhark spec)
- Memory safety (bounds checking)
- Pipeline correctness (stages execute correctly)
- FP16 rounding (within 0.5 ulp)

### Integration Tests

```bash

python test_end_to_end.py

```

Verifies:
- Proof β†’ CUDA compilation
- CUDA β†’ RTX 3080 execution
- Execution matches specification
- Proof remains valid after compilation

## Incident Response

### If a vulnerability is discovered:

1. **Acknowledge** (within 48 hours)
2. **Investigate** (reproduce, assess impact)
3. **Develop fix** (write and test patch)
4. **Release** (publish security patch)
5. **Communicate** (update documentation, credit researcher)

### Vulnerability timeline:

- **Days 0-2:** Acknowledge, triage
- **Days 3-7:** Fix development
- **Days 8-10:** Security review
- **Day 11:** Patch release
- **Day 12:** Public disclosure (responsible disclosure)

## Post-Quantum Cryptography

**Current state:** Ed25519 is NOT post-quantum secure.

**When PQC is standardized:** 
- We will upgrade to NIST-standardized post-quantum signatures
- ED448 (128-bit post-quantum security) is a candidate
- Migration path will be announced

**Until then:**
- Ed25519 remains the strongest practical choice
- All outputs should be assumed quantum-vulnerable long-term
- Critical long-lived artifacts should be re-signed post-quantum migration

## References

- [NIST Cryptographic Algorithm Validation Program](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/)
- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
- [CWE Top 25](https://cwe.mitre.org/top25/)
- [OpenSSL Best Practices](https://wiki.openssl.org/index.php/Frequently_Asked_Questions)
- [Ed25519 RFC 8032](https://tools.ietf.org/html/rfc8032)

## License

This security policy is part of PAX-Coder and is licensed under the same tri-license (BSL-1.1 / AGPL-3.0 / MPL-2.0).

---

**Last updated:** 2026-08-18  
**Version:** 1.0.0  
**Maintainer:** SNAPKITTYWEST