-
Notifications
You must be signed in to change notification settings - Fork 528
Mcp vuln #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Mcp vuln #364
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
521e6f9
MCP vuln
piyushroshan d1278cd
Spotless
piyushroshan afb6643
Add auth to mcp
piyushroshan 14f60fc
Blog search
piyushroshan 9b00556
Post content
piyushroshan 21cba90
FIx post
piyushroshan 75376a1
Web changes
piyushroshan 8e2c484
Add setuptools
piyushroshan 05062fc
Setuptools
piyushroshan cb4ab2b
Fix tests
piyushroshan fea8cd9
Update tools
piyushroshan ea83854
Update tools
piyushroshan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ .Values.chatbot.service.name }}-mcp | ||
| labels: | ||
| release: {{ .Release.Name }} | ||
| {{- with .Values.chatbot.service.labels }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| ports: | ||
| - name: mcp | ||
| port: {{ .Values.chatbot.mcpPort }} | ||
| nodePort: {{ .Values.chatbot.service.mcpNodePort }} | ||
| protocol: TCP | ||
| selector: | ||
| {{- toYaml .Values.chatbot.serviceSelectorLabels | nindent 4 }} | ||
| sessionAffinity: None | ||
| type: LoadBalancer |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: crapi-chatbot-mcp | ||
| labels: | ||
| app: crapi-chatbot | ||
| spec: | ||
| ports: | ||
| - name: mcp | ||
| port: 5500 | ||
| nodePort: 30500 | ||
| protocol: TCP | ||
| selector: | ||
| app: crapi-chatbot | ||
| sessionAffinity: None | ||
| type: LoadBalancer |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ metadata: | |
| spec: | ||
| ports: | ||
| - port: 5002 | ||
| name: go | ||
| name: chatbot | ||
| - port: 5500 | ||
| name: mcp | ||
| selector: | ||
| app: crapi-chatbot | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Copilot Autofix
AI 6 days ago
General approach: avoid logging values that are directly derived from secret environment variables, even as booleans, or at least avoid logging them in a way that explicitly reveals per-secret presence. We should still preserve useful diagnostics but base them on non-sensitive or more generic information.
Best concrete fix here:
has_access_key,has_secret_key, andhas_session_tokenbooleans, since they are directly derived from secret env vars.regionand whether the code will fall back to instance profile/IRSA.credential_source = "env"vs"instance_profile") that doesn’t expose per-secret presence, but for minimal impact we can just keep thewill_use_instance_profileflag.Implementation details in
services/chatbot/src/chatbot/aws_credentials.py:_get_base_session, keep the local variableshas_access_key,has_secret_key, andhas_session_token(since they’re used to decidewill_use_instance_profile), but change thelogger.infocall on lines 45–53 so it no longer logs these three flags.regionandwill_use_instance_profile(derived from the existing expressionnot (has_access_key and has_secret_key)), which does not come directly from a single secret env var.No new methods or imports are required; this is a straightforward change to the logging statement.