feat: find credentials in args and headers#98
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
+ Coverage 77.67% 79.01% +1.33%
==========================================
Files 19 19
Lines 2101 2354 +253
Branches 231 250 +19
==========================================
+ Hits 1632 1860 +228
- Misses 463 488 +25
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
User description
Description
Types of changes
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Checklist:
PR Type
Enhancement
Description
Expand credential detection to command arguments and HTTP headers
Add variable substitution safety detection for patterns like
${input:token}Implement source-specific visual indicators with icons
Enhance credential warning display with grouped source information
Diagram Walkthrough
File Walkthrough
credential-detection-integration.test.ts
Add comprehensive integration tests for multi-source credentialdetectiontests/credential-detection-integration.test.ts
--api-keyTOKEN)substitution handling
credential-detection-service.test.ts
Add extensive unit tests for new credential detection methodstests/credential-detection-service.test.ts
analyzeArgumentsmethod with various flagpatterns
analyzeHeadersmethod with authorization and API keyheaders
analyzeServerConfigmethod combining all sourcescredential-warning.ts
Enhance credential warning with source-grouped display and iconssrc/components/credential-warning.ts
getSourceIconhelper function for visual indicatorscredential-detection-service.ts
Implement multi-source credential detection with variable substitutionsafetysrc/services/credential-detection-service.ts
ARGUMENT_PATTERNSandHEADER_PATTERNSfor detecting credentials inargs/headers
isVariableSubstitutionmethod to detect safe patterns like${input:token}analyzeArgumentsmethod for command-line credential detectionanalyzeHeadersmethod for HTTP header credential detectionanalyzeServerConfigmethod for comprehensive multi-source analysisanalyzeEnvironmentVariablesto skip variable substitutionpatterns
sourcefield toCredentialVariableinterfacemcp-config-service.ts
Integrate multi-source credential analysis in config servicesrc/services/mcp-config-service.ts
headersfield to server info extractionanalyzeServerConfigmethod
mcp-config-service.types.ts
Add headers support and source tracking to type definitionssrc/types/mcp-config-service.types.ts
headersfield toMCPServerConfigandMCPServerInfointerfacessourcefield toCredentialVariableinterface with'env'|'args'|'headers' types
credential-detection.md
Update documentation for enhanced multi-source credential detectiondocs/credential-detection.md