Skip to content

Commit 6d507f8

Browse files
Merge remote-tracking branch 'origin/dev' into test-main-dev-merge-20260615
# Conflicts: # src/tool_implementations.py # static/js/research/panel.js
2 parents 2cbd55b + cd02ac7 commit 6d507f8

312 files changed

Lines changed: 20041 additions & 2946 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.

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ dist/
1010
build/
1111
.env
1212
.env.bak.*
13+
# Secrets: keep plaintext and every transient secrets.env variant out of
14+
# the build context. If an encrypted secrets.env is used, it is mounted
15+
# at runtime — never baked into the image. Mirrored in .gitignore.
16+
secrets.env
17+
secrets.env.*
18+
!secrets.env.example
1319
/data/
1420
/logs/
1521
.git/

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,10 @@ SEARXNG_INSTANCE=http://localhost:8080
190190
# These overlays only expose the GPU devices. The slim Odysseus image
191191
# still needs CUDA/ROCm userspace via Cookbook -> Dependencies (vLLM,
192192
# llama-cpp-python, etc.) before models can actually serve on GPU.
193+
194+
# ============================================================
195+
# Storage Paths (Docker Compose)
196+
# ============================================================
197+
198+
# APP_DATA_DIR=./data
199+
# APP_LOGS_DIR=./logs

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Code owners.
2+
#
3+
# Intentionally empty for now. The catch-all rule that mapped every path to a
4+
# single owner froze all merges the moment "Require review from Code Owners"
5+
# was enabled, because no other maintainer's approval could satisfy the gate.
6+
# A per-area ownership map (security/auth, CI, frontend, agent internals, with
7+
# multiple named owners per line) is being worked out in issue #593; once
8+
# agreed it replaces this file. Until then, required reviews and the security
9+
# CI gate (docs/security-ci.md) remain in force via branch protection.

