feat(security): code hardening pass (log hygiene, JWT/OIDC, image digests, dep CVEs, CodeQL/pip-audit/gitleaks)#26
Merged
Conversation
…nning, dep CVEs, deeper CI Actionable in-code items from the post-public security review: - M1: route audit + auth-failure logs to stderr so they never corrupt the stdio MCP JSON-RPC stream (HTTP/Lambda still reach the log aggregator). - L1: require the `exp` claim on inbound JWTs — reject non-expiring tokens. - L2: enforce https for OIDC issuer/JWKS/hosted-UI (http only for localhost), closing a JWKS-MITM key-swap vector. - M2: pin Docker base images to immutable digests (generic + Lambda). - L4: scope the Lambda KMS Decrypt grant to this account+region's keys. - L3: document the no-built-in-rate-limit residual risk in deployment docs. - I1/I3: add CodeQL (security-extended) and pip-audit; run the license-free gitleaks CLI in CI, pinned + checksum-verified. pip-audit surfaced two known CVEs, now fixed in the lock: starlette 0.52.1 -> 1.2.1 (PYSEC-2026-161, runtime) pytest 8.4.2 -> 9.0.3 (CVE-2025-71176, dev) All actions SHA-pinned. 73 tests pass; ruff/format/pyright clean; terraform fmt clean; gitleaks + pip-audit clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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.
Summary
Actionable in-code/infra/CI items from the post-public security review. The repo was already strongly hardened; operational items (key rotation, branch protection) are tracked separately and not in this PR.
Changes
Auth & logging
exp; reject non-expiring tokens. [L1]Infra
Docs
CI
security-extended). [I1]v8.30.1+ checksum-verified (the action requires a license for org repos; the binary doesn't). Corrected the outdated comment. [I3]Dependency CVEs (surfaced by the new pip-audit, fixed in
uv.lock)starlette 0.52.1 → 1.2.1(PYSEC-2026-161, runtime)pytest 8.4.2 → 9.0.3(CVE-2025-71176, dev)Verification
ruff/ruff format/pyrightcleanterraform fmtclean;gitleaksscan clean (20 commits, no leaks);pip-auditreports no known vulnerabilitiesNot in this PR (manual / operator)
ANTHROPIC_API_KEY+ WorkOS keymain🤖 Generated with Claude Code