-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for all GET endpoints in the Vanta API, with configurable tool list #28
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
Conversation
Add final GET endpoint for Tests
- Add new discovered-vendors.ts module with tools for listing and managing discovered vendor integrations - Update eval system to include discovered vendors operations in test suite - Update README.md with documentation for discovered vendor endpoints - Register discovered vendor tools in main index.ts
- Add new vulnerabilities.ts module with tools for listing and managing vulnerabilities - Add new vulnerability-remediations.ts module with tools for listing and managing vulnerability remediations - Add new vulnerable-assets.ts module with tools for listing and managing vulnerable assets - Update eval system to include vulnerabilities operations in test suite - Update README.md with documentation for vulnerabilities endpoints - Register vulnerabilities tools in main index.ts
- Add new monitored-computers.ts module with tools for listing and managing monitored computers - Add new vendor-risk-attributes.ts module with tools for listing and managing vendor risk attributes - Update eval system to include monitored computers and vendor risk attributes operations in test suite - Update README.md with documentation for monitored computers and vendor risk attributes endpoints - Register monitored computers and vendor risk attributes tools in main index.ts
- Add new trust-centers.ts module with tools for listing and managing trust centers - Update eval system to include trust centers operations in test suite - Update README.md with documentation for trust centers endpoints - Register trust centers tools in main index.ts
- get_* -> list_* for endpoints that return a list of items - get_* -> get_* for endpoints that return a single item
- Create reusable utility functions for common API patterns - Standardize schema creation with createIdSchema and createIdWithPaginationSchema helpers - Consolidate pagination and authentication logic - Add comprehensive documentation for all new endpoints - Update README with complete tool reference tables
src/operations/common/utils.ts
Outdated
| return fetch(url, { | ||
| ...options, | ||
| headers: { | ||
| ...headers, | ||
| ...options.headers, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Prefer to use RequestFetcher's fetch function (#server-common/utils/requestFetcher.ts) instead of another library's fetch function. This is because RequestFetcher's fetch function has some built-in SSRF prevention mechanisms that other third-party fetch functions do not.
To resolve this comment:
✨ Commit Assistant Fix Suggestion
- Import
RequestFetcherfrom#server-common/utils/requestFetcher. - Create an instance of
RequestFetcherbefore making your HTTP request. For example:const fetcher = new RequestFetcher(); - Replace the direct
fetch(url, ...)call withfetcher.fetch(url, ...)and use the same parameters. - Do the same for any retry/follow-up requests in this function.
- Destroy the
RequestFetcherinstance after you are finished, usingfetcher.destroy();.
Using RequestFetcher helps protect against SSRF vulnerabilities by enforcing additional security checks.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by use-request-fetcher.
You can view more details about this finding in the Semgrep AppSec Platform.
src/operations/common/utils.ts
Outdated
| const response = await fetch(url, { | ||
| ...options, | ||
| headers: { | ||
| ...headers, | ||
| ...options.headers, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Prefer to use RequestFetcher's fetch function (#server-common/utils/requestFetcher.ts) instead of another library's fetch function. This is because RequestFetcher's fetch function has some built-in SSRF prevention mechanisms that other third-party fetch functions do not.
To resolve this comment:
✨ Commit Assistant Fix Suggestion
- Remove any usage of the
fetchfunction (or any other third-party HTTP request libraries) in this module. - Import the
RequestFetcherutility from#server-common/utils/requestFetcher.tsif it's not already imported:import { RequestFetcher } from "#server-common/utils/requestFetcher";. - Create an instance of
RequestFetcherat the top of the file or where appropriate:const fetcher = new RequestFetcher(); - Replace your calls to
fetch(url, { ... })withfetcher.fetch(url, { ... }), preserving the same parameters and options. - If
fetcher.fetchexpects parameters in a different shape than the standard fetch API, update the options accordingly to matchRequestFetcher's interface.
Alternatively, if you need to handle JSON responses and RequestFetcher provides a fetchJSON method, use fetcher.fetchJSON(url, {}, options) instead.
RequestFetcher automatically includes protections to help prevent Server-Side Request Forgery (SSRF) attacks.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by use-request-fetcher.
You can view more details about this finding in the Semgrep AppSec Platform.
Pull Request Summary: Complete GET Endpoint Coverage & Operations Structure Reorganization🎯 OverviewThis PR delivers complete GET endpoint coverage for the Vanta MCP Server, implementing comprehensive access to all major Vanta API resources, along with a systematic reorganization of the operations structure for enhanced maintainability and developer experience. 📊 Scale of ImplementationMassive Expansion of Operations Coverage
New Operations Files Created
Enhanced Existing Operations
🏗️ Major Technical Achievements1. Complete API Coverage Implementation
2. DRY Architecture Refactoring
3. RESTful Naming Convention
4. Automated Tool Registry System
5. Operations Structure Reorganization
📁 Before & After StructureBefore - Limited Coverage:After - Complete Coverage & Clean Organization:🚀 Key Features ImplementedAdvanced Document Management
📚 Documentation & QualityComprehensive Documentation Updates
Code Quality Improvements
📊 Impact MetricsBefore Implementation:
After Implementation:
✅ Validation & Testing
🎯 Business ValueThis implementation transforms the Vanta MCP Server from a basic proof-of-concept into a production-ready, comprehensive API wrapper that provides AI assistants with complete access to Vanta's compliance and security management platform. The clean architecture and extensive coverage enable sophisticated compliance automation and security management workflows. |
|
Tool consolidation performed using a systematic approach to consolidate related tools while preserving functionality and improving usability: Consolidation ExamplesDocument Operations (5→3 tools): // Before: 5 separate tools
list_document_controls, list_document_links, list_document_uploads, documents, download_document_file
// After: 3 consolidated tools
documents (main listing + get by ID)
document_resources (consolidates 3 resource types with routing)
download_document_file (kept separate - file operations)Integration Operations (5→2 tools): // Before: 5 separate tools
integrations, list_integration_resource_kinds, get_integration_resource_kind_details,
list_integration_resources, get_integration_resource
// After: 2 consolidated tools
integrations (main listing + get by ID)
integration_resources (consolidates 4 operations with operation parameter)Vendor Operations (6→4 tools): // Before: 6 separate tools
vendors, list_vendor_documents, list_vendor_findings, list_vendor_security_reviews,
get_vendor_security_review, list_vendor_security_review_documents
// After: 4 consolidated tools
vendors (main listing + get by ID)
vendor_compliance (consolidates 3 compliance types)
get_vendor_security_review (kept separate - specific operation)
list_vendor_security_review_documents (kept separate - document operation)Discovery Operations (4→1 tool): // Before: 4 separate tools
list_discovered_vendors, list_discovered_vendor_accounts,
list_vendor_risk_attributes, list_vulnerability_remediations
// After: 1 consolidated tool
compliance_discovery (consolidates all discovery types) |
Summary
Tool Allowlist
Testing
|
Adds functionality for all GET endpoints currently in the Vanta API. Ensures that documentation is updated and evaluation cases are provided.