requestshield 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +407 -269
- package/config/.env.prod +5 -0
- package/package.json +8 -5
- package/skills/requestshield/SKILL.md +55 -63
- package/skills/requestshield/assets/AGENTS.codex.md +17 -17
- package/skills/requestshield/references/backend-java-core.md +3 -3
- package/skills/requestshield/references/backend-spring-boot.md +3 -3
- package/skills/requestshield/references/browser-manual.md +4 -4
- package/skills/requestshield/references/browser-seamless.md +7 -15
- package/skills/requestshield/references/cli.md +93 -169
- package/skills/requestshield/references/integration-planning.md +19 -46
- package/skills/requestshield/references/troubleshooting.md +26 -30
- package/src/api-client.mjs +106 -165
- package/src/args.mjs +108 -151
- package/src/browser-opener.mjs +32 -0
- package/src/cli.mjs +50 -28
- package/src/commands/agent-setup.mjs +34 -37
- package/src/commands/application-mutations.mjs +33 -0
- package/src/commands/application-response.mjs +55 -0
- package/src/commands/apps-get.mjs +3 -47
- package/src/commands/apps-list.mjs +40 -36
- package/src/commands/auth-status.mjs +37 -0
- package/src/commands/keys-create.mjs +7 -38
- package/src/commands/mutation-support.mjs +110 -0
- package/src/commands/secret-commands.mjs +45 -0
- package/src/commands/signin.mjs +70 -57
- package/src/commands/signout.mjs +9 -0
- package/src/commands/update-check.mjs +12 -4
- package/src/config.mjs +145 -3
- package/src/entrypoint.mjs +24 -0
- package/src/errors.mjs +3 -1
- package/src/main.mjs +2 -21
- package/src/oauth-client.mjs +153 -0
- package/src/oauth-loopback.mjs +120 -0
- package/src/session-files.mjs +213 -0
- package/src/session-store.mjs +177 -64
- package/src/commands/billing-get.mjs +0 -110
- package/src/commands/challenge-volume.mjs +0 -81
- package/src/commands/contract.mjs +0 -106
package/config/.env.prod
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Public QAT settings for source-checkout development only. Never add secrets.
|
|
2
|
+
API_URL=https://management-api-qat.intellifend.ai
|
|
3
|
+
OAUTH_ISSUER=https://incongruous-cherry-0283.customers.stytch.dev
|
|
4
|
+
OAUTH_AUTHORIZATION_ISSUER=stytch.com/project-test-968146e2-6f34-4936-9d1c-a7e966813c70
|
|
5
|
+
OAUTH_CLIENT_ID=connected-app-test-5ff62ca4-c0eb-48c3-84e5-06ae8f669998
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "requestshield",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Customer CLI for IntelliFend RequestShield.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"src/",
|
|
14
|
+
"config/.env.prod",
|
|
14
15
|
"skills/",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|
|
@@ -18,19 +19,21 @@
|
|
|
18
19
|
"node": ">=22.13"
|
|
19
20
|
},
|
|
20
21
|
"scripts": {
|
|
21
|
-
"
|
|
22
|
+
"check": "npm run lint && npm run typecheck && npm test && npm run test:contract && npm run build",
|
|
23
|
+
"build": "npm run lint && node scripts/build-package.mjs",
|
|
22
24
|
"lint": "node scripts/check-package.mjs",
|
|
23
25
|
"test": "node --test",
|
|
26
|
+
"test:contract": "node scripts/run-management-contract.mjs",
|
|
27
|
+
"requestshield-qat": "node dev/main-qat.mjs",
|
|
28
|
+
"requestshield-stg": "node dev/main-stg.mjs",
|
|
24
29
|
"test:update-check:manual": "node scripts/manual-update-check.mjs",
|
|
25
30
|
"typecheck": "tsc -p jsconfig.json --noEmit",
|
|
26
31
|
"prepack": "node scripts/package-skill.mjs stage",
|
|
27
32
|
"postpack": "node scripts/package-skill.mjs clean",
|
|
28
|
-
"prepublishOnly": "npm run
|
|
33
|
+
"prepublishOnly": "npm run check"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
36
|
"@types/node": "26.1.1",
|
|
32
|
-
"esbuild": "^0.28.1",
|
|
33
|
-
"postject": "1.0.0-alpha.6",
|
|
34
37
|
"typescript": "^6.0.3"
|
|
35
38
|
},
|
|
36
39
|
"license": "UNLICENSED"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requestshield
|
|
3
|
-
description: Install, verify, troubleshoot, or remove IntelliFend RequestShield bot protection in a customer codebase — the browser SDK in Seamless or Manual mode, plus Java backend enforcement via the Spring Boot 3 starter or the Java core SDK —
|
|
3
|
+
description: Install, verify, troubleshoot, or remove IntelliFend RequestShield bot protection in a customer codebase — the browser SDK in Seamless or Manual mode, plus Java backend enforcement via the Spring Boot 3 starter or the Java core SDK — using the `requestshield` CLI for sign-in, applications and credentials, with SDK documentation and runtime observations for integration checks. Use this skill whenever the user mentions RequestShield, IntelliFend, `X-IntelliFend-Token`, `IntelliFend.getToken()`, `data-protect`, `@RequestShieldProtected`, App Key or API Secret setup, or asks to protect an endpoint such as registration, sign-in, password reset, checkout, or form submission from bots, scripted abuse, or credential stuffing — even when they never name the product. Also use it before hand-editing any file that already contains a RequestShield script tag, `verify()` call, or protection annotation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# RequestShield integration
|
|
@@ -27,18 +27,18 @@ password reset, checkout, form submission — not a read-only route in front of
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
requestshield --version # is the CLI present?
|
|
30
|
-
requestshield auth status
|
|
30
|
+
requestshield auth status --json # local session metadata, no provider check
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
If `requestshield --version` fails,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
the
|
|
38
|
-
page that silently loads nothing.
|
|
34
|
+
If `requestshield --version` fails, explain that CLI account/app operations need
|
|
35
|
+
an installed compatible version. Do not substitute invented HTTP calls. SDK URLs,
|
|
36
|
+
headers, modes and backend requirements come from the customer documentation for
|
|
37
|
+
the chosen SDK release; the integration-contract CLI command is unavailable.
|
|
39
38
|
|
|
40
|
-
If
|
|
41
|
-
themselves
|
|
39
|
+
If local status is `signed_out`, ask the user to complete `requestshield signin`
|
|
40
|
+
themselves. Never ask for credentials. `valid` is a local state only; an expired
|
|
41
|
+
session may refresh during the next authenticated command.
|
|
42
42
|
|
|
43
43
|
Those commands are the preflight for integration-changing work. For read-only CLI
|
|
44
44
|
questions, go to **Classify the request** and run only the matching command.
|
|
@@ -50,16 +50,16 @@ single CLI call or a short answer. Match on what the user wants, not on exact wo
|
|
|
50
50
|
|
|
51
51
|
| Intent | Sounds like | Do this |
|
|
52
52
|
| --- | --- | --- |
|
|
53
|
-
| **General info** | "what version", "is there a newer CLI", "am I up to date" | `requestshield --version
|
|
53
|
+
| **General info** | "what version", "is there a newer CLI", "am I up to date" | Use `requestshield --version`. For an explicitly requested update check, explain that production `update check` can offer a global npm installation; accept it only within the user’s requested scope. |
|
|
54
54
|
| **Authentication** | "sign me in", or preflight `auth status` came back unauthenticated | Ask the user to run `requestshield signin` in their own terminal, and wait. It is interactive — never automate it, never run it for them, never ask for credentials. Re-run `auth status` once they confirm. |
|
|
55
55
|
| **Key / secret management** | "create an app key", "I need an API Secret", "rotate the secret", "deactivate a key" | **Hand the command over; do not run it.** → "Key and secret management" below. |
|
|
56
56
|
| **Install** | "add RequestShield", "protect /api/register" | `references/integration-planning.md` full flow → **Installing** → **Verifying** → **Negative test**. Do not reorder or skip a step. |
|
|
57
57
|
| **Uninstall** | "remove it", "roll it back" | `references/integration-planning.md` (Detect existing integration only) → **Uninstalling**. |
|
|
58
58
|
| **Verify / troubleshoot** | "is it set up right?", "why is it not blocking?", a reason code | `references/integration-planning.md` (Detect existing integration only) → **Verifying**. For a reason code, also read `references/troubleshooting.md`. |
|
|
59
|
-
| **Challenge volume** | "how much traffic", "how many challenges"
|
|
60
|
-
| **Billing** | "am I being charged", "what plan", "what are my limits" |
|
|
61
|
-
| **Service health** | "is the service up", "is it degraded" |
|
|
62
|
-
| **Agent setup** | "set this up for Codex too", "install the skill for Claude" | Run `requestshield agent setup` for auto-detection, or pass the requested agent: `--
|
|
59
|
+
| **Challenge volume** | "how much traffic", "how many challenges" | Explain that the CLI analytics command is unavailable. Use existing authorized monitoring; do not infer volume from app status. |
|
|
60
|
+
| **Billing** | "am I being charged", "what plan", "what are my limits" | Explain that billing is unavailable in this CLI; use the customer’s established billing/support channel. |
|
|
61
|
+
| **Service health** | "is the service up", "is it degraded" | No service-health CLI command exists. Inspect authorized health/monitoring evidence without exposing credentials. |
|
|
62
|
+
| **Agent setup** | "set this up for Codex too", "install the skill for Claude" | Run `requestshield agent setup` for auto-detection, or pass the requested agent: `--codex` or `--claude`. This installs agent guidance; it does not mint keys or edit customer application code. |
|
|
63
63
|
| **Anything else** | | Look the command up in `references/cli.md`. If it is not there, run `requestshield --help` rather than guessing at a flag. |
|
|
64
64
|
|
|
65
65
|
Full CLI surface, output shapes, and which commands need auth: `references/cli.md`.
|
|
@@ -72,30 +72,30 @@ independent.
|
|
|
72
72
|
|
|
73
73
|
## Key and secret management
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
Commands that display API secrets should run in the user's terminal so their
|
|
76
|
+
values never enter the agent's tool output or conversation. State-changing
|
|
77
|
+
commands must match the user's requested application and action.
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
requestshield keys create --app-name <name> # new App Key + API Secret pair
|
|
87
|
-
requestshield app key rotate --app-key <app-key> # new secret, App Key unchanged
|
|
88
|
-
requestshield keys deactive --app-key <app-key> # stops verification for that key
|
|
79
|
+
```console
|
|
80
|
+
requestshield keys create --app-name <name>
|
|
81
|
+
requestshield keys rotate <app-key>
|
|
82
|
+
requestshield keys reveal <app-key>
|
|
83
|
+
requestshield keys revoke <app-key>
|
|
84
|
+
requestshield apps disable <app-key>
|
|
89
85
|
```
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
Create makes a new application. Rotate keeps the App Key and replaces its secret.
|
|
88
|
+
Reveal retrieves the current active secret when a prior response was lost; an
|
|
89
|
+
exposed secret instead requires rotation. Revoke invalidates the secret, while
|
|
90
|
+
application disable retains it. Acceptance is asynchronous, not proof of immediate
|
|
91
|
+
propagation. Explain the impact and storage requirement before the user runs a
|
|
92
|
+
command, then confirm secret presence only. Never ask them to paste a secret back.
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
Create/rename/enable do not prompt. Disable/rotate/revoke/reveal require confirmation
|
|
95
|
+
or `--yes`. Mutations other than reveal accept `--idempotency-key`; uncertain results
|
|
96
|
+
must be retried with identical arguments and the same key within seven days, never
|
|
97
|
+
a fresh key. A replay may return `apiSecret: null`; use explicit reveal rather than
|
|
98
|
+
automatically creating or rotating again. See `references/cli.md`.
|
|
99
99
|
|
|
100
100
|
## Installing
|
|
101
101
|
|
|
@@ -106,7 +106,7 @@ It must settle the App Key, the existing-integration state, the contract values,
|
|
|
106
106
|
backend path, and the browser mode before step 1 below.
|
|
107
107
|
|
|
108
108
|
1. **Browser side** — add the hosted script once in `<head>`, using the `script_url`
|
|
109
|
-
from
|
|
109
|
+
from the published customer documentation for that SDK release, then follow the chosen browser reference:
|
|
110
110
|
- Seamless → `references/browser-seamless.md`
|
|
111
111
|
- Manual → `references/browser-manual.md`
|
|
112
112
|
2. **Backend side** — add the dependency, configure `app-key` and `api-secret` from
|
|
@@ -135,7 +135,7 @@ hand-off and warning are in **Key and secret management** above. Afterwards refe
|
|
|
135
135
|
only as "the secret you just received".
|
|
136
136
|
|
|
137
137
|
If a secret has already reached a repo, a log, an artifact, or this transcript, the fix
|
|
138
|
-
is `requestshield
|
|
138
|
+
is `requestshield keys rotate <app-key>`, run by the user.
|
|
139
139
|
|
|
140
140
|
## Verifying
|
|
141
141
|
|
|
@@ -160,30 +160,22 @@ Then the static checks. They are deterministic and catch most real breakage.
|
|
|
160
160
|
- Cross-origin endpoints: CORS allows `X-IntelliFend-Token`.
|
|
161
161
|
- No token or secret in logs, analytics, URLs, or error reporting.
|
|
162
162
|
|
|
163
|
-
Structural correctness is not proof of enforcement. For runtime evidence,
|
|
164
|
-
endpoint
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
--from <start> \
|
|
169
|
-
--to <end> \
|
|
170
|
-
--granularity hour
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Report static correctness and platform traffic separately. A flat zero after real
|
|
174
|
-
traffic means the browser half is not firing; go back to the selected browser reference
|
|
175
|
-
before changing backend code.
|
|
163
|
+
Structural correctness is not proof of enforcement. For runtime evidence,
|
|
164
|
+
exercise the endpoint in an authorized environment and inspect the browser request
|
|
165
|
+
and backend decision without recording tokens. The CLI challenge-volume command
|
|
166
|
+
is unavailable, and application status does not establish traffic. Report static
|
|
167
|
+
checks, observed requests and backend enforcement separately.
|
|
176
168
|
|
|
177
169
|
### The negative test — the only proof of enforcement
|
|
178
170
|
|
|
179
|
-
Neither static checks nor
|
|
180
|
-
mutation. The proof is a request the backend should reject.
|
|
171
|
+
Neither static checks nor observed browser traffic can prove the backend refuses a
|
|
172
|
+
tokenless mutation. The proof is a request the backend should reject.
|
|
181
173
|
|
|
182
174
|
Before running it, establish:
|
|
183
175
|
|
|
184
|
-
1.
|
|
185
|
-
|
|
186
|
-
|
|
176
|
+
1. The backend under test can reach its configured verification service and safe
|
|
177
|
+
metrics show a non-degraded control request. A platform-wide health report alone
|
|
178
|
+
would not establish that this backend’s local circuit has closed.
|
|
187
179
|
2. The endpoint's effective mode is `BLOCK`, not `MONITOR`. Include any method-level
|
|
188
180
|
override when resolving the effective mode. `MONITOR` allows every request by design.
|
|
189
181
|
3. A valid control request is available. Its authentication, session, CSRF state, route,
|
|
@@ -255,9 +247,9 @@ first:
|
|
|
255
247
|
other source and header in place.
|
|
256
248
|
5. Configuration keys and environment variable references.
|
|
257
249
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
code
|
|
250
|
+
Application disable is a separate action: `requestshield apps disable <app-key>`.
|
|
251
|
+
Perform or hand it off only when the user requested that live-state change; removing
|
|
252
|
+
integration code does not itself authorize revocation or disable.
|
|
261
253
|
|
|
262
254
|
## Non-negotiables
|
|
263
255
|
|
|
@@ -280,8 +272,8 @@ These separate an integration that protects traffic from one that only looks lik
|
|
|
280
272
|
backend apply its configured policy.
|
|
281
273
|
- **The API Secret stays at the backend.** Never put it in browser code,
|
|
282
274
|
client-visible responses, source control, logs, build artifacts, or chat transcripts.
|
|
283
|
-
- **
|
|
284
|
-
|
|
275
|
+
- **Keep displayed secrets out of tool output.** Hand create/rotate/reveal to the
|
|
276
|
+
user and verify by presence only. Match other live-state changes to user intent.
|
|
285
277
|
|
|
286
278
|
## Reference files
|
|
287
279
|
|
|
@@ -298,10 +290,10 @@ These separate an integration that protects traffic from one that only looks lik
|
|
|
298
290
|
## For agent setup
|
|
299
291
|
|
|
300
292
|
`requestshield agent setup` installs this skill for the detected or requested agent.
|
|
301
|
-
Use `--
|
|
302
|
-
|
|
303
|
-
`assets/AGENTS.codex.md`
|
|
304
|
-
|
|
293
|
+
Use `--codex` or `--claude` when the user names the target agent. Setup installs
|
|
294
|
+
into the agent’s personal skill directory; it does not edit repository `AGENTS.md`.
|
|
295
|
+
`assets/AGENTS.codex.md` is an optional template for a separately requested
|
|
296
|
+
repository instruction change.
|
|
305
297
|
|
|
306
298
|
Agent setup installs guidance only. It does not mint keys, rotate secrets, deactivate
|
|
307
299
|
keys, or edit customer application code.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Optional repository guidance template. Agent setup installs the personal skill; it does not write this file. -->
|
|
2
2
|
## RequestShield integration
|
|
3
3
|
|
|
4
4
|
This repository uses IntelliFend RequestShield to protect selected operations from
|
|
5
5
|
automated abuse. Before installing, verifying, changing, or removing that protection —
|
|
6
6
|
and before hand-editing any file that already contains a RequestShield script tag,
|
|
7
7
|
`data-protect`, `X-IntelliFend-Token`, `IntelliFend.getToken()`, `verify()`, or
|
|
8
|
-
`@RequestShieldProtected` — read
|
|
8
|
+
`@RequestShieldProtected` — read `~/.agents/skills/requestshield/SKILL.md` and follow it.
|
|
9
9
|
|
|
10
10
|
The procedure exists because the failure mode here is silent. Every integration has two
|
|
11
11
|
halves: the browser obtains and transports a token, and the backend evaluates it before
|
|
@@ -24,29 +24,30 @@ tokens flowing with nothing enforcing them. Java below 17 blocks both backend pa
|
|
|
24
24
|
|
|
25
25
|
Orientation:
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
27
|
+
- `~/.agents/skills/requestshield/SKILL.md` — the procedure. Start here.
|
|
28
|
+
- `~/.agents/skills/requestshield/references/integration-planning.md` — the planning flow:
|
|
29
29
|
credentials check, detecting an existing integration, gating on the backend stack
|
|
30
30
|
(Java version, Spring MVC vs WebFlux, other frameworks), and choosing the browser mode.
|
|
31
31
|
Read it before any install, verify, or uninstall.
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
- `~/.agents/skills/requestshield/references/cli.md` — supported sign-in, app and secret
|
|
33
|
+
commands. Contract, service-health, credential-status, traffic and billing commands
|
|
34
|
+
are unavailable; use customer release docs and authorized runtime observations.
|
|
35
|
+
- `~/.agents/skills/requestshield/references/browser-seamless.md` — Seamless mode: exact-endpoint
|
|
35
36
|
matching, and the transports it does not cover.
|
|
36
|
-
-
|
|
37
|
-
-
|
|
37
|
+
- `~/.agents/skills/requestshield/references/browser-manual.md` — Manual mode, carriers, CORS, CSP.
|
|
38
|
+
- `~/.agents/skills/requestshield/references/backend-spring-boot.md` — enforcement on Spring Boot 3
|
|
38
39
|
MVC: the `@RequestShieldProtected` annotation path.
|
|
39
|
-
-
|
|
40
|
+
- `~/.agents/skills/requestshield/references/backend-java-core.md` — enforcement on any other
|
|
40
41
|
Java 17 backend: the `verify()` path.
|
|
41
|
-
-
|
|
42
|
+
- `~/.agents/skills/requestshield/references/troubleshooting.md` — reason codes and diagnosis.
|
|
42
43
|
|
|
43
44
|
Five rules worth carrying without opening a file:
|
|
44
45
|
|
|
45
46
|
- The **API Secret** never enters source control, logs, or a reply. It belongs in backend
|
|
46
|
-
runtime secret storage, and `requestshield app
|
|
47
|
+
runtime secret storage, and `requestshield keys rotate <app-key>` is the fix if it leaks. The
|
|
47
48
|
**App Key** is public and must be identical in browser and backend.
|
|
48
|
-
- **
|
|
49
|
-
|
|
49
|
+
- **Keep secret output out of tool transcripts.** Have the user run create, rotate
|
|
50
|
+
and reveal in their own terminal, then have them
|
|
50
51
|
export `INTELLIFEND_REQUESTSHIELD_APP_KEY` and
|
|
51
52
|
`INTELLIFEND_REQUESTSHIELD_API_SECRET`, and confirm by presence only.
|
|
52
53
|
- Every protected request needs its **own token, verified exactly once**. Reuse or a
|
|
@@ -57,6 +58,5 @@ Five rules worth carrying without opening a file:
|
|
|
57
58
|
non-empty string**; when it is empty, omit the header and let the backend apply its
|
|
58
59
|
configured policy.
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<!-- requestshield:end -->
|
|
61
|
+
Consult customer documentation for the chosen SDK release before changing the script
|
|
62
|
+
URL, header name, released modes or backend baseline. The contract CLI is unavailable.
|
|
@@ -13,9 +13,9 @@ is not Spring Boot 3 MVC, including a Spring Boot 3 app built on WebFlux, which
|
|
|
13
13
|
Spring MVC. Also needed: the same App Key the browser uses, the backend-only API Secret,
|
|
14
14
|
and a web framework that can extract the token carrier.
|
|
15
15
|
|
|
16
|
-
Confirm the baseline and supported languages
|
|
17
|
-
|
|
18
|
-
not
|
|
16
|
+
Confirm the baseline and supported languages in the customer SDK documentation
|
|
17
|
+
for the selected release. The CLI integration-contract command is unavailable. Do
|
|
18
|
+
not promise an undocumented backend path; a browser-only install protects nothing.
|
|
19
19
|
|
|
20
20
|
The browser mode does not decide this path. Either Seamless or Manual mode delivers the
|
|
21
21
|
token, and the application extracts it and passes the value unchanged to `verify()`.
|
|
@@ -13,9 +13,9 @@ writing anything — the detection recipes are in `integration-planning.md`, und
|
|
|
13
13
|
-> Run the check**. Also needed: the same
|
|
14
14
|
App Key the browser uses, and the backend-only API Secret.
|
|
15
15
|
|
|
16
|
-
Confirm the baseline and supported languages
|
|
17
|
-
|
|
18
|
-
not
|
|
16
|
+
Confirm the baseline and supported languages in the customer SDK documentation
|
|
17
|
+
for the selected release. The CLI integration-contract command is unavailable. Do
|
|
18
|
+
not promise an undocumented backend path; a browser-only install protects nothing.
|
|
19
19
|
|
|
20
20
|
The browser mode does not decide this path. Either Seamless or Manual mode delivers the
|
|
21
21
|
token in `X-IntelliFend-Token`, and the starter reads that header without caring how it
|
|
@@ -16,7 +16,7 @@ Seamless interception:
|
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
18
|
<script
|
|
19
|
-
src="
|
|
19
|
+
src="SDK_SCRIPT_URL_FROM_RELEASE_DOCS"
|
|
20
20
|
data-app-key="YOUR_APP_KEY"
|
|
21
21
|
defer
|
|
22
22
|
></script>
|
|
@@ -24,7 +24,7 @@ Seamless interception:
|
|
|
24
24
|
|
|
25
25
|
| Attribute | Required | Notes |
|
|
26
26
|
| --- | --- | --- |
|
|
27
|
-
| `src` | Yes |
|
|
27
|
+
| `src` | Yes | Use the customer Browser SDK installation documentation for the selected release; its mutable example is `https://static.intellifend.ai/intellifend.js`. The CLI contract command is unavailable. |
|
|
28
28
|
| `data-app-key` | Yes | Public App Key. Must match the backend's configured key. |
|
|
29
29
|
| `defer` | Recommended | Keeps HTML parsing unblocked. |
|
|
30
30
|
|
|
@@ -188,8 +188,8 @@ Content-Security-Policy:
|
|
|
188
188
|
worker-src 'self' blob:;
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
Confirm the hosts **and the directive list** against
|
|
192
|
-
|
|
191
|
+
Confirm the hosts **and the directive list** against the customer SDK release and
|
|
192
|
+
deployment documentation before editing a live policy — this skill is not the authority
|
|
193
193
|
on either. If `getToken()` returns an empty string on a page that sends a CSP, a blocked
|
|
194
194
|
directive is the first thing to check: the browser console names what it refused, which
|
|
195
195
|
beats guessing at the policy.
|
|
@@ -14,7 +14,7 @@ otherwise an early request leaves the page before interception is installed:
|
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
16
|
<script
|
|
17
|
-
src="
|
|
17
|
+
src="SDK_SCRIPT_URL_FROM_RELEASE_DOCS"
|
|
18
18
|
data-app-key="YOUR_APP_KEY"
|
|
19
19
|
data-protect='["/api/register"]'
|
|
20
20
|
defer
|
|
@@ -136,20 +136,12 @@ Static checks:
|
|
|
136
136
|
3. Every protected endpoint reaches the network via `fetch` or async XHR from page
|
|
137
137
|
scope.
|
|
138
138
|
|
|
139
|
-
Runtime check: exercise the endpoint
|
|
140
|
-
`X-IntelliFend-Token
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
--from <start> \
|
|
146
|
-
--to <end> \
|
|
147
|
-
--granularity hour
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Zero volume with a correct-looking `data-protect` is nearly always a path mismatch
|
|
151
|
-
(trailing slash, case, a different origin than assumed) or one of the uncovered
|
|
152
|
-
transports above. Re-read the actual request URL before changing anything else.
|
|
139
|
+
Runtime check: exercise the endpoint in an authorized environment and confirm its
|
|
140
|
+
request carries a non-empty `X-IntelliFend-Token` without recording the token value.
|
|
141
|
+
Inspect safe backend decision metrics separately; the negative test in `SKILL.md`
|
|
142
|
+
provides enforcement evidence. The CLI challenge-volume command is unavailable.
|
|
143
|
+
A missing header can indicate a path mismatch or an uncovered transport; compare
|
|
144
|
+
the actual request URL and transport before changing backend code.
|
|
153
145
|
|
|
154
146
|
## Expected result
|
|
155
147
|
|