Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@nextlua/khaos.js
Advanced tools
Javascript SDK for Khaos.
npm install --save khaosjs
or yarn add khaosjs
import Khaos from "khaosjs";
Khaos.init({
apiKey: "your-api-key",
networkOptions: {
baseApiUrl: "https://api.yourapp.com",
bodyKeysToRecord: ["isSucceed", "data", "message"],
headerKeysToRecord: [],
headersToRedact: [],
urlBlocklist: [],
tracingOrigins: [],
},
showButton: true,
appInfo: {},
});
<script>
tag<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
This is an example of a vanilla JS app.
<script src="dist/index.js"></script>
<script>
Khaos.default.init({
apiKey: "your-api-key",
networkOptions: {
baseApiUrl: "https://api.yourapp.com",
bodyKeysToRecord: ["isSucceed", "data", "message"],
headerKeysToRecord: [],
headersToRedact: [],
urlBlocklist: [],
tracingOrigins: [],
},
showButton: true,
appInfo: {},
});
</script>
</body>
</html>
Khaos.init(options: KhaosInitOptions): void
options
apiKey
: string
: (Required) API key provided in Khaos Dashboard.appInfo
: KhaosAppInfo
(Optional)
buildVersion
: string
: (Optional)appVersion
: string
: (Optional)appVersionBuild
: string
: (Optional)appName
: string
: (Optional)appNameId
: string
: (Optional)appLanguage
: string
: (Optional)bundleId
: string
: (Optional)networkOptions
: KhaosNetworkOptions
: (Optional) options for network monitoring.
baseApiUrl
: string
: (Required) Your project's base Back-end API URL. Network monitoring won't work unless it is present.bodyKeysToRecord
: string[]
: (Optional) Overrides bodyKeysToRedact
List of HTTP Body keys to be recorded. Other keys will be redacted for security.bodyKeysToRedact
: string[]
: (Optional) List of HTTP Body keys to be redacted for security (for hiding keys that contain secret keys/tokens).headerKeysToRecord
: string[]
: (Optional) Overrides headersToRedact
, List of only HTTP Headers to be recorded.headersToRedact
: string[]
: (Optional) List of HTTP Header keys containing secret keys/tokens.urlBlocklist
: string[]
: (Optional) List of URL's that is unwanted to be monitored.tracingOrigins
: string[]
: (Optional) List of URL's to be monitored other than baseApiUrl
.showButton
: boolean
: (Optional, default: true
) show Khaos button for bug submit form.Khaos.showForm(): void
Shows bug request form.
Khaos.hideForm(): void
Hides bug request form.
Khaos.toggleForm(): void
Toggles bug request form.
FAQs
Javascript SDK for Khaos.
We found that @nextlua/khaos.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.