@wrongstack/plugin-sdk 0.318.0 → 0.319.1
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/dist/runtime.js +35 -7
- package/package.json +3 -3
package/dist/runtime.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
import { existsSync, readdirSync, statSync } from "node:fs";
|
|
4
4
|
import { basename, extname as extname2, isAbsolute as isAbsolute3, relative as relative3, resolve as resolve3 } from "node:path";
|
|
5
|
+
import { buildChildEnv } from "@wrongstack/core/utils";
|
|
5
6
|
|
|
6
7
|
// src/runtime/llm.ts
|
|
7
8
|
function stripOuterMarkdownFence(text) {
|
|
@@ -321,7 +322,10 @@ var CREDENTIAL_PATTERNS = [
|
|
|
321
322
|
type: "anthropic_key",
|
|
322
323
|
regex: /(?<![A-Za-z0-9])sk-ant-api\d+-[A-Za-z0-9_-]{20,}(?![A-Za-z0-9])/g
|
|
323
324
|
},
|
|
324
|
-
{
|
|
325
|
+
{
|
|
326
|
+
type: "openai_key",
|
|
327
|
+
regex: /(?<![A-Za-z0-9])sk-(?!ant)(?:proj-)?[A-Za-z0-9_-]{20,}(?![A-Za-z0-9])/g
|
|
328
|
+
},
|
|
325
329
|
// GitHub. `ghp_` is only the personal-access-token prefix — the OAuth
|
|
326
330
|
// (`gho_`), user-to-server (`ghu_`), server-to-server (`ghs_`) and
|
|
327
331
|
// refresh (`ghr_`) tokens grant the same or broader access and were
|
|
@@ -384,14 +388,29 @@ var CREDENTIAL_PATTERNS = [
|
|
|
384
388
|
{ type: "groq_key", regex: /(?<![A-Za-z0-9])gsk_[A-Za-z0-9]{40,}(?![A-Za-z0-9])/g },
|
|
385
389
|
// SaaS / infrastructure tokens — each grants API access on the user's
|
|
386
390
|
// account, and each was previously invisible to this gate.
|
|
387
|
-
{
|
|
391
|
+
{
|
|
392
|
+
type: "sendgrid_key",
|
|
393
|
+
regex: /(?<![A-Za-z0-9])SG\.[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}(?![A-Za-z0-9_-])/g
|
|
394
|
+
},
|
|
388
395
|
{ type: "digitalocean_token", regex: /(?<![A-Za-z0-9])dop_v1_[a-f0-9]{64}(?![A-Za-z0-9])/g },
|
|
389
|
-
{
|
|
390
|
-
|
|
396
|
+
{
|
|
397
|
+
type: "doppler_token",
|
|
398
|
+
regex: /(?<![A-Za-z0-9])dp\.(?:pt|st|sa|scim|audit)\.[A-Za-z0-9]{40,}(?![A-Za-z0-9])/g
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
type: "shopify_token",
|
|
402
|
+
regex: /(?<![A-Za-z0-9])shp(?:at|ca|pa|ss)_[a-fA-F0-9]{32}(?![A-Za-z0-9])/g
|
|
403
|
+
},
|
|
391
404
|
{ type: "docker_pat", regex: /(?<![A-Za-z0-9])dckr_pat_[A-Za-z0-9_-]{20,}(?![A-Za-z0-9_-])/g },
|
|
392
405
|
{ type: "linear_key", regex: /(?<![A-Za-z0-9])lin_api_[A-Za-z0-9]{40,}(?![A-Za-z0-9])/g },
|
|
393
|
-
{
|
|
394
|
-
|
|
406
|
+
{
|
|
407
|
+
type: "atlassian_token",
|
|
408
|
+
regex: /(?<![A-Za-z0-9])ATATT3[A-Za-z0-9_\-=]{40,}(?![A-Za-z0-9_\-=])/g
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
type: "square_token",
|
|
412
|
+
regex: /(?<![A-Za-z0-9])(?:sq0(?:atp|csp)-|EAAA)[A-Za-z0-9_-]{20,}(?![A-Za-z0-9_-])/g
|
|
413
|
+
},
|
|
395
414
|
{
|
|
396
415
|
type: "azure_storage_key",
|
|
397
416
|
regex: /AccountKey=[A-Za-z0-9+/]{80,}={0,2}/g
|
|
@@ -685,7 +704,10 @@ function resolveRunnerCommand(runtime, command, options = {}) {
|
|
|
685
704
|
return null;
|
|
686
705
|
}
|
|
687
706
|
if (head === runtime.executable) {
|
|
688
|
-
if (!everyFlagAllowed(
|
|
707
|
+
if (!everyFlagAllowed(
|
|
708
|
+
runtime.allowedFlags,
|
|
709
|
+
[second, ...rest].filter((v) => Boolean(v))
|
|
710
|
+
)) {
|
|
689
711
|
return null;
|
|
690
712
|
}
|
|
691
713
|
return {
|
|
@@ -769,6 +791,12 @@ function runRunnerCommand(argv, options) {
|
|
|
769
791
|
invocation.args,
|
|
770
792
|
{
|
|
771
793
|
cwd: trimmedCwd,
|
|
794
|
+
// H-8 (security report VF-09): plugin subprocesses inherit the FULL
|
|
795
|
+
// environment by default — every provider API key and the vault
|
|
796
|
+
// passphrase were visible to any plugin exec(). Route through the
|
|
797
|
+
// shared allowlist + secret-strip child env (operators can widen it
|
|
798
|
+
// deliberately via WRONGSTACK_CHILD_ENV_PASSTHROUGH).
|
|
799
|
+
env: buildChildEnv(),
|
|
772
800
|
timeout: options.timeoutMs,
|
|
773
801
|
signal: options.signal,
|
|
774
802
|
maxBuffer: MAX_BUFFER_BYTES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.319.1",
|
|
4
4
|
"description": "Authoring SDK for WrongStack plugins — the plugin contract types, definePlugin, and shared runtime helpers. Third-party plugins should depend on this package only.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ECOSTACK TECHNOLOGY OÜ",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"vitest": "^4.1.11"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@wrongstack/core": "0.
|
|
33
|
-
"@wrongstack/tools": "0.
|
|
32
|
+
"@wrongstack/core": "0.319.1",
|
|
33
|
+
"@wrongstack/tools": "0.319.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "node ../../scripts/build-package.mjs",
|