Repository navigation
M7 trust boundary - #1
Merged
Merged
Conversation
Copyright (c) 2026 5aranx, matching the license and author declared in pyproject.toml.
Operator authorization (T1, T3) - Read operator tokens from SHADOWGATE_API_TOKENS_JSON, with the legacy SHADOWGATE_API_TOKENS name as a fallback. - Refuse to start on malformed token configuration. An empty token map is allowed only with SHADOWGATE_INSECURE_DEV=true. - Build the app with the create_app factory (uvicorn --factory); importing the module no longer creates files. - Require a viewer/operator/admin role on every route except /healthz, /, /enroll and the agent routes. Accept Bearer or HTTP Basic (token as password); /ui sends a Basic challenge. API docs are off outside dev mode. Agent identity and job ownership (T2) - /enroll is authorized by the one-time enrollment token alone. Tokens can be bound to an agent id. A per-agent token is returned once and stored only as a SHA-256 hash. Enrollment runs in one transaction on a dedicated connection. Re-enrolling an existing agent returns 409 and the token is not burned. Pre-existing agents with no credential can be reclaimed once, with a token bound to their id; stored tags are preserved. - /agent/poll and /agent/result authenticate with X-ShadowGate-Agent-Token and take the agent id from the credential. Results are accepted only from the job's owner while it is running. An identical retry returns "duplicate"; a conflicting one 409; an unknown or foreign job 404. - The Poller sends the credential, keeps undelivered results and retries them, and stops on 401/403. Launcher and tests - run.sh uses its development tokens only when no token variable is set in the shell (case-insensitive) and .env defines none. --check exports no tokens. The redundant SHADOWGATE_DATA_DIR export is removed. - Tests are isolated from the caller's SHADOWGATE_* variables and .env, so ./run.sh --check passes. tests/test_env_precedence.py pins the settings and launcher precedence. - 77 tests pass (17 before); ruff and mypy --strict are clean. Docs - README, architecture and threat model describe only verified behavior and list the known limitations.
The assessment is the pre-M7 snapshot (findings S1-S8, C1-C9). The tracker holds the backlog, the M7 plan, implementation and verification records, the release-readiness review, and the known limitations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.