Skip to content

Commit 7236a06

Browse files
authored
fix: Merge pull request #6 from EverseDevelopment/hotfix/ScopeEscalation
Prevents APS login scope escalation
2 parents 727868c + 1748c4d commit 7236a06

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/index.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,11 @@ const TOOLS = [
147147
"Opens the user's browser to the Autodesk sign‑in page. " +
148148
"After the user logs in and grants consent, the token is cached to disk " +
149149
"and auto‑refreshed. All subsequent API calls use the 3LO token " +
150-
"(with the user's own permissions) until aps_logout is called.",
150+
"(with the user's own permissions) until aps_logout is called. " +
151+
"The OAuth scope is determined by the APS_SCOPE setting configured by the user.",
151152
inputSchema: {
152153
type: "object" as const,
153-
properties: {
154-
scope: {
155-
type: "string",
156-
description:
157-
"OAuth scope(s), space‑separated. " +
158-
"Defaults to 'data:read data:write data:create account:read'.",
159-
},
160-
},
154+
properties: {},
161155
},
162156
},
163157

@@ -1008,10 +1002,7 @@ async function handleTool(
10081002
// ── aps_login (3LO) ─────────────────────────────────────────
10091003
if (name === "aps_login") {
10101004
requireApsEnv();
1011-
const scope =
1012-
(args.scope as string | undefined)?.trim() ||
1013-
APS_SCOPE ||
1014-
"data:read data:write data:create account:read";
1005+
const scope = APS_SCOPE || "data:read";
10151006
const result = await performAps3loLogin(
10161007
APS_CLIENT_ID,
10171008
APS_CLIENT_SECRET,

0 commit comments

Comments
 (0)