.github/dependabot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependabot keeps dependencies and pinned action versions current.
2+
#
3+
# Why this matters for security: every workflow in this repo pins its GitHub
4+
# Actions to an exact commit (a SHA), which is safe but freezes them in time.
5+
# Dependabot opens a small, reviewable pull request whenever a newer version
6+
# exists -- for Python packages, npm packages, the Docker base image, and the
7+
# pinned Actions themselves -- so staying patched does not require manual work.
8+
# Updates are grouped so a week's bumps arrive as one PR per ecosystem, not a
9+
# flood of separate ones.
10+
11+
version: 2
12+
updates:
13+
# Python dependencies (requirements.txt + requirements-optional.txt).
14+
- package-ecosystem: pip
15+
directory: "/"
16+
schedule:
17+
interval: weekly
18+
open-pull-requests-limit: 5
19+
groups:
20+
python:
21+
patterns: ["*"]
22+
23+
# Frontend / tooling npm packages (package.json).
24+
- package-ecosystem: npm
25+
directory: "/"
26+
schedule:
27+
interval: weekly
28+
open-pull-requests-limit: 5
29+
groups:
30+
npm:
31+
patterns: ["*"]
32+
33+
# The pinned action SHAs used across .github/workflows.
34+
- package-ecosystem: github-actions
35+
directory: "/"
36+
schedule:
37+
interval: weekly
38+
open-pull-requests-limit: 5
39+
groups:
40+
actions:
41+
patterns: ["*"]
42+
43+
# The Docker base image in the Dockerfile.
44+
- package-ecosystem: docker
45+
directory: "/"
46+
schedule:
47+
interval: weekly
48+
open-pull-requests-limit: 5
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Pull Request Review Template
2+
3+
Use this shape as a copyable reference for substantive PR reviews; GitHub does
4+
not auto-apply this file to review comments. Omit sections that do not add
5+
useful signal. Lead with confirmed findings; keep speculative notes out of the
6+
public review unless they are framed as a concrete open question.
7+
8+
## Small PR Path
9+
10+
For narrow docs, typo, test-only, or obvious local fixes, a short review is
11+
enough:
12+
13+
```md
14+
LGTM after checking:
15+
- scope:
16+
- validation:
17+
- residual risk:
18+
```
19+
20+
Use the fuller structure below for larger, risky, multi-finding, or
21+
security-sensitive reviews.
22+
23+
## Findings
24+
25+
**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> issue (test): Short issue title**
26+
27+
- **Problem:** Concrete broken flow, contract, input, or risk.
28+
29+
- **Impact:** Why this matters to users, CI, maintainers, data, security, or scale.
30+
31+
- **Ask:** Smallest practical correction or decision the author should make.
32+
33+
- **Location:** `path:line`
34+
35+
## Open Questions
36+
37+
- **question (scope, non-blocking): Short author question** Ask the concrete
38+
intent, scope, or tradeoff question.
39+
40+
## Validation
41+
42+
- Ran:
43+
- Not run:
44+
- Residual risk:
45+
46+
## PR Hygiene
47+
48+
- Target/template/checks:
49+
- Related, duplicate, or superseding context:
50+
51+
## No Findings Variant
52+
53+
```md
54+
## Findings
55+
56+
none confirmed
57+
58+
## Validation
59+
60+
- Ran:
61+
- Not run:
62+
- Residual risk:
63+
```
64+
65+
## Legend
66+
67+
- **Findings:** Verified, author-actionable issues that should be fixed or
68+
consciously accepted before merge.
69+
- **Priority badges:** The shields.io badges below are optional formatting for
70+
priority labels. Plain `P0`, `P1`, `P2`, or `P3` text is also acceptable when
71+
an external image dependency is undesirable or may not render.
72+
- **P0:** `![P0 Badge](https://img.shields.io/badge/P0-red?style=flat)` -
73+
release-blocking or actively dangerous.
74+
- **P1:** `![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)` -
75+
serious bug, security risk, data-loss risk, or broken primary flow.
76+
- **P2:** `![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)` -
77+
meaningful correctness, test, maintainability, or edge-case issue.
78+
- **P3:** `![P3 Badge](https://img.shields.io/badge/P3-lightgrey?style=flat)` -
79+
minor polish or low-risk cleanup.
80+
- **Intent labels:**
81+
- **`issue`:** A confirmed defect, regression, broken contract, or concrete
82+
risk.
83+
- **`suggestion`:** A non-blocking improvement that would make the PR clearer,
84+
safer, or easier to maintain.
85+
- **`nit`:** A tiny, non-blocking cleanup or style note. Use it only when the
86+
author can safely ignore it without changing the review outcome.
87+
- **`question`:** A real author-facing clarification about intent, scope, or
88+
tradeoffs. Do not use questions to hide an issue that should be stated
89+
directly.
90+
- **`LGTM`:** "Looks good to me." Use only when the review found no blocking
91+
issues, or when any remaining notes are clearly optional.
92+
- **Decorations:** Optional labels in parentheses that clarify the finding type,
93+
scope, or merge impact.
94+
- **`security`:** Auth, authorization, ownership, secrets, SSRF, injection,
95+
unsafe external input, or other trust-boundary concerns.
96+
- **`test`:** Missing, failing, misleading, brittle, or insufficient tests.
97+
- **`scope`:** PR scope, feature boundaries, unrelated churn, or work that
98+
should be split into a separate issue or PR.
99+
- **`ci`:** CI configuration, workflow failures, flaky checks, or validation
100+
signal quality.
101+
- **`api`:** Route, request/response, public function, schema, persistence, or
102+
integration contract changes.
103+
- **`docs`:** User-facing docs, contributor docs, examples, or comments that
104+
need to change with the code.
105+
- **`non-blocking`:** Useful feedback that should not prevent merge by
106+
itself.
107+
- **Finding fields:**
108+
- **Problem:** What is wrong, what contract is ambiguous, or what risk the PR
109+
introduces.
110+
- **Impact:** Why the problem matters in practical terms.
111+
- **Ask:** The smallest concrete fix, test, or decision requested from the PR
112+
author.
113+
- **Location:** The most useful repo-relative file and line reference for the
114+
finding, using `path:line`.
115+
- **Optional sections:**
116+
- **Open Questions:** Genuine scope or intent questions; omit when there are
117+
no real questions.
118+
- **Validation:** What the reviewer ran, what was intentionally not run, and
119+
what risk remains after review.
120+
- **PR Hygiene:** Target-branch, template, CI/check, duplicate, related-work,
121+
or superseding-PR notes.
122+
- **`none confirmed`:** Use only when no review-worthy findings were confirmed;
123+
still list validation gaps or residual risk when relevant.

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
name: Python syntax (compileall)
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
22+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2323
with:
2424
persist-credentials: false
25-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
25+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2626
with:
2727
python-version: "3.11"
2828
# Byte-compile sources — catches syntax errors without installing deps.
@@ -32,10 +32,10 @@ jobs:
3232
name: JS syntax (node --check)
3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
35+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3636
with:
3737
persist-credentials: false
38-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
38+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3939
with:
4040
node-version: "20"
4141
# Syntax-check our own JS (skip vendored libs in static/lib).
@@ -54,7 +54,7 @@ jobs:
5454
# ROADMAP "fresh install smoke tests" item; make this required once green.
5555
continue-on-error: true
5656
steps:
57-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
57+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5858
with:
5959
fetch-depth: 0
6060
persist-credentials: false
@@ -81,7 +81,7 @@ jobs:
8181
echo "docs_only=false" >> "$GITHUB_OUTPUT"
8282
fi
8383
84-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
84+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8585
if: steps.docs-check.outputs.docs_only != 'true'
8686
with:
8787
python-version: "3.11"

