@declaw/sdk 1.0.3 → 1.0.4
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/CHANGELOG.md +15 -0
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to the Declaw TypeScript / JavaScript SDK are documented in
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.4]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `InjectionAction` — dropped the `"sanitize"` value. The server
|
|
13
|
+
never implemented request-body sanitization for detected injections
|
|
14
|
+
(the classifier returns a whole-request verdict, not span offsets),
|
|
15
|
+
so the value was accepted client-side but silently behaved like
|
|
16
|
+
`log_only` at the edge proxy. Valid values are now `"block"` and
|
|
17
|
+
`"log_only"`. Default action changes from `"sanitize"` to
|
|
18
|
+
`"log_only"` so existing enforcement behaviour is preserved.
|
|
19
|
+
Callers passing `action: "sanitize"` will now raise at construction
|
|
20
|
+
time; migrate to `"log_only"` (same behaviour) or `"block"`
|
|
21
|
+
(hard-reject on detection).
|
|
22
|
+
|
|
8
23
|
## [1.0.3]
|
|
9
24
|
|
|
10
25
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -506,7 +506,6 @@ var InjectionSensitivity = /* @__PURE__ */ ((InjectionSensitivity2) => {
|
|
|
506
506
|
})(InjectionSensitivity || {});
|
|
507
507
|
var InjectionAction = /* @__PURE__ */ ((InjectionAction2) => {
|
|
508
508
|
InjectionAction2["Block"] = "block";
|
|
509
|
-
InjectionAction2["Sanitize"] = "sanitize";
|
|
510
509
|
InjectionAction2["LogOnly"] = "log_only";
|
|
511
510
|
return InjectionAction2;
|
|
512
511
|
})(InjectionAction || {});
|
|
@@ -516,7 +515,7 @@ function createInjectionDefenseConfig(opts) {
|
|
|
516
515
|
const config = {
|
|
517
516
|
enabled: opts?.enabled ?? false,
|
|
518
517
|
sensitivity: opts?.sensitivity ?? "medium" /* Medium */,
|
|
519
|
-
action: opts?.action ?? "
|
|
518
|
+
action: opts?.action ?? "log_only" /* LogOnly */,
|
|
520
519
|
threshold: opts?.threshold ?? 0.8,
|
|
521
520
|
domains: opts?.domains
|
|
522
521
|
};
|
|
@@ -541,7 +540,7 @@ function parseInjectionDefenseConfig(data) {
|
|
|
541
540
|
return {
|
|
542
541
|
enabled: data.enabled ?? false,
|
|
543
542
|
sensitivity: data.sensitivity ?? "medium" /* Medium */,
|
|
544
|
-
action: data.action ?? "
|
|
543
|
+
action: data.action ?? "log_only" /* LogOnly */,
|
|
545
544
|
threshold: data.threshold ?? 0.8,
|
|
546
545
|
domains: data.domains
|
|
547
546
|
};
|