@harness-engineering/core 0.26.2 → 0.26.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/dist/architecture/matchers.d.mts +1 -1
- package/dist/architecture/matchers.d.ts +1 -1
- package/dist/architecture/matchers.js +12 -2
- package/dist/architecture/matchers.mjs +1 -1
- package/dist/{chunk-4UI65RLE.mjs → chunk-JIOBXIVB.mjs} +12 -2
- package/dist/index.d.mts +194 -194
- package/dist/index.d.ts +194 -194
- package/dist/index.js +17 -3
- package/dist/index.mjs +6 -2
- package/dist/{matchers-XHMrK1kB.d.mts → matchers-DSibUtbV.d.mts} +134 -134
- package/dist/{matchers-XHMrK1kB.d.ts → matchers-DSibUtbV.d.ts} +134 -134
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -524,8 +524,18 @@ async function readFileContent(path46) {
|
|
|
524
524
|
return (0, import_types.Err)(error);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
var DEFAULT_FIND_FILES_IGNORE = [
|
|
528
|
+
"**/node_modules/**",
|
|
529
|
+
"**/dist/**",
|
|
530
|
+
"**/build/**",
|
|
531
|
+
"**/coverage/**"
|
|
532
|
+
];
|
|
533
|
+
async function findFiles(pattern, cwd = process.cwd(), extraIgnore = []) {
|
|
534
|
+
return (0, import_glob.glob)(pattern, {
|
|
535
|
+
cwd,
|
|
536
|
+
absolute: true,
|
|
537
|
+
ignore: [...DEFAULT_FIND_FILES_IGNORE, ...extraIgnore]
|
|
538
|
+
});
|
|
529
539
|
}
|
|
530
540
|
function relativePosix(from, to) {
|
|
531
541
|
return (0, import_node_path.relative)(from, to).replaceAll("\\", "/");
|
|
@@ -14240,7 +14250,11 @@ var reRolingPatterns = [
|
|
|
14240
14250
|
severity: "high",
|
|
14241
14251
|
category: "explicit-re-roling",
|
|
14242
14252
|
description: "Direct instruction override attempt",
|
|
14243
|
-
|
|
14253
|
+
// Requires an override verb (new/override/replace/set/reassign/reset/switch/update/change)
|
|
14254
|
+
// before the keyword so plain documentation headings like `_Agent & Persona:_` or YAML
|
|
14255
|
+
// keys like `role: developer` do not trigger. Real overrides ("new system instruction:",
|
|
14256
|
+
// "override directive:", "set role: admin") still match.
|
|
14257
|
+
pattern: /(?:new|override|replace|set|reassign|reset|switch(?:\s+to)?|update|change)\s+(?:system\s+)?(?:instruction|directive|role|persona)s?\s*[:=]\s*/i
|
|
14244
14258
|
}
|
|
14245
14259
|
];
|
|
14246
14260
|
var permissionEscalationPatterns = [
|
package/dist/index.mjs
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
runAll,
|
|
58
58
|
validateDependencies,
|
|
59
59
|
violationId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-JIOBXIVB.mjs";
|
|
61
61
|
|
|
62
62
|
// src/index.ts
|
|
63
63
|
export * from "@harness-engineering/types";
|
|
@@ -10963,7 +10963,11 @@ var reRolingPatterns = [
|
|
|
10963
10963
|
severity: "high",
|
|
10964
10964
|
category: "explicit-re-roling",
|
|
10965
10965
|
description: "Direct instruction override attempt",
|
|
10966
|
-
|
|
10966
|
+
// Requires an override verb (new/override/replace/set/reassign/reset/switch/update/change)
|
|
10967
|
+
// before the keyword so plain documentation headings like `_Agent & Persona:_` or YAML
|
|
10968
|
+
// keys like `role: developer` do not trigger. Real overrides ("new system instruction:",
|
|
10969
|
+
// "override directive:", "set role: admin") still match.
|
|
10970
|
+
pattern: /(?:new|override|replace|set|reassign|reset|switch(?:\s+to)?|update|change)\s+(?:system\s+)?(?:instruction|directive|role|persona)s?\s*[:=]\s*/i
|
|
10967
10971
|
}
|
|
10968
10972
|
];
|
|
10969
10973
|
var permissionEscalationPatterns = [
|