.github/workflows/codeql.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# CodeQL code scanning
2+
#
3+
# Purpose: GitHub's own static analysis engine reads the application source
4+
# (Python backend + the JavaScript frontend) and looks for real
5+
# vulnerabilities -- SQL/command injection, path traversal, auth mistakes,
6+
# unsafe deserialization. Findings appear in the repo's Security tab. This is
7+
# the deepest check in the suite and the most valuable for a high-profile
8+
# target.
9+
#
10+
# It runs on every push to main and on a weekly schedule (to catch newly
11+
# disclosed query patterns against unchanged code). It deliberately does NOT
12+
# run on pull requests: most PRs here come from forks, whose read-only token
13+
# cannot publish results, which would produce confusing failures. To scan pull
14+
# requests too, a maintainer can instead enable CodeQL "default setup" in
15+
# Settings -> Security -> Code scanning (one toggle, no file needed) -- see
16+
# docs/security-ci.md.
17+
18+
name: CodeQL
19+
20+
on:
21+
push:
22+
branches: [main]
23+
schedule:
24+
# Weekly, Monday 06:00 UTC.
25+
- cron: '0 6 * * 1'
26+
workflow_dispatch:
27+
28+
permissions: {}
29+
30+
concurrency:
31+
group: codeql-${{ github.workflow }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
jobs:
35+
analyze:
36+
name: Analyze (${{ matrix.language }})
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
40+
security-events: write # publish results to the Security tab
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
# Both are interpreted, so CodeQL needs no build step (build-mode none).
45+
language: [python, javascript-typescript]
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
49+
with:
50+
persist-credentials: false
51+
52+
- name: Initialize CodeQL
53+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
54+
with:
55+
languages: ${{ matrix.language }}
56+
build-mode: none
57+
58+
- name: Perform CodeQL analysis
59+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
60+
with:
61+
category: "/language:${{ matrix.language }}"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Container security: Dockerfile lint
2+
#
3+
# Purpose: the Docker image is how most people run Odysseus, so it is part of
4+
# the attack surface. hadolint lints the Dockerfile for mistakes and insecure
5+
# patterns (running as root longer than needed, unpinned base image, bad apt
6+
# usage). Blocking.
7+
#
8+
# The image vulnerability scan (Trivy, advisory) lives in its own file,
9+
# container-trivy.yml. Keeping it separate lets that advisory scan be
10+
# path-filtered and held to a read-only token on pull requests without
11+
# weakening this blocking gate, which must always report so a required check
12+
# never hangs.
13+
#
14+
# Note: a separate open PR (#120) proposes a local `scripts/scan_image.py`.
15+
# This job is complementary -- it is a CI gate, not a script a contributor has
16+
# to remember to run.
17+
18+
name: Container scan
19+
20+
on:
21+
pull_request:
22+
push:
23+
branches: [main]
24+
workflow_dispatch:
25+
26+
permissions: {}
27+
28+
concurrency:
29+
group: container-scan-${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: true
31+
32+
jobs:
33+
hadolint:
34+
name: hadolint (Dockerfile lint)
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
41+
with:
42+
persist-credentials: false
43+
44+
- name: Lint Dockerfile
45+
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
46+
with:
47+
dockerfile: Dockerfile
48+
# DL3008: pinning apt package versions is impractical on a -slim base
49+
# image. Debian purges old package versions from its repos, so a
50+
# pinned version breaks future rebuilds. The base image itself is
51+
# what should be pinned (tracked by Dependabot's docker ecosystem).
52+
ignore: DL3008

0 commit comments

Comments
 (0)