chore: remove unused scan tools and dead error type (#327)

* chore: remove unused scan tools and dead error type

* chore(logs): redact base URL and target URL from preflight info logs
This commit is contained in:
ezl-keygraph
2026-05-04 21:51:45 +05:30
committed by GitHub
parent 95998d1a44
commit 46be49c175
11 changed files with 19 additions and 99 deletions
+2 -2
View File
@@ -270,7 +270,7 @@ async function validateCredentials(logger: ActivityLogger, apiKey?: string, prov
// 1. Custom base URL — validate endpoint is reachable via SDK query
if (process.env.ANTHROPIC_BASE_URL && process.env.ANTHROPIC_AUTH_TOKEN) {
const baseUrl = process.env.ANTHROPIC_BASE_URL;
logger.info(`Validating custom base URL: ${baseUrl}`);
logger.info('Validating custom base URL');
try {
for await (const message of query({ prompt: 'hi', options: { model: resolveModel('small'), maxTurns: 1 } })) {
@@ -454,7 +454,7 @@ function httpHead(url: string, timeoutMs: number): Promise<number> {
/** Check that the target URL is reachable from inside the container. */
async function validateTargetUrl(targetUrl: string, logger: ActivityLogger): Promise<Result<void, PentestError>> {
logger.info('Checking target URL reachability...', { targetUrl });
logger.info('Checking target URL reachability...');
// 1. Parse URL
let parsed: URL;
+2 -10
View File
@@ -11,7 +11,7 @@
/**
* Specific error codes for reliable classification.
*
* ErrorCode provides precision within the coarse 8-category PentestErrorType.
* ErrorCode provides precision within the coarse 7-category PentestErrorType.
* Used by classifyErrorForTemporal for code-based classification (preferred)
* with string matching as fallback for external errors.
*/
@@ -47,15 +47,7 @@ export enum ErrorCode {
BILLING_ERROR = 'BILLING_ERROR',
}
export type PentestErrorType =
| 'config'
| 'network'
| 'tool'
| 'prompt'
| 'filesystem'
| 'validation'
| 'billing'
| 'unknown';
export type PentestErrorType = 'config' | 'network' | 'prompt' | 'filesystem' | 'validation' | 'billing' | 'unknown';
export interface PentestErrorContext {
[key: string]: unknown;