codesentry 0.1.2 → 0.1.3
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/index.js +6 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -345,6 +345,7 @@ var runScan = async (targetDir, rules, concurrency = DEFAULT_SCAN_CONCURRENCY) =
|
|
|
345
345
|
|
|
346
346
|
// src/scanner/semgrep.ts
|
|
347
347
|
import { execFile } from "child_process";
|
|
348
|
+
import { delimiter, dirname as dirname2 } from "path";
|
|
348
349
|
import { promisify } from "util";
|
|
349
350
|
|
|
350
351
|
// src/scanner/semgrep-runtime.ts
|
|
@@ -448,8 +449,12 @@ var runBundledSemgrep = async (targetDir, runtime = resolveBundledSemgrepRuntime
|
|
|
448
449
|
targetDir
|
|
449
450
|
];
|
|
450
451
|
let stdout;
|
|
452
|
+
const env = {
|
|
453
|
+
...process.env,
|
|
454
|
+
PATH: `${dirname2(runtime.semgrep)}${delimiter}${process.env.PATH ?? ""}`
|
|
455
|
+
};
|
|
451
456
|
try {
|
|
452
|
-
({ stdout } = await execute(runtime.semgrep, args, { cwd: targetDir, maxBuffer: 20 * 1024 * 1024 }));
|
|
457
|
+
({ stdout } = await execute(runtime.semgrep, args, { cwd: targetDir, maxBuffer: 20 * 1024 * 1024, env }));
|
|
453
458
|
} catch (error) {
|
|
454
459
|
const output = outputFromError(error);
|
|
455
460
|
if (!output) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codesentry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"packages/semgrep-rules"
|
|
6
6
|
],
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@clack/prompts": "^1.7.0",
|
|
49
49
|
"chalk": "^6.0.0",
|
|
50
50
|
"cli-table3": "^0.6.5",
|
|
51
|
-
"codesentry-semgrep-rules": "0.1.
|
|
51
|
+
"codesentry-semgrep-rules": "0.1.3",
|
|
52
52
|
"commander": "^15.0.0",
|
|
53
53
|
"eslint": "^10.10.0",
|
|
54
54
|
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"p-limit": "^7.3.2"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"codesentry-semgrep-linux-x64": "0.1.
|
|
63
|
-
"codesentry-semgrep-win32-x64": "0.1.
|
|
62
|
+
"codesentry-semgrep-linux-x64": "0.1.3",
|
|
63
|
+
"codesentry-semgrep-win32-x64": "0.1.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/node": "^26.4.1",
|