Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

docs: Document OSSF Scorecard pinned-dependencies decisions

LearningCircuitc765765c098f
diff --git a/.github/SECURITY_SCORECARD.md b/.github/SECURITY_SCORECARD.md
index a6c342a2dc..3d814d9408 100644
--- a/.github/SECURITY_SCORECARD.md
+++ b/.github/SECURITY_SCORECARD.md
@@ -3,9 +3,18 @@
This document explains our compliance status with OSSF Scorecard checks
and documents any accepted risks or false positives.
+## Current Score: 8/10 for Pinned-Dependencies
+
+**Summary:**
+- ✅ 196/196 GitHub Actions pinned by SHA
+- ✅ 4/4 Container images pinned by digest
+- ⚠️ 0/20 pip commands pinned by hash (version-pinned only - accepted risk)
+- ⚠️ 21/24 npm commands pinned (3 are operational commands)
+- ⚠️ 1 false positive for downloadThenRun
+
## Pinned-Dependencies
-### GitHub Actions: COMPLIANT
+### GitHub Actions: COMPLIANT ✅
All GitHub Actions use commit SHA pinning (40-character hex):
@@ -16,7 +25,7 @@ actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
```
-### Docker Images: COMPLIANT
+### Docker Images: COMPLIANT ✅
All Docker images use SHA256 digest pinning:
@@ -27,24 +36,90 @@ redis:alpine@sha256:8360960f5fb56a282d78686203dd875862cd4b52a4184c17ac753690252d
node:20-alpine@sha256:bcd88137d802e2482c9df3cdec71e0431857ebbbdba6973776b5593214056d86
```
-### pip install (Accepted Risk)
+### pip install: VERSION-PINNED (Accepted Risk) ⚠️
Scorecard flags `pip install package==version` because it prefers hash pinning.
+All 20 flagged pip commands use exact version pinning.
+
+**Flagged commands and their status:**
+
+| File | Line | Command | Status |
+|------|------|---------|--------|
+| Dockerfile | 47-48 | `pip install pip==24.3.1 pdm==2.26.2 playwright==1.57.0` | Version-pinned |
+| check-env-vars.yml | 41 | `pip install loguru==0.7.3 sqlalchemy==2.0.36...` | Version-pinned |
+| checkov.yml | 46 | `pip install checkov==3.2.346` | Version-pinned |
+| e2e-research-test.yml | 55 | `pip install -e .` | Local package (N/A) |
+| fuzz.yml | 48-49 | `pip install pip==25.0` `pip install pdm==2.26.2` | Version-pinned |
+| mypy-type-check.yml | 40,48,49 | `pip install pdm==2.26.2 mypy==1.14.1...` | Version-pinned |
+| publish.yml | 137,326 | `pip install pdm==2.26.2` `pip install wheel==0.45.1` | Version-pinned |
+| responsive-ui-tests-enhanced.yml | 88-89 | `pip install pip==25.0` `pip install -e .` | Version-pinned + local |
+| security-tests.yml | 88 | `pip install pip-audit==2.10.0` | Version-pinned |
+| semgrep.yml | 42 | `pip install semgrep==1.87.0` | Version-pinned |
+| update-precommit-hooks.yml | 35-36 | `pip install pip==25.0 pre-commit-update==0.6.2` | Version-pinned |
+| validate-image-pinning.yml | 74 | `pip install pyyaml==6.0.2` | Version-pinned |
+| zizmor-security.yml | 50 | `pip install zizmor==1.6.0` | Version-pinned |
+
+**Why we don't use hash pinning:**
+
+1. **Platform-specific hashes**: pip package hashes vary by Python version, OS, and architecture.
+ A single hash won't work across different CI runners.
+
+2. **Maintenance burden**: Every version update requires regenerating hashes for all platforms.
+
+3. **Marginal security benefit**: These are dev/CI tools running in hardened CI environments
+ (step-security/harden-runner) with egress auditing. Supply chain attacks on PyPI packages
+ are mitigated by version pinning and short execution windows.
+
+4. **Industry practice**: Version pinning (`==`) is the standard for CI tool installation.
+ Hash pinning is typically reserved for production dependencies.
+
+5. **Local packages**: `pip install -e .` installs the local source code and cannot be hash-pinned.
+
+### npm Commands: MOSTLY COMPLIANT (21/24) ⚠️
-**Our position:**
-- We use version pinning (`==`) for reproducibility
-- Hash pinning for dev tools (pdm, mypy, pre-commit-update) provides marginal
- security benefit for significant complexity
-- These tools run in trusted CI environments with hardened runners
-- The trade-off between security and maintainability favors version pinning
+The 3 "unpinned" npm commands are operational commands, not package installations:
+
+| File | Line | Command | Reason Not Pinned |
+|------|------|---------|-------------------|
+| npm-audit.yml | 56 | `npm i --package-lock-only` | Generates lockfile only |
+| npm-audit.yml | 72 | `npm i --package-lock-only` | Generates lockfile only |
+| update-npm-dependencies.yml | 74 | `npm update` | Intentionally updates to latest |
+
+These commands don't install packages directly - they either generate lockfiles
+or intentionally update packages. They cannot and should not be "pinned".
+
+### downloadThenRun: FALSE POSITIVE ⚠️
+
+**Flagged:** `examples/elasticsearch/test_elasticsearch.sh:60`
+
+```bash
+curl -s http://localhost:9200 | python3 -m json.tool | head -10
+```
+
+**Why it's a false positive:**
+- This fetches JSON from localhost:9200 (local Elasticsearch)
+- Pipes to `python3 -m json.tool` (stdlib JSON formatter)
+- Shows first 10 lines of pretty-printed output
+
+This is NOT downloading and running a remote script. It's formatting local JSON output.
+The scorecard pattern-matches `curl | python` as potentially dangerous, but this
+is a safe operation on localhost data.
### Enforcement
We have automated verification for our pinning strategy:
- `.github/workflows/validate-image-pinning.yml` - Validates Docker image digests
- Pre-commit hooks verify action SHA pinning
+- All pip install commands use explicit version specifiers
+
+### Review Cadence
+
+These decisions are reviewed quarterly to ensure they remain appropriate:
+- **Next review:** Q2 2025
+- **Owner:** Security team
## References
- [OSSF Scorecard Pinned-Dependencies Check](https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies)
- [StepSecurity Harden Runner](https://github.com/step-security/harden-runner)
+- [pip Hash Checking Mode](https://pip.pypa.io/en/stable/topics/secure-installs/#hash-checking-mode)