|
67 | 67 |
|
68 | 68 | 1. **Finding Existing Secret Incidents**: |
69 | 69 | - Detect secrets already identified as GitGuardian incidents in your repository |
70 | | - - Use `list_repo_incidents` to view all secret incidents in a repository |
| 70 | + - Use `list_repo_incidents` to view secret incidents in a repository (defaults to first page) |
71 | 71 | - Filter incidents by various criteria including those assigned to you |
| 72 | + - Pass get_all=True when you need comprehensive results |
72 | 73 |
|
73 | 74 | 2. **Proactive Secret Scanning**: |
74 | 75 | - Use `scan_secrets` to detect secrets in code before they're committed |
|
77 | 78 |
|
78 | 79 | 3. **Complete Secret Remediation**: |
79 | 80 | - Use `remediate_secret_incidents` for guided secret removal |
| 81 | + - By default fetches the first page of results for token efficiency; pass get_all=True for comprehensive results |
80 | 82 | - Get best practice recommendations for different types of secrets |
81 | 83 | - Replace hardcoded secrets with environment variables |
82 | 84 | - Create .env.example files with placeholders for detected secrets |
|
97 | 99 | mcp.add_tool(remediate_secret_incidents, |
98 | 100 | description="Find and fix secrets in the current repository using exact match locations (file paths, line numbers, character indices). " |
99 | 101 | "This tool leverages the occurrences API to provide precise remediation instructions without needing to search for secrets in files. " |
100 | | - "By default, this only shows incidents assigned to the current user. Pass mine=False to get all incidents related to this repo.", |
| 102 | + "By default, only shows incidents assigned to the current user and fetches the first page of results for token efficiency. " |
| 103 | + "Pass mine=False to get all incidents. Pass get_all=True for comprehensive results when explicitly requested.", |
101 | 104 | required_scopes=["incidents:read", "sources:read"], |
102 | 105 | ) |
103 | 106 |
|
|
114 | 117 | ) |
115 | 118 |
|
116 | 119 | mcp.add_tool(list_repo_incidents, |
117 | | - description="List secret incidents or occurrences related to a specific repository, and assigned to the current user." |
118 | | - "By default, this tool only shows incidents assigned to the current user. " |
119 | | - "Only pass mine=False to get all incidents related to this repo if the user explicitly asks for all incidents even the ones not assigned to him.", |
| 120 | + description="List secret incidents or occurrences related to a specific repository. " |
| 121 | + "By default, only shows incidents assigned to the current user and fetches the first page of results for token efficiency. " |
| 122 | + "Pass mine=False to get all incidents (even ones not assigned to you). Pass get_all=True for comprehensive results when explicitly requested.", |
120 | 123 | required_scopes=["incidents:read", "sources:read"], |
121 | 124 | ) |
122 | 125 |
|
|
125 | 128 | list_repo_occurrences, |
126 | 129 | description="List secret occurrences for a specific repository with exact match locations. " |
127 | 130 | "Returns detailed occurrence data including file paths, line numbers, and character indices where secrets were detected. " |
| 131 | + "By default fetches the first page of results for token efficiency; pass get_all=True for comprehensive results. " |
128 | 132 | "Use this tool when you need to locate and remediate secrets in the codebase with precise file locations.", |
129 | 133 | required_scopes=["incidents:read"], |
130 | 134 | ) |
|
0 commit comments