-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
47 lines (42 loc) · 2.29 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2022 Datadog, Inc.
**/
declare module 'datadog-iast-taint-tracking' {
export interface NativeInputInfo {
parameterName: string;
parameterValue: string;
type: string;
readonly ref?: string;
}
export interface NativeTaintedRange {
start: number;
end: number;
iinfo: NativeInputInfo;
secureMarks: number;
readonly ref?: string;
}
export interface Metrics {
requestCount: number;
}
export interface TaintedUtils {
createTransaction(transactionId: string): string;
newTaintedString(transactionId: string, original: string, paramName: string, type: string): string;
newTaintedObject(transactionId: string, original: any, paramName: string, type: string): any;
addSecureMarksToTaintedString(transactionId: string, taintedString: string, secureMarks: number): string;
isTainted(transactionId: string, ...args: string[]): boolean;
getMetrics(transactionId: string, telemetryVerbosity: number): Metrics;
getRanges(transactionId: string, original: string): NativeTaintedRange[];
removeTransaction(transactionId: string): void;
setMaxTransactions(maxTransactions: number): void;
concat(transactionId: string, result: string, op1: string, op2: string): string;
trim(transactionId: string, result: string, thisArg: string): string;
trimEnd(transactionId: string, result: string, thisArg: string): string;
slice(transactionId: string, result: string, original: string, start: number, end: number): string;
substring(transactionId: string, subject: string, result: string, start: number, end: number): string;
substr(transactionId: string, subject: string, result: string, start: number, length: number): string;
replace(transactionId: string, result: string, thisArg: string, matcher: unknown, replacer: unknown): string;
stringCase(transactionId: string, result: string, thisArg: string): string;
arrayJoin(transactionId: string, result: string, thisArg: any[], separator?: any): string;
}
}