Skip to content

Commit

Permalink
Merge pull request #44 from AikidoSec/patch-comments
Browse files Browse the repository at this point in the history
Remove some comments
  • Loading branch information
hansott authored Feb 27, 2024
2 parents 9de3ded + cf252f1 commit ef9a1eb
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 138 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ lambda-mongodb-nosql-injection:
lambda-mongodb-safe:
cd sample-apps/lambda-mongodb && npx serverless invoke local --function login --path payloads/safe-request.json

.PHONY: docs
docs:
npx typedoc

.PHONY: install
install:
npm install --workspaces
Expand Down
22 changes: 17 additions & 5 deletions benchmarks/sql-injection/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Runs benchmarks for the detection of SQL Injections
* @module
*/
const fs = require("fs");
const path = require("path");
Expand All @@ -23,6 +22,7 @@ function main() {
);
}
}

main();

function runBenchmark(sql, input) {
Expand Down Expand Up @@ -55,19 +55,31 @@ function getAvgBenchmark() {
*/
function fetchSqlStatements() {
const auth_bypass_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/Auth_Bypass.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/Auth_Bypass.txt"
),
"utf-8"
);
const postgres_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/postgres.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/postgres.txt"
),
"utf-8"
);
const mysql_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/mysql.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/mysql.txt"
),
"utf-8"
);
const mssql_and_db2_txt = fs.readFileSync(
path.join(__dirname, "./../../library/testing/sql-injection-payloads/mssql_and_db2.txt"),
path.join(
__dirname,
"./../../library/testing/sql-injection-payloads/mssql_and_db2.txt"
),
"utf-8"
);

Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/AgentSingleton.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* This module contains a variable instance, and methods to get and set the current agent
* @module agent/AgentSingleton
*/

import { Agent } from "./Agent";

let instance: Agent | undefined = undefined;
Expand Down
6 changes: 0 additions & 6 deletions library/src/agent/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* Exports 2 classes related to logging
* + Type definition Logger
* @module agent/Logger
*/

export interface Logger {
log(message: string): void;
}
Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/Source.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Exports type def Source but mainly the function {@link friendlyName}
* @module agent/Source
*/

export type Source = "query" | "body" | "headers" | "cookies";

/**
Expand Down
5 changes: 0 additions & 5 deletions library/src/agent/Wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Type definitions
* @module agent/Wrapper
*/

export interface Wrapper {
wrap(): void;
}
5 changes: 0 additions & 5 deletions library/src/helpers/getOptions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* This module contains the default options and the function {@link getOptions}
* @module helpers/getOptions
*/

/**
* It gets the options for an Agent
* @param partialOptions Your own values which will overwrite the default options
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/getPackageVersion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The getPackageVersion module exports only one function : {@link getPackageVersion}
* @module helpers/getPackageVersion
*/

/**
* Get the installed version of a package
* @param pkg A package name
Expand Down
1 change: 0 additions & 1 deletion library/src/helpers/isPlainObject.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Grabbed from https://github.com/jonschlinkert/is-plain-object
* @module helpers/isPlainObject
*/

function isObject(o: unknown) {
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/satisfiesVersion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The satisfiesVersion module exports only one function with the same name : satisfiesVersion
* @module helpers/satisfiesVersion
*/

/**
* This function checks if a certain version satisfies a version range.
* @param range A range of versions written in semver
Expand Down
5 changes: 0 additions & 5 deletions library/src/helpers/tryDecodeAsJWT.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* The JWT module only exports one function : tryDecodeAsJWT
* @module helpers/JWT
*/

/**
* This function tries to decode your input as if it is a JSON Web Token, if it fails to do so it returns {jwt: false}.
* @param jwt A (possible) JWT
Expand Down
80 changes: 2 additions & 78 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"devDependencies": {
"prettier": "^3.2.4",
"typedoc": "^0.25.8"
"prettier": "^3.2.4"
},
"workspaces": [
"sample-apps/*",
Expand Down
7 changes: 0 additions & 7 deletions typedoc.json

This file was deleted.

0 comments on commit ef9a1eb

Please sign in to comment.