chore: repo rename path fix + gitignore jwk/jwt#4
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates demo documentation and the LangChain agent to reflect new product branding and a new langchain-capiscio-based integration, plus a small security hardening for accidental credential/key commits.
Changes:
- Rebrand docs to “MCP Guard” / “Agent Guard” naming across READMEs.
- Refactor
agents/langchain-agent/main.pyto uselangchain_capiscioguard + callback handler and adjust middleware wiring. - Add
*.jwkand*.jwtpatterns to.gitignore.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
mcp-demo/README.md |
Renames demo heading to “MCP Guard Demo”. |
agents/langchain-agent/requirements.txt |
Updates CapiscIO-related dependency notes (but currently missing the new package as an actual dependency). |
agents/langchain-agent/main.py |
Rewrites LangChain agent to use langchain_capiscio guard/callbacks and adjusts FastAPI middleware + lifecycle. |
README.md |
Updates top-level branding/section names and architecture diagram labels. |
.gitignore |
Ignores JWK/JWT artifacts to reduce accidental secret commits. |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+240
to
247
| if CAPISCIO_AVAILABLE and CapiscioMiddleware and guard: | ||
| security_config = SecurityConfig.from_env() | ||
| logger.info(f"Security config: fail_mode={security_config.fail_mode}, " | ||
| f"require_signatures={security_config.downstream.require_signatures}") | ||
|
|
||
| # Create guard for middleware (dev_mode auto-generates keys when no agent-card.json) | ||
| _guard = SimpleGuard( | ||
| dev_mode=(SECURITY_MODE == "dev"), | ||
| base_dir=os.path.dirname(os.path.abspath(__file__)), | ||
| ) | ||
| app.add_middleware( | ||
| CapiscioMiddleware, | ||
| guard=_guard, | ||
| guard=lambda: _resolved_simple_guard, | ||
| config=security_config, | ||
| exclude_paths=["/.well-known/agent.json", "/health"], | ||
| ) |
Comment on lines
+98
to
+106
| guard: Optional["CapiscioGuard"] = ( | ||
| CapiscioGuard( | ||
| mode="log", | ||
| connect_kwargs={ | ||
| "dev_mode": SECURITY_MODE == "dev", | ||
| "keys_dir": KEYS_DIR, | ||
| "agent_card": AGENT_CARD, | ||
| }, | ||
| ) |
2da5b30 to
a045223
Compare
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
Post-rebase cleanup — the langchain rewrite and product branding were already merged via PRs #2 and #3. This PR carries only the remaining changes:
requirements.txtaftercapiscio-langchain→langchain-capisciorename*.jwkand*.jwtto.gitignoreto prevent key/token leaksChanges
.gitignore*.jwk,*.jwtpatternsagents/langchain-agent/requirements.txt