Merge branch 'main' into feature/access-token-detector
This commit is contained in:
commit
a2b7d44ec0
5 changed files with 135 additions and 28 deletions
|
|
@ -5,6 +5,7 @@ import type { Request, Response } from "caido:utils";
|
|||
import { CsrfCheck } from "./controller/csrfCheck";
|
||||
import { PKCECheck } from "./controller/PKCECheck";
|
||||
import { AccessTokenLeakController } from "./controller/accessTokenDetector";
|
||||
import { ScopeDetection } from "./controller/scopeDetection";
|
||||
|
||||
export type API = DefineAPI<{}>;
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ const csrfCheck = new CsrfCheck();
|
|||
// const authZCodeGrantController = new AuthZCodeGrantController();
|
||||
const pkceCheckController = new PKCECheck();
|
||||
const tokenCheck = new AccessTokenLeakController();
|
||||
const ScopeDetectionController = new ScopeDetection();
|
||||
|
||||
export function init(sdk: SDK<API>) {
|
||||
// sdk.events.onInterceptRequest(async (sdk, req: Request) => {
|
||||
|
|
@ -34,6 +36,7 @@ export function init(sdk: SDK<API>) {
|
|||
await pkceCheckController.test(sdk, req);
|
||||
await tokenCheck.testReq(sdk, req);
|
||||
await tokenCheck.testResp(sdk, resp, req);
|
||||
await ScopeDetectionController.scan(sdk, req.getUrl());
|
||||
// sdk.events.onInterceptRequest(async (sdk, req: Request) => {
|
||||
// const result =
|
||||
// authZCodeGrantController.testReq(req) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue