Skip to content

Commit 1ad43cf

Browse files
feat(security): cargo-audit + cargo-deny + Dependabot + SECURITY.md + CODEOWNERS + gitignore hardening
P1 — supply chain & disclosure infrastructure: - deny.toml: license/advisory/bans/sources policy for cargo-deny - .github/dependabot.yml: weekly auto-PRs for both GitHub Actions and Cargo deps; minor+patch updates grouped to reduce PR noise - SECURITY.md: private-disclosure policy, scope, supported versions P2 — passive hardening: - .github/CODEOWNERS: require @NeuralEmpowerment review on .github/**, Cargo.{toml,lock}, SECURITY.md, LICENSE (supply-chain + legal gates) - .gitignore: append patterns for certs, keys, keystores, .env files DONE_WITH_CONCERNS — cargo-deny license violations (fastembed transitives): 1. libfuzzer-sys v0.4.12 — license "(MIT OR Apache-2.0) AND NCSA" NCSA (University of Illinois/NCSA Open Source License) is OSI-approved and FSF-Free but is not in the current allow list. Chain: fastembed → image → ravif → rav1e → libfuzzer-sys 2. webpki-roots v0.26.11 and v1.0.7 — license "CDLA-Permissive-2.0" Community Data License Agreement (permissive variant) — not in allow list. Chain: fastembed → ureq (and ort-sys) → webpki-roots ACTION REQUIRED: Review whether NCSA and CDLA-Permissive-2.0 are acceptable for your use case, then either add them to deny.toml [licenses].allow or open an issue with the fastembed maintainers. Do NOT blindly allow without legal review.
1 parent 151f8f0 commit 1ad43cf

5 files changed

Lines changed: 127 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CI/CD workflows — arbitrary code execution risk; require maintainer review on changes.
2+
.github/ @NeuralEmpowerment
3+
4+
# Dependency manifests — supply chain risk; reviewed changes only.
5+
Cargo.toml @NeuralEmpowerment
6+
Cargo.lock @NeuralEmpowerment
7+
8+
# Security policy
9+
SECURITY.md @NeuralEmpowerment
10+
11+
# License — IP / legal sensitivity
12+
LICENSE @NeuralEmpowerment

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions — auto-PR for action version updates.
4+
# Updates the SHA-pinned versions; the comment shows what changed.
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
open-pull-requests-limit: 5
10+
11+
# Cargo — auto-PR for crate updates with security advisories or new versions.
12+
- package-ecosystem: "cargo"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
open-pull-requests-limit: 5
17+
# Group minor/patch updates to reduce PR noise; majors get their own PRs.
18+
groups:
19+
cargo-minor-and-patch:
20+
update-types:
21+
- "minor"
22+
- "patch"

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,21 @@ markdown-explorer/
2525
docs/integration-example.md
2626
docs/workflow.md
2727
docs/research-reinforcement-feedback-loop.md
28+
29+
# Credentials and secrets — passive safety net against accidental commits
30+
*.pem
31+
*.key
32+
*.p12
33+
*.pfx
34+
*.cer
35+
*.crt
36+
id_rsa
37+
id_rsa.pub
38+
id_ed25519
39+
id_ed25519.pub
40+
*.keystore
41+
42+
# Environment files
43+
.env
44+
.env.local
45+
.env.*.local

SECURITY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
If you discover a security vulnerability in semrouter, please report it privately. **Do not open a public issue.**
6+
7+
**Preferred channel:** [GitHub Security Advisories](https://github.com/AgentParadise/semrouter/security/advisories/new) — this creates a private discussion with the maintainers.
8+
9+
**Alternative:** Open a private issue or DM a maintainer on GitHub.
10+
11+
We will:
12+
- Acknowledge receipt within 7 days.
13+
- Investigate and confirm or deny the issue within 30 days.
14+
- Coordinate disclosure timing once a fix is ready.
15+
- Credit the reporter in the security advisory unless they prefer to remain anonymous.
16+
17+
## Scope
18+
19+
Vulnerabilities we consider in scope:
20+
21+
- Memory safety issues in unsafe code (we have ~zero unsafe; any is in scope)
22+
- Arbitrary code execution via crafted `routes.jsonl` / `eval.jsonl` / `router.toml` inputs
23+
- Denial-of-service via inputs that cause unbounded resource consumption
24+
- Supply-chain issues (e.g. a transitive dependency CVE we should pin away from)
25+
26+
Out of scope:
27+
- The accuracy or quality of routing decisions (that's an evaluation question, not security).
28+
- Issues in third-party embedders the consumer brings via the `EmbeddingProvider` trait.
29+
- Reports that boil down to "your dep tree includes crate X which has known issue Y" — please file these against the upstream crate; we follow security advisories via cargo-audit and Dependabot.
30+
31+
## Versions
32+
33+
We provide security updates for:
34+
35+
- The latest published `0.x` version on crates.io.
36+
- The `main` branch of the GitHub repo.
37+
38+
Older versions are not supported. If you need a fix for a specific version, open an issue.

deny.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# deny.toml — supply chain enforcement: licenses, advisories, banned crates
2+
[graph]
3+
all-features = true
4+
5+
[advisories]
6+
db-path = "~/.cargo/advisory-db"
7+
db-urls = ["https://github.com/rustsec/advisory-db"]
8+
ignore = []
9+
10+
[licenses]
11+
unused-allowed-license = "warn"
12+
allow = [
13+
"MIT",
14+
"Apache-2.0",
15+
"Apache-2.0 WITH LLVM-exception",
16+
"BSD-2-Clause",
17+
"BSD-3-Clause",
18+
"ISC",
19+
"Unicode-DFS-2016",
20+
"Unicode-3.0",
21+
"Zlib",
22+
"MPL-2.0",
23+
"CC0-1.0",
24+
"OpenSSL",
25+
]
26+
confidence-threshold = 0.8
27+
28+
[bans]
29+
multiple-versions = "warn"
30+
wildcards = "deny"
31+
deny = []
32+
33+
[sources]
34+
unknown-registry = "deny"
35+
unknown-git = "deny"
36+
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
37+
allow-git = []

0 commit comments

Comments
 (0)