mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-05-31 20:51:40 +02:00
d67c07dc55
- Add `pipeline` config section with `retry_preset` and `max_concurrent_pipelines` options - Add `subscription` retry preset with extended 6h max interval for Anthropic rate limit windows - Replace Promise.allSettled with concurrency-limited runner for vuln/exploit pipelines - Wire pipeline config through client, shared types, and workflow activity proxy selection
69 lines
1.3 KiB
TypeScript
69 lines
1.3 KiB
TypeScript
// Copyright (C) 2025 Keygraph, Inc.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License version 3
|
|
// as published by the Free Software Foundation.
|
|
|
|
/**
|
|
* Configuration type definitions
|
|
*/
|
|
|
|
export type RuleType =
|
|
| 'path'
|
|
| 'subdomain'
|
|
| 'domain'
|
|
| 'method'
|
|
| 'header'
|
|
| 'parameter';
|
|
|
|
export interface Rule {
|
|
description: string;
|
|
type: RuleType;
|
|
url_path: string;
|
|
}
|
|
|
|
export interface Rules {
|
|
avoid?: Rule[];
|
|
focus?: Rule[];
|
|
}
|
|
|
|
export type LoginType = 'form' | 'sso' | 'api' | 'basic';
|
|
|
|
export interface SuccessCondition {
|
|
type: 'url' | 'cookie' | 'element' | 'redirect';
|
|
value: string;
|
|
}
|
|
|
|
export interface Credentials {
|
|
username: string;
|
|
password: string;
|
|
totp_secret?: string;
|
|
}
|
|
|
|
export interface Authentication {
|
|
login_type: LoginType;
|
|
login_url: string;
|
|
credentials: Credentials;
|
|
login_flow: string[];
|
|
success_condition: SuccessCondition;
|
|
}
|
|
|
|
export interface Config {
|
|
rules?: Rules;
|
|
authentication?: Authentication;
|
|
pipeline?: PipelineConfig;
|
|
}
|
|
|
|
export type RetryPreset = 'default' | 'subscription';
|
|
|
|
export interface PipelineConfig {
|
|
retry_preset?: RetryPreset;
|
|
max_concurrent_pipelines?: number;
|
|
}
|
|
|
|
export interface DistributedConfig {
|
|
avoid: Rule[];
|
|
focus: Rule[];
|
|
authentication: Authentication | null;
|
|
}
|