🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@kilocode/openclaw-security-advisor

Package Overview
Dependencies
Maintainers
10
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kilocode/openclaw-security-advisor - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+1
-1
package.json
{
"name": "@kilocode/openclaw-security-advisor",
"version": "0.1.2",
"version": "0.1.3",
"type": "module",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -135,3 +135,3 @@ # @kilocode/openclaw-security-advisor

1. Open this URL in your browser:
https://app.kilo.ai/device-auth?code=XXXX-XXXX
https://app.kilo.ai/openclaw-advisor?code=XXXX-XXXX

@@ -138,0 +138,0 @@ 2. Enter this code: XXXX-XXXX

@@ -57,2 +57,15 @@ import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";

* Call this once, show the result to the user, then poll with pollDeviceAuth().
*
* The server returns a generic `/device-auth?code=...` URL in `verificationUrl`,
* built from APP_URL (the user-facing host, e.g. https://app.kilo.ai in prod).
* We rewrite only the PATH to `/openclaw-advisor?code=...`, keeping the origin
* authoritative. Rebuilding the URL from `apiBase` would be wrong in production,
* where the API host (https://api.kilo.ai) and the app host (https://app.kilo.ai)
* are different — the user needs the app host to land on the signup flow.
*
* The cloud side uses the `/openclaw-advisor` path prefix to attribute Security
* Advisor signups and layer a per-product signup bonus on top of the standard
* welcome credits. Old plugin builds keep working against the server — they just
* land on the generic `/device-auth` URL and don't qualify for the bonus, which
* is the intended behavior.
*/

@@ -73,6 +86,8 @@ export async function startDeviceAuth(

const data = (await resp.json()) as DeviceAuthInitResponse;
const advisorUrl = new URL(data.verificationUrl);
advisorUrl.pathname = "/openclaw-advisor";
return {
kind: "started",
code: data.code,
verificationUrl: data.verificationUrl,
verificationUrl: advisorUrl.toString(),
expiresIn: data.expiresIn,

@@ -79,0 +94,0 @@ };